Index: trunk/admin/browse/fw_menu.js =================================================================== diff -u -r1335 -r1566 --- trunk/admin/browse/fw_menu.js (.../fw_menu.js) (revision 1335) +++ trunk/admin/browse/fw_menu.js (.../fw_menu.js) (revision 1566) @@ -51,19 +51,36 @@ 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 addMenuItem(label, action, type) { - this.items[this.items.length] = label; - this.actions[this.actions.length] = action; - if (type == 1) this.types[this.types.length] = this.imagePath+"check_on.gif"; - if (type == 2) this.types[this.types.length] = this.imagePath+"menu_dot.gif"; - if ((type!=1) && (type !=2)) this.types[this.types.length] = ""; +function RemoveTranslationLink($string) +{ + return $string.match(/(.*)<\/a>/) ? RegExp.$2 : $string; +} + +function addMenuItem(label, action, type) +{ + if( typeof(label) == 'string' ) label = RemoveTranslationLink(label); + if( isset(type) ) type = parseInt(type); + this.items[this.items.length] = label; + this.actions[this.actions.length] = action; + switch(type) + { + case 1: + this.types[this.types.length] = this.imagePath+'check_on.gif'; + break; + case 2: + this.types[this.types.length] = this.imagePath+'menu_dot.gif'; + break; + default: + this.types[this.types.length] = ''; + } } function addMenuSeparator() {