summaryrefslogtreecommitdiffstats
path: root/apps/calendar/js
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-10-20 23:34:05 +0200
committerBart Visscher <bartv@thisnet.nl>2011-10-20 23:49:29 +0200
commit085001fa2466b50d3ef5f0d7d171deac43ee6afb (patch)
tree64d5aaa7fa725e5052b24fe41ab698ab41f5261a /apps/calendar/js
parent96002c8c8f1567ce9ca3b8a003371b06830f4270 (diff)
downloadnextcloud-server-085001fa2466b50d3ef5f0d7d171deac43ee6afb.tar.gz
nextcloud-server-085001fa2466b50d3ef5f0d7d171deac43ee6afb.zip
Disable calendar scrolling, doesn't work yet
Diffstat (limited to 'apps/calendar/js')
-rw-r--r--apps/calendar/js/calendar.js34
1 files changed, 13 insertions, 21 deletions
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index 8c30b1156ee..bf9e2628ff9 100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -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,