Index: trunk/kernel/admin_templates/incs/fw_menu.js =================================================================== diff -u -N -r1566 -r5009 --- trunk/kernel/admin_templates/incs/fw_menu.js (.../fw_menu.js) (revision 1566) +++ trunk/kernel/admin_templates/incs/fw_menu.js (.../fw_menu.js) (revision 5009) @@ -169,7 +169,7 @@ } menu.menuItemHeight = menu.menuItemHeight || defaultHeight; menu.menuItemIndent = menu.menuItemIndent || defaultIndent; - var itemProps = 'font-family:' + menu.fontFamily +';font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + ';'; + var itemProps = 'font-family:' + menu.fontFamily +';font-weight:' + menu.fontWeight + ';font-size:' + menu.fontSize + ';'; if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';'; if (document.all) itemProps += 'font-size:' + menu.fontSize + ';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);'; Index: trunk/core/admin_templates/js/catalog.js =================================================================== diff -u -N -r5006 -r5009 --- trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5006) +++ trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5009) @@ -9,6 +9,7 @@ // get from cookie this.ActivePrefix = ''; + $ViewMenus = new Array('c'); } Catalog.prototype.Init = function () { @@ -81,14 +82,17 @@ // hide source tab document.getElementById(this.ActivePrefix + '_tab').className = 'catalog-tab-unselected'; document.getElementById(this.queryTabRegistry('prefix', this.ActivePrefix, 'tab_id') + '_div').style.display = 'none'; + this.HideDependentButtons(this.ActivePrefix); } // show destination tab this.ActivePrefix = $prefix; document.getElementById(this.ActivePrefix + '_tab').className = 'catalog-tab-selected'; - var $div_id = this.queryTabRegistry('prefix', $prefix, 'tab_id') + '_div'; // destination tab + var $div_id = this.queryTabRegistry('prefix', this.ActivePrefix, 'tab_id') + '_div'; // destination tab document.getElementById($div_id).style.display = 'block'; - + this.ShowDependentButtons(this.ActivePrefix); + $ViewMenus = new Array('c', this.ActivePrefix); + // this.TabRegistry.length == 1 var $cat_id = get_hidden_field('m_cat_id'); var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id'); @@ -110,6 +114,7 @@ this.TabRegistry[$index]['prefix'] = $tab.getAttribute('prefix'); this.TabRegistry[$index]['module_path'] = $tab.getAttribute('edit_template').substring(0, $tab.getAttribute('edit_template').indexOf('/')); this.TabRegistry[$index]['edit_template'] = $tab.getAttribute('edit_template'); + this.TabRegistry[$index]['dep_buttons'] = $tab.getAttribute('dep_buttons').split(','); this.TabRegistry[$index]['index'] = $index; } @@ -124,4 +129,22 @@ $i++; } return false; +} + +Catalog.prototype.ShowDependentButtons = function($prefix) { + var $dep_buttons = this.queryTabRegistry('prefix', $prefix, 'dep_buttons'); + var $i = 0; + while ($i < $dep_buttons.length) { + a_toolbar.ShowButton($dep_buttons[$i]); + $i++; + } +} + +Catalog.prototype.HideDependentButtons = function($prefix) { + var $dep_buttons = this.queryTabRegistry('prefix', $prefix, 'dep_buttons'); + var $i = 0; + while ($i < $dep_buttons.length) { + a_toolbar.HideButton($dep_buttons[$i]); + $i++; + } } \ No newline at end of file Index: trunk/kernel/admin_templates/incs/toolbar.js =================================================================== diff -u -N -r5005 -r5009 --- trunk/kernel/admin_templates/incs/toolbar.js (.../toolbar.js) (revision 5005) +++ trunk/kernel/admin_templates/incs/toolbar.js (.../toolbar.js) (revision 5009) @@ -1,4 +1,4 @@ -function ToolBarButton(title, alt, onclick) +function ToolBarButton(title, alt, onclick, $hidden) { this.Title = title || ''; this.CheckTitleModule(); @@ -17,7 +17,7 @@ this.imgObject = null; this.Enabled = true; - this.Hidden = false; + this.Hidden = $hidden ? true : false; this.ToolBar = null; } @@ -32,7 +32,9 @@ ToolBarButton.prototype.IconsPath = function() { - if( !isset(img_path) ) alert('img path not set'); + if (!img_path) { + alert('error: toolbar image path not set'); + } return img_path + this.Module + 'toolbar/'; } @@ -47,6 +49,7 @@ this.SetOnMouseOver(); this.SetOnMouseOut(); this.SetOnClick(); + if (this.Hidden) this.Hide(); } ToolBarButton.prototype.SetOnMouseOver = function() { @@ -88,11 +91,10 @@ // do not change the order of these lines! if (is.ie6up || is.gecko) { this.imgObject.style.cursor = 'pointer'; - this.imgObject.style.cursor = 'hand'; } else { // somehow set cursor hand for IE 5/ 5.5 - //this.imgObject.style = 'cursor: hand'; +// this.imgObject.style = 'cursor: hand'; } } Index: trunk/core/admin_templates/catalog/catalog.tpl =================================================================== diff -u -N -r5006 -r5009 --- trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 5006) +++ trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 5009) @@ -13,13 +13,13 @@ "/> + @@ -162,7 +163,7 @@ -
+
@@ -197,9 +198,6 @@ - - - -
+
@@ -197,9 +198,6 @@ - - -