]> source.dussan.org Git - nextcloud-server.git/commitdiff
Calendar: only update default view when it really changed
authorBart Visscher <bartv@thisnet.nl>
Fri, 17 Feb 2012 20:40:57 +0000 (21:40 +0100)
committerBart Visscher <bartv@thisnet.nl>
Fri, 17 Feb 2012 21:10:02 +0000 (22:10 +0100)
apps/calendar/js/calendar.js

index 6f1f52eafa1aca28da9772b9d2cef7b2a0ef9611..517d2ce128b8903bad6f1e64dd72fa14b71b58a2 100644 (file)
@@ -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);