Index: trunk/core/admin_templates/catalog/catalog.tpl =================================================================== diff -u -r4996 -r4997 --- trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 4996) +++ trunk/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 4997) @@ -1,13 +1,13 @@ - + - + - + @@ -117,8 +117,8 @@ } _progressText = ''; - var $separator = '#separator#'; + var $tab_registry = new Array(); function go_to_cat($cat_id) { var $url = ''; @@ -128,19 +128,48 @@ Request.makeRequest($url.replace('#REPLACE#', $cat_id), Catalog.BusyRequest, 'categories_div', Catalog.successCallback, Catalog.errorCallback, 'categories_div'); } + + function switchTab($prefix) { + alert('switching to ['+$prefix+']'); + } + + // adds information about tab to tab_registry + function registerTab($tab_id) { + var $tab = document.getElementById($tab_id + '_div'); + var $index = $tab_registry.length; + $tab_registry[$index] = new Array(); + $tab_registry[$index]['tab_id'] = $tab_id; + $tab_registry[$index]['prefix'] = $tab.getAttribute('prefix'); + $tab_registry[$index]['edit_template'] = $tab.getAttribute('edit_template'); + } + + + // allows to get any information about tab + function queryTabRegistry($search_key, $search_value, $return_key) + { + var $i = 0; + while ($i < $tab_registry.length) { + if ($tab_registry[$i][$search_key] == $search_value) { + return $tab_registry[$i][$return_key]; + break; + } + $i++; + } + return '<' + $search_key + '=' + $search_value + '>'; + }
+ - + - - - + +
+ + -
- - + @@ -165,48 +194,45 @@

-
+ - -
- - - - - - -
- - - - - - -
-
- -
- - - - - + + + + + +
+ ');"> + + + + + +
+ + + + + +
+
+ +
+ -
- @@ -222,5 +248,4 @@ \ No newline at end of file