Projet

Général

Profil

« Précédent | Suivant » 

Révision b472e22b

Ajouté par Serghei Mihai (congés, retour 15/05) il y a presque 10 ans

agenda: datepicker buttons on editing events and appointments fix

Closes #5024

Voir les différences:

calebasse/static/js/calebasse.agenda.js
273 273
    return $(ressource_target).find('a.tab');
274 274
}
275 275

  
276
function init_datepickers(dialog) {
277
    $('.datepicker-date', dialog).datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
278
    $('.datepicker input', dialog).datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
279
}
280

  
276 281
function event_dialog(url, title, width, btn_text) {
277 282
    function add_periodic_events(base) {
278 283
      $(base).on('click', '.update-periodic-event', function () {
......
302 307
              }
303 308
            };
304 309
        generic_ajaxform_dialog('/' + service + '/' + app_name + '/' + current_date + '/update-periodic-event/' + id,
305
          'Modifier un évènement périodique', '#ajax-dlg', '900px', 'Modifier', null,
306
          function (dialog) {
307
            $('#ajax-dlg .datepicker-date').datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
308
          }, null, delete_button
309
        );
310
          'Modifier un évènement périodique', '#ajax-dlg', '900px', 'Modifier', null, init_datepickers, null, delete_button);
310 311
      });
311 312
      $(base).on('click', '.update-periodic-rdv', function () {
312 313
        $('.ui-icon-closethick').click();
......
331 332
            }
332 333
        };
333 334
        generic_ajaxform_dialog('/' + service + '/' + app_name + '/' + current_date + '/update-periodic-rdv/' + id,
334
          'Modifier un rendez-vous périodique', '#ajax-dlg', '900px', 'Modifier', null,
335
          function (dialog) {
336
            $('#ajax-dlg .datepicker-date').datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
337
          }, null, delete_button
338
        );
335
          'Modifier un rendez-vous périodique', '#ajax-dlg', '900px', 'Modifier', null, init_datepickers, null, delete_button);
339 336
      });
340 337
    }
341 338

  
calebasse/static/js/calebasse.dialog.js
22 22
    height = 'auto';
23 23
  $(id).load(url,
24 24
      function () {
25
        $('.datepicker-date').datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
26
        $('.datepicker input').datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
25 27
        function onsuccess(response, status, xhr, form) {
26 28
          enable_button($('#submit-btn'));
27 29
          var parse = $(response);

Formats disponibles : Unified diff