summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-10-25 19:56:57 +0200
committerBart Visscher <bartv@thisnet.nl>2011-10-25 19:56:57 +0200
commit950018b5c393898173ebb5ccb515ff12e836f6af (patch)
tree7b71d735e60bf6866a216d88e7ed996a4252b642
parent9832a0817dfe975dd768e24b1f51b0591bbfa3b3 (diff)
downloadnextcloud-server-950018b5c393898173ebb5ccb515ff12e836f6af.tar.gz
nextcloud-server-950018b5c393898173ebb5ccb515ff12e836f6af.zip
Fix scrolling calendar
-rw-r--r--apps/calendar/js/calendar.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index afbb1b28586..d63b9df36f3 100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -204,9 +204,12 @@ Calendar={
direction = 'down';
}
}
- if(direction == 'down'){
+ var scroll = $(document).scrollTop(),
+ doc_height = $(document).height(),
+ win_height = $(window).height();
+ if(direction == 'down' && win_height == (doc_height - scroll)){
$('#calendar_holder').fullCalendar('next');
- }else{
+ }else if (direction == 'top' && scroll == 0) {
$('#calendar_holder').fullCalendar('prev');
}
},
@@ -483,7 +486,7 @@ function ListView(element, calendar) {
}
}
$(document).ready(function(){
- //Calendar.UI.initScroll();
+ Calendar.UI.initScroll();
$('#calendar_holder').fullCalendar({
header: false,
firstDay: 1,