From 0e224961b8d1bd2a0f9d26b75168b1f46c47024e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 5 Mar 2019 14:12:22 +0100 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(-) diff --git a/combo/public/static/js/combo.public.js b/combo/public/static/js/combo.public.js index 7dad6cfd..409c4b3d 100644 --- a/combo/public/static/js/combo.public.js +++ b/combo/public/static/js/combo.public.js @@ -209,31 +209,27 @@ $(function() { $(checkboxes[checkboxes.length-1]).parents('tr').next().find('td:nth-child(' + (column_index+1) + ')').addClass('clickable'); } - $(function() { - $('body').on('click', 'div.cell.foldable > div > h2:first-child', function() { - $(this).parents('div.foldable').toggleClass('folded'); - return false; - }); + $('body').on('click', 'div.cell.foldable > div > h2:first-child', function() { + $(this).parents('div.foldable').toggleClass('folded'); + return false; }); - $(function() { - $('body').on('click', 'a.calchunk', function(event){ - event.preventDefault(); - var $elem = $(this); - var url = $elem.data('content-url'); - $.ajax({ - url: url, - async: true, - dataType: 'html', - crossDomain: true, - success: function(data){ - $elem.closest('div.calcontent').html(data); - }, - error: function(error){ - console.log(':(', error); - } - }); - }); + $('body').on('click', 'a.calchunk', function(event){ + event.preventDefault(); + var $elem = $(this); + var url = $elem.data('content-url'); + $.ajax({ + url: url, + async: true, + dataType: 'html', + crossDomain: true, + success: function(data){ + $elem.closest('div.calcontent').html(data); + }, + error: function(error){ + console.log(':(', error); + } + }); }); $('.bookingcalendar table').each(function(idx, elem) { set_booking_calendar_sensitivity(elem); });