Index: branches/RC/core/admin_templates/js/script.js
===================================================================
diff -u -r10005 -r10116
--- branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 10005)
+++ branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 10116)
@@ -1168,22 +1168,25 @@
function setCookie($Name, $Value)
{
// set cookie
- if(getCookie($Name) != $Value)
- {
- document.cookie = $Name+'='+escape($Value)+'; path=' + $base_path + '/';
+ if (getCookie($Name) != $Value) {
+ document.cookie = $Name+'='+escape($Value);
}
}
function getCookie($Name)
{
// get cookie
+
var $cookieString = document.cookie;
var $index = $cookieString.indexOf($Name+'=');
- if($index == -1) return null;
+ if ($index == -1) {
+ return null;
+ }
$index = $cookieString.indexOf('=',$index)+1;
var $endstr = $cookieString.indexOf(';',$index);
if($endstr == -1) $endstr = $cookieString.length;
+
return unescape($cookieString.substring($index, $endstr));
}
Index: branches/RC/core/admin_templates/js/catalog.js
===================================================================
diff -u -r10080 -r10116
--- branches/RC/core/admin_templates/js/catalog.js (.../catalog.js) (revision 10080)
+++ branches/RC/core/admin_templates/js/catalog.js (.../catalog.js) (revision 10116)
@@ -6,7 +6,6 @@
this.ParentCategoryID = 0;
this.OnResponceMethod = null;
this.TabShift = isset($tab_shift) ? $tab_shift : 1; // start from 2nd tab (index starting from 0)
-
this.TabRegistry = new Array();
this.ActivePrefix = getCookie(this.CookiePrefix + 'active_prefix');
this.PreviousPrefix = this.ActivePrefix;
@@ -223,7 +222,7 @@
var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id');
if ($cat_id != $tab_cat_id || $force) {
// query tab content only in case if not queried or category don't match
- var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'module_path') + '/catalog_tab');
+ var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'view_template'));
$url = $url.replace('#CATEGORY_ID#', $cat_id);
$url = $url.replace('#PREFIX#', $prefix);
Index: branches/RC/kernel/admin_templates/incs/catalog.js
===================================================================
diff -u -r10080 -r10116
--- branches/RC/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 10080)
+++ branches/RC/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 10116)
@@ -6,7 +6,6 @@
this.ParentCategoryID = 0;
this.OnResponceMethod = null;
this.TabShift = isset($tab_shift) ? $tab_shift : 1; // start from 2nd tab (index starting from 0)
-
this.TabRegistry = new Array();
this.ActivePrefix = getCookie(this.CookiePrefix + 'active_prefix');
this.PreviousPrefix = this.ActivePrefix;
@@ -223,7 +222,7 @@
var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id');
if ($cat_id != $tab_cat_id || $force) {
// query tab content only in case if not queried or category don't match
- var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'module_path') + '/catalog_tab');
+ var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'view_template'));
$url = $url.replace('#CATEGORY_ID#', $cat_id);
$url = $url.replace('#PREFIX#', $prefix);
Index: branches/RC/kernel/admin_templates/users/user_edit_items.tpl
===================================================================
diff -u -r10083 -r10116
--- branches/RC/kernel/admin_templates/users/user_edit_items.tpl (.../user_edit_items.tpl) (revision 10083)
+++ branches/RC/kernel/admin_templates/users/user_edit_items.tpl (.../user_edit_items.tpl) (revision 10116)
@@ -26,11 +26,16 @@
/*Catalog.prototype.refreshTab = function($prefix, $div_id, $force) {
// query tab content only in case if not queried or category don't match
- var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'module_path') + '/user_item_tab');
- this.BusyRequest[$prefix] = false;
+ var $cat_id = get_hidden_field('m_cat_id');
+ var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id');
+ if ($cat_id != $tab_cat_id || $force) {
+ var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'module_path') + '/user_item_tab');
- Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this);
+ this.BusyRequest[$prefix] = false;
+
+ Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this);
+ }
}*/
var $Catalog = new Catalog('
+