]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disable calendar scrolling, doesn't work yet
authorBart Visscher <bartv@thisnet.nl>
Thu, 20 Oct 2011 21:34:05 +0000 (23:34 +0200)
committerBart Visscher <bartv@thisnet.nl>
Thu, 20 Oct 2011 21:49:29 +0000 (23:49 +0200)
apps/calendar/js/calendar.js

index 8c30b1156ee8f6c12fd35648f78caeee9217d9b7..bf9e2628ff942e4e0e61faa33d14bca40c96efe3 100644 (file)
@@ -193,41 +193,33 @@ Calendar={
                        $('#caldav_url').show();
                        $("#caldav_url_close").show();
                },
-               initscroll:function(){ 
+               initScroll:function(){
                        if(window.addEventListener)
-                               document.addEventListener('DOMMouseScroll', Calendar.UI.scrollcalendar);
+                               document.addEventListener('DOMMouseScroll', Calendar.UI.scrollCalendar);
                        //}else{
-                               document.onmousewheel = Calendar.UI.scrollcalendar;
+                               document.onmousewheel = Calendar.UI.scrollCalendar;
                        //}
                },
-               scrollcalendar:function(event){
+               scrollCalendar:function(event){
                        var direction;
                        if(event.detail){
                                if(event.detail < 0){
-                                       direction = "top";
+                                       direction = 'top';
                                }else{
-                                       direction = "down";
+                                       direction = 'down';
                                }
                        }
                        if (event.wheelDelta){
                                if(event.wheelDelta > 0){
-                                       direction = "top";
+                                       direction = 'top';
                                }else{
-                                       direction = "down";
+                                       direction = 'down';
                                }
                        }
-                       if(Calendar.UI.currentview == "onemonthview"){
-                               if(direction == "down"){
-                                       Calendar.UI.updateDate("forward");
-                               }else{
-                                       Calendar.UI.updateDate("backward");
-                               }
-                       }else if(Calendar.UI.currentview == "oneweekview"){
-                               if(direction == "down"){
-                                       Calendar.UI.updateDate("forward");
-                               }else{
-                                       Calendar.UI.updateDate("backward");
-                               }
+                       if(direction == 'down'){
+                               $('#calendar_holder').fullCalendar('next');
+                       }else{
+                               $('#calendar_holder').fullCalendar('prev');
                        }
                },
                Calendar:{
@@ -503,7 +495,7 @@ function ListView(element, calendar) {
        }
 }
 $(document).ready(function(){
-       Calendar.UI.initscroll();
+       //Calendar.UI.initScroll();
        $('#calendar_holder').fullCalendar({
                header: false,
                firstDay: 1,