From: Sven Schöling Date: Tue, 21 Feb 2012 18:19:44 +0000 (+0100) Subject: Javascriptmenü nicht nach rechts aus dem Bildschirm fallen lassen. X-Git-Tag: release-2.7.0rc1~8 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4e940c56099811b6a779df57eb1228000cffb02a;p=kivitendo-erp.git Javascriptmenü nicht nach rechts aus dem Bildschirm fallen lassen. --- diff --git a/js/dhtmlsuite/menu-for-applications.js b/js/dhtmlsuite/menu-for-applications.js index 7896f917b..2fd192a0e 100644 --- a/js/dhtmlsuite/menu-for-applications.js +++ b/js/dhtmlsuite/menu-for-applications.js @@ -2227,6 +2227,13 @@ DHTMLSuite.menuBar.prototype = { shortRef.style.left = DHTMLSuite.commonObj.getLeftPos(this.menuItem_objects[parentId].divElement) + 'px'; shortRef.style.top = (DHTMLSuite.commonObj.getTopPos(this.menuItem_objects[parentId].divElement) + this.menuItem_objects[parentId].divElement.offsetHeight) + 'px'; }else{ + var too_large = DHTMLSuite.commonObj.getLeftPos(this.menuItem_objects[parentId].divElement) + + this.menuItem_objects[parentId].divElement.offsetWidth + + shortRef.offsetWidth + > $('#main_menu_div').width(); + if (too_large) + shortRef.style.left = (DHTMLSuite.commonObj.getLeftPos(this.menuItem_objects[parentId].divElement) - shortRef.offsetWidth) + 'px'; + else shortRef.style.left = (DHTMLSuite.commonObj.getLeftPos(this.menuItem_objects[parentId].divElement) + this.menuItem_objects[parentId].divElement.offsetWidth) + 'px'; shortRef.style.top = (DHTMLSuite.commonObj.getTopPos(this.menuItem_objects[parentId].divElement)) + 'px'; }