Index: trunk/core/admin_templates/js/catalog.js
===================================================================
diff -u -N -r5031 -r5033
--- trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5031)
+++ trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5033)
@@ -18,8 +18,29 @@
// ActivePrefix not set or has non-existing prefix value
this.ActivePrefix = this.TabRegistry[1]['prefix'];
}
+ this.SetAlternativeTabs();
+ this.go_to_cat();
}
+Catalog.prototype.SetAlternativeTabs = function () {
+ // set alternative grids between all items (catalog is set when tab is loaded via AJAX first time)
+ var $i = 1;
+ while ($i < this.TabRegistry.length) {
+ // run through all prefixes
+ var $j = 1;
+ while ($j < this.TabRegistry.length) {
+ if (this.TabRegistry[$i]['prefix'] == this.TabRegistry[$j]['prefix']) {
+ $j++;
+ continue;
+ }
+ // and set alternative to all other prefixes
+ $GridManager.AddAlternativeGrid(this.TabRegistry[$i]['prefix'], this.TabRegistry[$j]['prefix']);
+ $j++;
+ }
+ $i++;
+ }
+}
+
Catalog.prototype.submit_kernel_form = function($form_name, $result_div) {
var $kf = document.getElementById($form_name);
@@ -47,11 +68,6 @@
document.getElementById($params[0]).innerHTML = $text;
}
- if ($params[1] != 'categories_div') {
- // don't add alternative grids to categories, only between item tabs
- $GridManager.AddAlternativeGrid($Catalog.ActivePrefix, $Catalog.PreviousPrefix, true);
- }
-
if (isset($Debugger)) $Debugger.Clear();
}
Index: trunk/core/admin_templates/catalog/catalog.tpl
===================================================================
diff -u -N -r5031 -r5033
--- trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 5031)
+++ trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 5033)
@@ -1,6 +1,6 @@