Projet

Général

Profil

0001-misc-remove-unnecessary-double-namespacing-from-js-c.patch

Frédéric Péters, 05 mars 2019 14:12

Télécharger (2,26 ko)

Voir les différences:

Subject: [PATCH] misc: remove unnecessary double namespacing from js code
 (#31093)

 combo/public/static/js/combo.public.js | 42 ++++++++++++--------------
 1 file changed, 19 insertions(+), 23 deletions(-)
combo/public/static/js/combo.public.js
209 209
    $(checkboxes[checkboxes.length-1]).parents('tr').next().find('td:nth-child(' + (column_index+1) + ')').addClass('clickable');
210 210
  }
211 211

  
212
  $(function() {
213
    $('body').on('click', 'div.cell.foldable > div > h2:first-child', function() {
214
        $(this).parents('div.foldable').toggleClass('folded');
215
        return false;
216
    });
212
  $('body').on('click', 'div.cell.foldable > div > h2:first-child', function() {
213
      $(this).parents('div.foldable').toggleClass('folded');
214
      return false;
217 215
  });
218 216

  
219
  $(function() {
220
    $('body').on('click', 'a.calchunk', function(event){
221
        event.preventDefault();
222
        var $elem = $(this);
223
        var url = $elem.data('content-url');
224
        $.ajax({
225
            url: url,
226
            async: true,
227
            dataType: 'html',
228
            crossDomain: true,
229
            success: function(data){
230
                $elem.closest('div.calcontent').html(data);
231
            },
232
            error: function(error){
233
                console.log(':(', error);
234
            }
235
        });
236
    });
217
  $('body').on('click', 'a.calchunk', function(event){
218
      event.preventDefault();
219
      var $elem = $(this);
220
      var url = $elem.data('content-url');
221
      $.ajax({
222
          url: url,
223
          async: true,
224
          dataType: 'html',
225
          crossDomain: true,
226
          success: function(data){
227
              $elem.closest('div.calcontent').html(data);
228
          },
229
          error: function(error){
230
              console.log(':(', error);
231
          }
232
      });
237 233
  });
238 234

  
239 235
  $('.bookingcalendar table').each(function(idx, elem) { set_booking_calendar_sensitivity(elem); });
240
-