Projet

Général

Profil

0001-dossiers-render-pause-facturation-comment-expandable.patch

Jérôme Schneider, 30 juillet 2014 16:41

Télécharger (5,31 ko)

Voir les différences:

Subject: [PATCH] dossiers: render pause facturation comment expandable

Closes #5010
 .../templates/dossiers/patientrecord_tab1_general.html | 12 ++++++++----
 .../templates/dossiers/patientrecord_tab3_contact.html |  6 ++++--
 calebasse/static/css/dossiers.css                      | 10 +++++++++-
 calebasse/static/css/style.css                         | 11 -----------
 calebasse/static/js/calebasse.dossiers.js              | 18 ++++--------------
 5 files changed, 25 insertions(+), 32 deletions(-)
calebasse/dossiers/templates/dossiers/patientrecord_tab1_general.html
89 89
      <p id="confidential-msg" style="display: none; font-size: 10px;">Confidentialité mise à jour</p>
90 90
      {{ form.confidential.label_tag }} : <span class="autosubmit">{{ form.confidential }}</span>
91 91
      <p id="pause-msg" style="display: none; font-size: 10px;">Pause facturation mise à jour</p>
92
      {{ form.pause.label_tag }} : {{ form.pause }}
93
      <br/><label>Commentaire de la pause facturation</label> <button class="save enable-on-change btn-maj">✔</button><br/>
94
      {{ form.pause_comment }}
95

  
92
      {{ form.pause.label_tag }} : <span class="autosubmit">{{ form.pause }}</span>
93
      <br/>
94
      <span class="js-expandable">
95
      <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>
96
      <span class="js-to-expand">
97
        <button class="save enable-on-change btn-maj">✔</button><br/>
98
        {{ form.pause_comment }}
99
      </span>
96 100
    </div>
97 101
  </form>
98 102

  
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
126 126

  
127 127
input[type=checkbox] + button {
128 128
    display: none;
129
}
129
}
130

  
131
.js-expandable .js-click-to-expand:after { content: " [+]"; }
132
.js-expanded .js-click-to-expand:after { content: " [-]"; }
133
.js-click-to-expand { cursor: pointer; }
134
.js-click-to-expand:hover { font-weight: bold; }
135

  
136
.js-expandable .js-to-expand { display: none; }
137
.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

  
calebasse/static/js/calebasse.dossiers.js
242 242
              }
243 243
          });
244 244
      });
245
    $('.social-security-label').click(function() {
246
      var label = $(this).html();
247
      var data = $(this).next();
248
      if (($(data).is(':hidden'))) {
249
        $(this).html(label.replace('+', '-'));
250
        $(this).css("font-weight", "bold");
251
      } else {
252
        $(this).html(label.replace('-', '+'));
253
        $(this).css("font-weight", "");
254
      }
255
      $(data).toggle();
256
    });
257 245
    var hashes = location.hash.split('&');
258 246
    for (i in hashes) {
259 247
      if (hashes[i] == "newcontact") {
......
361 349
  $(function() {
362 350
    var $tabs = $('#tabs').tabs({
363 351
      load: function(event, ui) {
364
        var tabid = $(ui.tab).attr('id');
352
        $(document).on('click', '.js-click-to-expand', function (event) {
353
             $(event.target).parents('.js-expandable').toggleClass('js-expanded');
354
        });
365 355
        if (tabid == "ui-id-1")
366
      load_tab1_general();
356
            load_tab1_general();
367 357
        else if (tabid == "ui-id-2")
368 358
      load_tab2_adm();
369 359
        else if (tabid == "ui-id-3")
370
-