Project

General

Profile

« Previous | Next » 

Revision 5361bee4

Added by Serghei Mihai almost 11 years ago

agenda: displaying the participants list when creating a new event or schedule from schedule page

View differences:

calebasse/static/js/calebasse.agenda.js
86 86
        return false;
87 87
      });
88 88
      $(base).find('.newrdv').click(function() {
89
          $('#close-all-agendas').click();
90
          $('.ressource-item.active').each(function (i, v) {
91
              toggle_ressource(v);
92
          });
93 89
          var participants = $('.person-item.active').map(function (i, v) { return $(v).data('worker-id'); });
94 90
          var qs = $.param({participants: $.makeArray(participants),
95 91
                            room: $.cookie('active-ressource-agenda'),
96 92
                            time: $(this).data('hour') }, true);
97 93
          var new_appointment_url = $(this).data('url') + "?" + qs;
98 94
          event_dialog(new_appointment_url, 'Nouveau rendez-vous', '850px', 'Ajouter');
95
          $('#close-all-agendas').click();
96
          $('.ressource-item.active').each(function (i, v) {
97
              toggle_ressource(v);
98
          });
99 99
      });
100 100
      $(base).find('.edit-appointment').click(function() {
101 101
          event_dialog("/" + service + "/agenda/" + current_date + "/update-rdv/" + $(this).data('event-id') , 'Modifier rendez-vous', '850px', 'Modifier');
102 102
          return false;
103 103
      });
104 104
      $(base).find('.newevent').click(function() {
105
          $('#close-all-agendas').click();
106
          $('.ressource-item.active').each(function (i, v) {
107
              toggle_ressource(v);
108
          });
109 105
          var participants = $('.person-item.active').map(function (i, v) { return $(v).data('worker-id'); });
110 106
          var qs = $.param({participants: $.makeArray(participants),
111 107
                            room: $.cookie('active-ressource-agenda'),
112 108
                            time: $(this).data('hour') }, true);
113 109
          event_dialog($(this).data('url') + "?" + qs, 'Nouvel événement', '850px', 'Ajouter');
110
          $('#close-all-agendas').click();
111
          $('.ressource-item.active').each(function (i, v) {
112
              toggle_ressource(v);
113
          });
114 114
      });
115 115
      $(base).find('.edit-event').click(function() {
116 116
          event_dialog("update-event/" + $(this).data('event-id') , 'Modifier un événement', '850px', 'Modifier');

Also available in: Unified diff