Projet

Général

Profil

« Précédent | Suivant » 

Révision e8a1fe31

Ajouté par Jérôme Schneider il y a plus de 9 ans

dossiers: render pause facturation comment expandable

Closes #5010

Voir les différences:

calebasse/dossiers/templates/dossiers/patientrecord_tab1_general.html
91 91
      <p id="confidential-msg" style="display: none; font-size: 10px;">Confidentialité mise à jour</p>
92 92
      {{ form.confidential.label_tag }} : <span class="autosubmit">{{ form.confidential }}</span>
93 93
      <p id="pause-msg" style="display: none; font-size: 10px;">Pause facturation mise à jour</p>
94
      {{ form.pause.label_tag }} : {{ form.pause }}
95
      <br/><label>Commentaire de la pause facturation</label> <button class="save enable-on-change btn-maj">✔</button><br/>
96
      {{ form.pause_comment }}
97

  
94
      {{ form.pause.label_tag }} : <span class="autosubmit">{{ form.pause }}</span>
95
      <br/>
96
      <span class="js-expandable">
97
      <label class="js-click-to-expand">Commentaire de la pause facturation {% if object.pause_comment %}<span title="Un commentaire existe" class="icon-comment" style="display: inline"></span>{% endif %}</label>
98
      <span class="js-to-expand">
99
        <button class="save enable-on-change btn-maj">✔</button><br/>
100
        {{ form.pause_comment }}
101
      </span>
98 102
    </div>
99 103
  </form>
100 104

  
calebasse/dossiers/templates/dossiers/patientrecord_tab3_contact.html
38 38
  </li>
39 39
  {% endif %}
40 40
  <span class="social-security-contact">
41
    <label class="social-security-label">Infos d'assuré [+]</label>
42
    <ul>
41
    <span class="js-expandable">
42
    <label class="js-click-to-expand">Infos d'assuré</label>
43
    <ul class="js-to-expand">
43 44
      {% if contact.id == object.id %}
44 45
      {{ object.first_name }} <span class="lastname">{{ object.last_name }}</span>
45 46
      {% endif %}
......
88 89
      {% endif %}
89 90
    </ul>
90 91
  </span>
92
  </span>
91 93
</ul>
calebasse/static/css/dossiers.css
152 152
.print-container form {
153 153
    display: inline;
154 154
}
155

  
156
.js-expandable .js-click-to-expand:after { content: " [+]"; }
157
.js-expanded .js-click-to-expand:after { content: " [-]"; }
158
.js-click-to-expand { cursor: pointer; }
159
.js-click-to-expand:hover { font-weight: bold; }
160

  
161
.js-expandable .js-to-expand { display: none; }
162
.js-expandable.js-expanded .js-to-expand { display: block; }
calebasse/static/css/style.css
1395 1395
    list-style-type: none;
1396 1396
}
1397 1397

  
1398
.social-security-label {
1399
    cursor: pointer;
1400
}
1401

  
1402
label.social-security-label:hover {
1403
    font-weight: bold;
1404
}
1405

  
1406
.social-security-contact ul {
1407
    display: none;
1408
}
1409 1398

  
1410 1399
.right {
1411 1400
    float: right;
calebasse/static/js/calebasse.dossiers.js
268 268
              }
269 269
          });
270 270
      });
271
    $('.social-security-label').click(function() {
272
      var label = $(this).html();
273
      var data = $(this).next();
274
      if (($(data).is(':hidden'))) {
275
        $(this).html(label.replace('+', '-'));
276
        $(this).css("font-weight", "bold");
277
      } else {
278
        $(this).html(label.replace('-', '+'));
279
        $(this).css("font-weight", "");
280
      }
281
      $(data).toggle();
282
    });
283 271
    var hashes = location.hash.split('&');
284 272
    for (i in hashes) {
285 273
      if (hashes[i] == "newcontact") {
......
339 327
}
340 328

  
341 329
function load_tab7_socialisation() {
342
    $('#new-socialisation-duration-btn').click(function() {
330
    $('#new-socialisation-duration-btn').on("click", function() {
343 331
        generic_ajaxform_dialog('socialisation/new', 'Ajouter une période de socialisation',
344 332
            '#ajax-dlg', '800px', 'Ajouter', null, add_datepickers);
345 333
    });
......
387 375
  $(function() {
388 376
    var $tabs = $('#tabs').tabs({
389 377
      load: function(event, ui) {
378
        $(document).on('click', '.js-click-to-expand', function (event) {
379
             $(event.target).parents('.js-expandable').toggleClass('js-expanded');
380
        });
390 381
        var tabid = $(ui.tab).attr('id');
391 382
        if (tabid == "ui-id-1")
392
      load_tab1_general();
383
            load_tab1_general();
393 384
        else if (tabid == "ui-id-2")
394
      load_tab2_adm();
385
            load_tab2_adm();
395 386
        else if (tabid == "ui-id-3")
396
      load_tab3_addresses();
387
            load_tab3_addresses();
397 388
        else if (tabid == "ui-id-4")
398
      load_tab4_notifs();
389
            load_tab4_notifs();
399 390
        else if (tabid == "ui-id-7")
400
      load_tab7_socialisation();
391
            load_tab7_socialisation();
401 392
        else if (tabid == "ui-id-8")
402
      load_tab8_medical();
393
            load_tab8_medical();
403 394
      },
404 395
        selected: -1,
405 396
        collapsible: true,

Formats disponibles : Unified diff