summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien MUETTON <the.mouette@gmail.com>2010-08-02 15:37:24 +0200
committerJulien MUETTON <the.mouette@gmail.com>2010-08-02 15:37:24 +0200
commitd43cada97938271dac8a9409a256b6b88fb587dc (patch)
tree6f37985427ad5aa1664c978108fed9108d59d61d
parent8470ebaf2c73d79b008f2a7660f3ed7bb849941f (diff)
parent98f2e9739440eea6c8867691f03023cd09050fd5 (diff)
downloadjquery-week-calendar-d43cada97938271dac8a9409a256b6b88fb587dc.zip
jquery-week-calendar-d43cada97938271dac8a9409a256b6b88fb587dc.tar.gz
jquery-week-calendar-d43cada97938271dac8a9409a256b6b88fb587dc.tar.bz2
Merge branch 'master' into gh-pages
-rw-r--r--jquery.weekcalendar.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jquery.weekcalendar.js b/jquery.weekcalendar.js
index f6fd163..86a348c 100644
--- a/jquery.weekcalendar.js
+++ b/jquery.weekcalendar.js
@@ -26,6 +26,7 @@
alwaysDisplayTimeMinutes: true,
use24Hour : false,
daysToShow : 7,
+ minBodyHeight: 100,
firstDayOfWeek : function(calendar){
if($(calendar).weekCalendar('option', 'daysToShow') != 5){
return 0;
@@ -509,7 +510,7 @@
var calendarHeight = options.height(this.element);
var headerHeight = this.element.find(".wc-header").outerHeight();
var navHeight = this.element.find(".wc-toolbar").outerHeight();
- var scrollContainerHeight = calendarHeight - navHeight - headerHeight;
+ var scrollContainerHeight = Math.max(calendarHeight - navHeight - headerHeight, option.minBodyHeight);
var timeslotHeight = this.element.find(".wc-time-slots").outerHeight();
this.element.find(".wc-scrollable-grid").height(scrollContainerHeight);
if(timeslotHeight <= scrollContainerHeight){
@@ -664,7 +665,7 @@
});
$container.find('input').change(function(){
self.setDaysToShow(parseInt($(this).val(), 10));
- })
+ });
}
$calendarContainer.find(".wc-nav, .wc-display").buttonset();
var _height = $calendarContainer.find(".wc-nav").outerHeight();