Disable calendar scrolling, doesn't work yet
This commit is contained in:
parent
96002c8c8f
commit
085001fa24
|
@ -193,41 +193,33 @@ Calendar={
|
||||||
$('#caldav_url').show();
|
$('#caldav_url').show();
|
||||||
$("#caldav_url_close").show();
|
$("#caldav_url_close").show();
|
||||||
},
|
},
|
||||||
initscroll:function(){
|
initScroll:function(){
|
||||||
if(window.addEventListener)
|
if(window.addEventListener)
|
||||||
document.addEventListener('DOMMouseScroll', Calendar.UI.scrollcalendar);
|
document.addEventListener('DOMMouseScroll', Calendar.UI.scrollCalendar);
|
||||||
//}else{
|
//}else{
|
||||||
document.onmousewheel = Calendar.UI.scrollcalendar;
|
document.onmousewheel = Calendar.UI.scrollCalendar;
|
||||||
//}
|
//}
|
||||||
},
|
},
|
||||||
scrollcalendar:function(event){
|
scrollCalendar:function(event){
|
||||||
var direction;
|
var direction;
|
||||||
if(event.detail){
|
if(event.detail){
|
||||||
if(event.detail < 0){
|
if(event.detail < 0){
|
||||||
direction = "top";
|
direction = 'top';
|
||||||
}else{
|
}else{
|
||||||
direction = "down";
|
direction = 'down';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.wheelDelta){
|
if (event.wheelDelta){
|
||||||
if(event.wheelDelta > 0){
|
if(event.wheelDelta > 0){
|
||||||
direction = "top";
|
direction = 'top';
|
||||||
}else{
|
}else{
|
||||||
direction = "down";
|
direction = 'down';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Calendar.UI.currentview == "onemonthview"){
|
if(direction == 'down'){
|
||||||
if(direction == "down"){
|
$('#calendar_holder').fullCalendar('next');
|
||||||
Calendar.UI.updateDate("forward");
|
|
||||||
}else{
|
}else{
|
||||||
Calendar.UI.updateDate("backward");
|
$('#calendar_holder').fullCalendar('prev');
|
||||||
}
|
|
||||||
}else if(Calendar.UI.currentview == "oneweekview"){
|
|
||||||
if(direction == "down"){
|
|
||||||
Calendar.UI.updateDate("forward");
|
|
||||||
}else{
|
|
||||||
Calendar.UI.updateDate("backward");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Calendar:{
|
Calendar:{
|
||||||
|
@ -503,7 +495,7 @@ function ListView(element, calendar) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
Calendar.UI.initscroll();
|
//Calendar.UI.initScroll();
|
||||||
$('#calendar_holder').fullCalendar({
|
$('#calendar_holder').fullCalendar({
|
||||||
header: false,
|
header: false,
|
||||||
firstDay: 1,
|
firstDay: 1,
|
||||||
|
|
Loading…
Reference in New Issue