From 6bbd67c3c693ab3cc440be7342b3cc8b88806a18 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 17 Feb 2012 21:40:57 +0100 Subject: [PATCH] Calendar: only update default view when it really changed --- apps/calendar/js/calendar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 6f1f52eafa1..517d2ce128b 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -689,7 +689,10 @@ $(document).ready(function(){ allDayText: allDayText, viewDisplay: function(view) { $('#datecontrol_date').html(view.title); - $.get(OC.filePath('calendar', 'ajax', 'changeview.php') + "?v="+view.name); + if (view.name != defaultView) { + $.get(OC.filePath('calendar', 'ajax', 'changeview.php') + "?v="+view.name); + defaultView = view.name; + } Calendar.UI.setViewActive(view.name); if (view.name == 'agendaWeek') { $('#calendar_holder').fullCalendar('option', 'aspectRatio', 0.1); -- 2.39.5