From 4e940c56099811b6a779df57eb1228000cffb02a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 21 Feb 2012 19:19:44 +0100 Subject: [PATCH] =?utf8?q?Javascriptmen=C3=BC=20nicht=20nach=20rechts=20au?= =?utf8?q?s=20dem=20Bildschirm=20fallen=20lassen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/dhtmlsuite/menu-for-applications.js | 7 +++++++ 1 file changed, 7 insertions(+) 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'; } -- 2.20.1