Hi,
If display is limited to businessHours, the scrolling does not work. Can be
fixed by changin the _scrollToHour function from (SVN rev 67):
_scrollToHour : function(hour) {
var self = this;
var options = this.options;
var $scrollable = this.element.find(".wc-scrollable-grid");
var slot = hour;
if (self.options.businessHours.limitDisplay) {
if (hour < self.options.businessHours.start) {
slot = 0;
} else if (hour > self.options.businessHours.end) {
slot = self.options.businessHours.end -
self.options.businessHours.start - 1;
}
}
var $target = this.element.find(".wc-grid-timeslot-header
.wc-hour-header:eq(" + slot + ")");
$scrollable.animate({scrollTop: 0}, 0, function() {
var targetOffset = $target.offset().top;
var scroll = targetOffset - $scrollable.offset().top -
$target.outerHeight();
$scrollable.animate({scrollTop: scroll},
options.scrollToHourMillis);
});
}
to:
_scrollToHour : function(hour) {
var self = this;
var options = this.options;
var $scrollable = this.element.find(".wc-scrollable-grid");
var slot = hour;
if (self.options.businessHours.limitDisplay) {
if (hour <= self.options.businessHours.start) {
slot = 0;
} else if (hour > self.options.businessHours.end) {
slot = self.options.businessHours.end -
self.options.businessHours.start - 1;
} else {
slot = hour - self.options.businessHours.start;
}
}
var $target = this.element.find(".wc-grid-timeslot-header
.wc-hour-header:eq(" + slot + ")");
$scrollable.animate({scrollTop: 0}, 0, function() {
var targetOffset = $target.offset().top;
var scroll = targetOffset - $scrollable.offset().top -
$target.outerHeight();
$scrollable.animate({scrollTop: scroll},
options.scrollToHourMillis);
});
}
I tested it only with 24 hour times and seems to work ok.
Original issue reported on code.google.com by doze...@gmail.com on 19 Oct 2009 at 10:07
Original issue reported on code.google.com by
doze...@gmail.com
on 19 Oct 2009 at 10:07