Projet

Général

Profil

« Précédent | Suivant » 

Révision 54318d2c

Ajouté par Serghei Mihai il y a plus de 9 ans

dossiers: printing each patient record tab with filtering past and future appointments by dates

Closes #3109

Voir les différences:

calebasse/static/js/calebasse.dossiers.js
10 10
  $('input#id_prolongation_date', that).datepicker({dateFormat: 'd/m/yy', showOn: 'button' });
11 11
}
12 12

  
13
function print_cleanup() {
14
    $.each($('textarea'), function() {
15
        if(!$(this).val())
16
            $(this).addClass('screen-only');
17
        else
18
            $(this).removeClass('screen-only');
19
    });
20
}
21

  
22
function filter_date_bounds(tab, selector) {
23
    console.log(tab);
24
    var from = $(tab + ' form.filter input[name=from]').datepicker('getDate');
25
    var to = $(tab + ' form.filter input[name=to]').datepicker('getDate');
26
    if (to) {
27
        to.setHours(23); to.setMinutes(59); to.setSeconds(59);
28
    }
29
    $.each($(tab + ' ' + selector), function(){
30
        var current = $.datepicker.parseDate('d/m/yy', $(this).text());
31
        if (current < from || (to && current >= to)) {
32
            $(this).parent().parent().addClass('screen-only');
33
        } else {
34
            $(this).parent().parent().removeClass('screen-only');
35
        }
36
    });
37
}
38

  
13 39
function load_add_address_dialog() {
14 40
  var str = $("#contactform").serialize();
15 41
  $.cookie('contactform', str, { path: window.location.pathname });
......
391 417
        });
392 418
    });
393 419

  
420
    $('#patientrecord-print-button').on('click', function(event) {
421
        event.preventDefault();
422
        generic_ajaxform_dialog($(this).attr('href'), 'Impression dossier patient',
423
                                '#ajax-dlg', '450px', 'Imprimer', false, false);
424
    });
425

  
394 426
    $('#new-patientrecord').click(function() {
395 427
        generic_ajaxform_dialog('new', 'Nouveau dossier',
396 428
            '#dossier-dlg', '700px', 'Ajouter', false, function(that) {

Formats disponibles : Unified diff