Index: trunk/core/admin_templates/js/catalog.js =================================================================== diff -u -r5033 -r5036 --- trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5033) +++ trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5036) @@ -5,7 +5,8 @@ this.BusyRequest = false; this.URLMask = $url_mask; this.Separator = '#separator#'; - + this.ParentCategoryID = 0; + this.TabRegistry = new Array(); this.ActivePrefix = getCookie(this.CookiePrefix + 'active_prefix'); this.PreviousPrefix = this.ActivePrefix; @@ -68,13 +69,23 @@ document.getElementById($params[0]).innerHTML = $text; } + if ($params[0] != 'categories_div') { + $Catalog.setViewMenu(); + } + if (isset($Debugger)) $Debugger.Clear(); } Catalog.prototype.errorCallback = function($request, $params) { alert('AJAX ERROR: ' + Request.getErrorHtml($request)); } +Catalog.prototype.setViewMenu = function() { + if (Grids[this.ActivePrefix]) { + $ViewMenus = new Array('c', this.ActivePrefix); + } +} + Catalog.prototype.submit_event = function($prefix_special, $event, $t) { if (!isset($prefix_special)) $prefix_special = this.getCurrentPrefix(); var $tab_id = this.queryTabRegistry('prefix', $prefix_special, 'tab_id'); @@ -136,7 +147,6 @@ document.getElementById($div_id).style.display = 'block'; this.ShowDependentButtons(this.ActivePrefix); setCookie(this.CookiePrefix + 'active_prefix', this.ActivePrefix); - $ViewMenus = new Array('c', this.ActivePrefix); // this.TabRegistry.length == 1 var $cat_id = get_hidden_field('m_cat_id');