]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix scrolling through months
authorBart Visscher <bartv@thisnet.nl>
Thu, 17 Nov 2011 22:53:06 +0000 (23:53 +0100)
committerBart Visscher <bartv@thisnet.nl>
Wed, 23 Nov 2011 20:07:49 +0000 (21:07 +0100)
apps/calendar/js/calendar.js

index 5592e418a446c786cf2094597bb95d1cefec2142..005e359f8eb6c4e1f3fbc0e1c4f768187664d4e3 100644 (file)
@@ -198,8 +198,12 @@ Calendar={
                                win_height = $(window).height();
                        if(direction == 'down' && win_height == (doc_height - scroll)){
                                $('#calendar_holder').fullCalendar('next');
+                               $(document).scrollTop(0);
+                               event.preventDefault();
                        }else if (direction == 'top' && scroll == 0) {
                                $('#calendar_holder').fullCalendar('prev');
+                               $(document).scrollTop(win_height);
+                               event.preventDefault();
                        }
                },
                Calendar:{