From: G. Richardson Date: Tue, 21 Feb 2012 20:04:41 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-3.0.0beta1~355 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/e5aa1ddb53aae3f70cb47af43cfc61dfbe81e350?hp=dc39f671740dc3ab2292c604e8605dd69fb33eac Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/bin/mozilla/menunew.pl b/bin/mozilla/menunew.pl index 6b4f97175..751164e6c 100644 --- a/bin/mozilla/menunew.pl +++ b/bin/mozilla/menunew.pl @@ -137,10 +137,21 @@ sub create_menu { if ($menu_item->{submenu} || !defined($menu_item->{module}) || ($menu_item->{module} eq "menu.pl")) { $item->{subitems} = []; + $item->{image} = _icon_path("$name.png"); create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1); } else { + $item->{image} = _icon_path("${parent}${name}.png"); $menu->menuitem_new("${parent}${name}", $item); } } } + +sub _icon_path { + my ($label, $size) = @_; + + $size ||= 16; + + return "image/icons/${size}x${size}/$label"; +} + 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'; } diff --git a/templates/webpages/menu/menunew.html b/templates/webpages/menu/menunew.html index c402f1bf6..164533990 100644 --- a/templates/webpages/menu/menunew.html +++ b/templates/webpages/menu/menunew.html @@ -38,7 +38,7 @@ window.onload=clockon