Fix touch swipe destruction sometimes blocked reload of calendar

This commit is contained in:
nathangray 2016-06-14 09:26:50 -06:00
parent a2df6f43ef
commit f9a490aea5

View File

@ -15,6 +15,7 @@
/calendar/js/et2_widget_owner.js; /calendar/js/et2_widget_owner.js;
/calendar/js/et2_widget_timegrid.js; /calendar/js/et2_widget_timegrid.js;
/calendar/js/et2_widget_planner.js; /calendar/js/et2_widget_planner.js;
/vendor/bower-asset/jquery-touchswipe/jquery.touchSwipe.js;
*/ */
/** /**
@ -850,7 +851,10 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
*/ */
if(typeof framework !== 'undefined' && framework.applications.calendar && framework.applications.calendar.tab) if(typeof framework !== 'undefined' && framework.applications.calendar && framework.applications.calendar.tab)
{ {
jQuery(framework.applications.calendar.tab.contentDiv).swipe('destroy') jQuery(framework.applications.calendar.tab.contentDiv)
.swipe('destroy');
jQuery(framework.applications.calendar.tab.contentDiv)
.swipe({ .swipe({
//Generic swipe handler for all directions //Generic swipe handler for all directions
swipe:function(event, direction, distance, duration, fingerCount) { swipe:function(event, direction, distance, duration, fingerCount) {