+2007-12-16 Benjamin Mack <mack@xnos.org>
+
+ * (bugfix) #6955: fileadmin contextual menu doesn't popup well
+
2007-12-16 Ingo Renner <ingo@typo3.org>
* removed width css property from workspace selector toolbar item as it caused layout issues in non english backends
2007-12-16 Ingo Renner <ingo@typo3.org>
* removed width css property from workspace selector toolbar item as it caused layout issues in non english backends
- * extends prototype's Position object
+ * extends the window object to identify the scroll offset of the page
*
* @return an object with a top and a left position property
*/
*
* @return an object with a top and a left position property
*/
-Position.getScrollOffset = function() {
- this.prepare();
- return { top: this.deltaY, left: this.deltaX };
+window.getScrollOffset = function() {
+ var l = window.pageXOffset
+ || document.documentElement.scrollLeft
+ || document.body.scrollLeft
+ || 0;
+ var t = window.pageYOffset
+ || document.documentElement.scrollTop
+ || document.body.scrollTop
+ || 0;
+ return { top: t, left: l };
dimsWindow.width = dimsWindow.width-20; // saving margin for scrollbars
var dims = Element.getDimensions(obj); // dimensions for the clickmenu
dimsWindow.width = dimsWindow.width-20; // saving margin for scrollbars
var dims = Element.getDimensions(obj); // dimensions for the clickmenu
- var offset = Position.getScrollOffset();
+ var offset = window.getScrollOffset();
var relative = { X: this.mousePos.X - offset.left, Y: this.mousePos.Y - offset.top };
// adjusting the Y position of the layer to fit it into the window frame
var relative = { X: this.mousePos.X - offset.left, Y: this.mousePos.Y - offset.top };
// adjusting the Y position of the layer to fit it into the window frame
x -= (dims.width - 10);
} else if ((dimsWindow.width - dims.width - relative.X) < offset.left) {
x = offset.left;
x -= (dims.width - 10);
} else if ((dimsWindow.width - dims.width - relative.X) < offset.left) {
x = offset.left;
x += (dimsWindow.width - dims.width - relative.X);
}
}
x += (dimsWindow.width - dims.width - relative.X);
}
}
/**
* event handler function that saves the actual position of the mouse
* in the Clickmenu object
/**
* event handler function that saves the actual position of the mouse
* in the Clickmenu object