Index: trunk/admin/browse/fw_menu.js =================================================================== diff -u -r1669 -r2885 --- trunk/admin/browse/fw_menu.js (.../fw_menu.js) (revision 1669) +++ trunk/admin/browse/fw_menu.js (.../fw_menu.js) (revision 2885) @@ -15,48 +15,58 @@ * 6/28/02 * */ -function Menu(label) { - this.version = "990702 [xMenu; fw_menu.js]"; - this.type = "Menu"; - this.menuWidth = 0; - this.menuItemHeight = 0; - this.fontSize = 11; - this.fontWeight = "normal"; - this.fontFamily = "helvetica, arial, verdana, helvetica"; - this.fontColor = "#000000"; - this.fontColorHilite = "#000000"; - this.bgColor = "#555555"; - this.menuBorder = 1; - this.menuItemBorder = 0; - this.menuItemBgColor = "#f0f1eb"; - this.menuLiteBgColor = "#ffffff"; - this.menuBorderBgColor = "#777777"; - this.menuHiliteBgColor = "#e0e0da"; - this.menuContainerBgColor = "#cccccc"; - this.imagePath ="images/"; - this.childMenuIcon = "menu_arrow.gif"; - this.items = new Array(); - this.actions = new Array(); - this.types = new Array(); //for check/radio type to show pics - this.childMenus = new Array(); +function Menu(label) +{ + this.version = "990702 [xMenu; fw_menu.js]"; + this.type = "Menu"; + this.menuWidth = 0; + this.menuItemHeight = 0; + this.fontSize = 11; + this.fontWeight = "normal"; + this.fontFamily = "helvetica, arial, verdana, helvetica"; + this.fontColor = "#000000"; + this.fontColorHilite = "#000000"; + this.bgColor = "#555555"; + this.menuBorder = 1; + this.menuItemBorder = 0; + this.menuItemBgColor = "#f0f1eb"; + this.menuLiteBgColor = "#ffffff"; + this.menuBorderBgColor = "#777777"; + this.menuHiliteBgColor = "#e0e0da"; + this.menuContainerBgColor = "#cccccc"; - this.hideOnMouseOut = true; + var $base_path = ''; + var $base_tag = document.getElementsByTagName('BASE'); + if($base_tag.length) + { + $base_path = $base_tag[0].href.replace('kernel/admin_templates', 'admin'); + } - this.addMenuItem = addMenuItem; - this.addMenuSeparator = addMenuSeparator; - this.writeMenus = writeMenus; - this.FW_showMenu = FW_showMenu; - this.onMenuItemOver = onMenuItemOver; - this.onMenuItemAction = onMenuItemAction; - this.hideMenu = hideMenu; - this.hideChildMenu = hideChildMenu; + this.imagePath = $base_path + 'images/'; + + this.childMenuIcon = "menu_arrow.gif"; + this.items = new Array(); + this.actions = new Array(); + this.types = new Array(); //for check/radio type to show pics + this.childMenus = new Array(); - label = RemoveTranslationLink(label); - if (!window.menus) window.menus = new Array(); - this.label = label || "menuLabel" + window.menus.length; - window.menus[this.label] = this; - window.menus[window.menus.length] = this; - if (!window.activeMenus) window.activeMenus = new Array(); + this.hideOnMouseOut = true; + + this.addMenuItem = addMenuItem; + this.addMenuSeparator = addMenuSeparator; + this.writeMenus = writeMenus; + this.FW_showMenu = FW_showMenu; + this.onMenuItemOver = onMenuItemOver; + this.onMenuItemAction = onMenuItemAction; + this.hideMenu = hideMenu; + this.hideChildMenu = hideChildMenu; + + label = RemoveTranslationLink(label); + if (!window.menus) window.menus = new Array(); + this.label = label || "menuLabel" + window.menus.length; + window.menus[this.label] = this; + window.menus[window.menus.length] = this; + if (!window.activeMenus) window.activeMenus = new Array(); } function RemoveTranslationLink($string)