Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/advanced_view.tpl =================================================================== diff -u -r5741 -r5751 --- branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/advanced_view.tpl (.../advanced_view.tpl) (revision 5741) +++ branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/advanced_view.tpl (.../advanced_view.tpl) (revision 5751) @@ -84,13 +84,13 @@ - _tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('');"> +
.showall_tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('.showall');">
- (_item_count">?) + (.showall_item_count">?) @@ -100,14 +100,13 @@
-
- + \ No newline at end of file Index: branches/unlabeled/unlabeled-1.27.2/core/admin_templates/js/catalog.js =================================================================== diff -u -r5743 -r5751 --- branches/unlabeled/unlabeled-1.27.2/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5743) +++ branches/unlabeled/unlabeled-1.27.2/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5751) @@ -221,7 +221,7 @@ Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this); } /*else { - alert('refresh disabled = {tab: '+this.ActivePrefix+'; cat_id: '+$cat_id+'}'); + alert('refresh disabled = {tab: '+this.ActivePrefix+'; cat_id: '+$cat_id+'; form_name: '+$form_name+'}'); }*/ } @@ -246,11 +246,6 @@ // allows to get any information about tab Catalog.prototype.queryTabRegistry = function($search_key, $search_value, $return_key) { - if ($search_key == 'prefix' && $search_value != null) { - // remove special here (lists with specials, but tabs have no special) - $search_value = this.cutSpecial($search_value); - } - var $i = 0; while ($i < this.TabRegistry.length) { if (this.TabRegistry[$i][$search_key] == $search_value) { @@ -280,18 +275,17 @@ } } -Catalog.prototype.cutSpecial = function($prefix_special) { - var $prefix = $prefix_special; - if ($prefix.indexOf('.') != -1) { - $prefix = $prefix.substring(0, $prefix.indexOf('.')); - } - return $prefix; +Catalog.prototype.setItemCount = function($prefix, $count) { + setInnerHTML($prefix + '_item_count', $count); } -Catalog.prototype.setItemCount = function($prefix, $count) { - setInnerHTML(this.cutSpecial($prefix) + '_item_count', $count); +Catalog.prototype.setCurrentCategory = function($prefix, $category_id) { + var $tab_id = this.queryTabRegistry('prefix', $prefix, 'tab_id'); +// alert('setting current category for prefix: ['+$prefix+']; tab_id ['+$tab_id+'] = ['+$category_id+']'); + document.getElementById($tab_id + '_div').setAttribute('category_id', $category_id); } + Catalog.prototype.getCurrentPrefix = function() { if (isset(Grids[this.ActivePrefix]) && (Grids[this.ActivePrefix].SelectedCount > 0)) { // item tab grid exists and some items are selected Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/catalog/advanced_view.tpl =================================================================== diff -u -r5741 -r5751 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 5741) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 5751) @@ -84,13 +84,13 @@ - _tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('');"> +
.showall_tab" cellpadding="0" cellspacing="0" width="100%" class="catalog-tab-unselected" onclick="$Catalog.switchTab('.showall');">
- (_item_count">?) + (.showall_item_count">?) @@ -100,14 +100,13 @@
-
- + \ No newline at end of file Index: branches/unlabeled/unlabeled-1.27.2/kernel/admin_templates/incs/catalog.js =================================================================== diff -u -r5743 -r5751 --- branches/unlabeled/unlabeled-1.27.2/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5743) +++ branches/unlabeled/unlabeled-1.27.2/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5751) @@ -221,7 +221,7 @@ Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this); } /*else { - alert('refresh disabled = {tab: '+this.ActivePrefix+'; cat_id: '+$cat_id+'}'); + alert('refresh disabled = {tab: '+this.ActivePrefix+'; cat_id: '+$cat_id+'; form_name: '+$form_name+'}'); }*/ } @@ -246,11 +246,6 @@ // allows to get any information about tab Catalog.prototype.queryTabRegistry = function($search_key, $search_value, $return_key) { - if ($search_key == 'prefix' && $search_value != null) { - // remove special here (lists with specials, but tabs have no special) - $search_value = this.cutSpecial($search_value); - } - var $i = 0; while ($i < this.TabRegistry.length) { if (this.TabRegistry[$i][$search_key] == $search_value) { @@ -280,18 +275,17 @@ } } -Catalog.prototype.cutSpecial = function($prefix_special) { - var $prefix = $prefix_special; - if ($prefix.indexOf('.') != -1) { - $prefix = $prefix.substring(0, $prefix.indexOf('.')); - } - return $prefix; +Catalog.prototype.setItemCount = function($prefix, $count) { + setInnerHTML($prefix + '_item_count', $count); } -Catalog.prototype.setItemCount = function($prefix, $count) { - setInnerHTML(this.cutSpecial($prefix) + '_item_count', $count); +Catalog.prototype.setCurrentCategory = function($prefix, $category_id) { + var $tab_id = this.queryTabRegistry('prefix', $prefix, 'tab_id'); +// alert('setting current category for prefix: ['+$prefix+']; tab_id ['+$tab_id+'] = ['+$category_id+']'); + document.getElementById($tab_id + '_div').setAttribute('category_id', $category_id); } + Catalog.prototype.getCurrentPrefix = function() { if (isset(Grids[this.ActivePrefix]) && (Grids[this.ActivePrefix].SelectedCount > 0)) { // item tab grid exists and some items are selected Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/catalog_tab.tpl =================================================================== diff -u -r5743 -r5751 --- branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 5743) +++ branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 5751) @@ -6,8 +6,8 @@ - $Catalog.setItemCount('c', ''); - document.getElementById('categories_div').setAttribute('category_id', ); + $Catalog.setItemCount('c.showall', ''); + $Catalog.setCurrentCategory('c.showall', ); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/catalog_tab.tpl =================================================================== diff -u -r5743 -r5751 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 5743) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 5751) @@ -6,8 +6,8 @@ - $Catalog.setItemCount('c', ''); - document.getElementById('categories_div').setAttribute('category_id', ); + $Catalog.setItemCount('c.showall', ''); + $Catalog.setCurrentCategory('c.showall', );