Project

General

Profile

« Previous | Next » 

Revision cd679a2c

Added by Serghei Mihai over 10 years ago

agenda: close agenda tabs when new event or new schedule created

Closes #3636

View differences:

calebasse/agenda/views.py
130 130
    template_name = 'agenda/new-appointment.html'
131 131
    success_url = '..'
132 132
    success_msg = u'Rendez-vous enregistré avec succès.'
133
    cookies_to_clear = []
133
    cookies_to_clear = ['agenda-worker-tabs']
134 134

  
135 135
    def get_initial(self):
136 136
        initial = super(NewAppointmentView, self).get_initial()
......
203 203
    form_class = NewEventForm
204 204
    template_name = 'agenda/new-event.html'
205 205
    success_url = '..'
206
    cookies_to_clear = []
206
    cookies_to_clear = ['agenda-worker-tabs']
207 207

  
208 208
    def get_initial(self):
209 209
        initial = super(NewEventView, self).get_initial()
calebasse/static/js/calebasse.agenda.js
86 86
        return false;
87 87
      });
88 88
      $(base).find('.newrdv').click(function() {
89
          $('#close-all-agendas').click();
89 90
          var participants = $('.person-item.active').map(function (i, v) { return $(v).data('worker-id'); });
90 91
          var qs = $.param({participants: $.makeArray(participants),
91 92
                            room: $.cookie('active-ressource-agenda'),
......
98 99
          return false;
99 100
      });
100 101
      $(base).find('.newevent').click(function() {
102
          $('#close-all-agendas').click();
101 103
          var participants = $('.person-item.active').map(function (i, v) { return $(v).data('worker-id'); });
102 104
          var qs = $.param({participants: $.makeArray(participants),
103 105
                            room: $.cookie('active-ressource-agenda'),

Also available in: Unified diff