From 596a7ccd364cf2fe39c49496600275ab0b4cffa7 Mon Sep 17 00:00:00 2001 From: PhyberApex Date: Wed, 16 Dec 2020 17:26:39 +0100 Subject: [PATCH] Removing of resize event (#1190) * Removing of resize event Hey, I removed that resize event as it get's thrown every time you scroll on a mobile device. Which prevented me from actually viewing the list view of the calender on mobile devices. Let me know if you think it is still needed tho! ~Cheers * Update calendar.js Now it only get's called once :) * Update mealplan.js Same thing here as in calendar.js * Update calendar.js Removed redundant variable --- public/viewjs/calendar.js | 2 +- public/viewjs/mealplan.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/viewjs/calendar.js b/public/viewjs/calendar.js index e4507295..3c9c74d2 100644 --- a/public/viewjs/calendar.js +++ b/public/viewjs/calendar.js @@ -44,7 +44,7 @@ $("#ical-button").on("click", function(e) ); }); -$(window).on("resize", function() +$(window).one("resize", function() { // Automatically switch the calendar to "basicDay" view on small screens // and to "month" otherwise diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 2e8ff1c6..9674d0aa 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -751,7 +751,7 @@ $(document).on("click", ".recipe-popup-button", function(e) ); }); -$(window).on("resize", function() +$(window).one("resize", function() { // Automatically switch the calendar to "basicDay" view on small screens // and to "basicWeek" otherwise