fixed some small IE/FF scrolling and display bugs
- in IE 6/7, gap underneath views, mouseover caused error - in FF, scrolling was sometimes set to top - in agenda views, scrolling would reset on every event rerender - during rendering of agenda view would cause document to get really tall
This commit is contained in:
parent
e4ea11c3df
commit
987d029ba0
3 changed files with 21 additions and 13 deletions
|
@ -200,7 +200,7 @@ function Agenda(element, options, methods) {
|
|||
body.find('td').click(slotClick);
|
||||
|
||||
// slot event container
|
||||
slotSegmentContainer = $("<div/>").appendTo(bodyContent);
|
||||
slotSegmentContainer = $("<div style='position:absolute;top:0;left:0'/>").appendTo(bodyContent);
|
||||
|
||||
// background stripes
|
||||
d = cloneDate(d0);
|
||||
|
@ -269,15 +269,15 @@ function Agenda(element, options, methods) {
|
|||
body.scrollTop(timePosition(d0, scrollDate) + 1); // +1 for the border
|
||||
// TODO: +1 doesn't apply when firstHour=0
|
||||
}
|
||||
if ($.browser.opera) {
|
||||
//if ($.browser.opera) {
|
||||
setTimeout(go, 0); // opera 10 (and earlier?) needs this
|
||||
}else{
|
||||
go();
|
||||
}
|
||||
//}else{
|
||||
// go();
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
function setHeight(height) {
|
||||
function setHeight(height, dontResetScroll) {
|
||||
viewHeight = height;
|
||||
slotTopCache = {};
|
||||
|
||||
|
@ -290,7 +290,9 @@ function Agenda(element, options, methods) {
|
|||
height: height
|
||||
});
|
||||
|
||||
resetScroll(); //TODO: not the best place for this
|
||||
if (!dontResetScroll) {
|
||||
resetScroll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -303,7 +305,7 @@ function Agenda(element, options, methods) {
|
|||
|
||||
var topTDs = head.find('tr:first th'),
|
||||
stripeTDs = bg.find('td'),
|
||||
clientWidth = slotSegmentContainer.width(); // body[0].clientWidth isn't reliable here in IE6
|
||||
clientWidth = body[0].clientWidth;
|
||||
|
||||
bodyTable.width(clientWidth);
|
||||
|
||||
|
@ -454,7 +456,7 @@ function Agenda(element, options, methods) {
|
|||
bindDaySegHandlers,
|
||||
modifiedEventId
|
||||
);
|
||||
setHeight(viewHeight); // might have pushed the body down, so resize
|
||||
setHeight(viewHeight, true); // might have pushed the body down, so resize
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ function Grid(element, options, methods) {
|
|||
tbody = $(s + "</tbody>").appendTo(table);
|
||||
tbody.find('td').click(dayClick);
|
||||
|
||||
segmentContainer = $("<div/>").appendTo(element); // style='position:absolute;top:0;left:0' // made it a little slower for some reason
|
||||
segmentContainer = $("<div style='position:absolute;top:0;left:0'/>").appendTo(element);
|
||||
|
||||
}else{ // NOT first time, reuse as many cells as possible
|
||||
|
||||
|
|
12
src/main.js
12
src/main.js
|
@ -188,7 +188,9 @@ $.fn.fullCalendar = function(options) {
|
|||
if (v != viewName) {
|
||||
ignoreWindowResize++;
|
||||
|
||||
var oldView = view;
|
||||
var oldView = view,
|
||||
newViewElement;
|
||||
|
||||
if (oldView) {
|
||||
if (oldView.eventsChanged) {
|
||||
eventsDirty();
|
||||
|
@ -206,8 +208,9 @@ $.fn.fullCalendar = function(options) {
|
|||
}
|
||||
}else{
|
||||
view = viewInstances[v] = $.fullCalendar.views[v](
|
||||
$("<div class='fc-view fc-view-" + v + "' style='position:relative'/>").appendTo(content),
|
||||
options);
|
||||
newViewElement = $("<div class='fc-view fc-view-" + v + "' style='position:absolute'/>").appendTo(content),
|
||||
options
|
||||
);
|
||||
}
|
||||
|
||||
if (header) {
|
||||
|
@ -218,6 +221,9 @@ $.fn.fullCalendar = function(options) {
|
|||
|
||||
view.name = viewName = v;
|
||||
render();
|
||||
if (newViewElement) {
|
||||
newViewElement.css('position', 'relative');
|
||||
}
|
||||
if (oldView) {
|
||||
content.css('overflow', ''); // needs to be first
|
||||
setMinHeight(content, 0);
|
||||
|
|
Loading…
Reference in a new issue