Index: trunk/core/kernel/session/session.php
===================================================================
diff -u -r5013 -r5024
--- trunk/core/kernel/session/session.php (.../session.php) (revision 5013)
+++ trunk/core/kernel/session/session.php (.../session.php) (revision 5024)
@@ -680,18 +680,22 @@
function SaveData()
{
if (!$this->Application->GetVar('skip_last_template') && $this->Application->GetVar('ajax') != 'yes') {
- $t = $this->Application->GetVar('t');
- $last_env = $this->Application->BuildEnv($t, Array('m_opener' => 'u', '__URLENCODE__' => 1), 'all');
- $last_template = basename($_SERVER['PHP_SELF']).'|';
- $last_template .= substr($last_env, strlen(ENV_VAR_NAME) + 1);
- $this->StoreVar('last_template', $last_template);
- $this->StoreVar('last_env', substr($this->Application->BuildEnv($t, Array('pass'=>'all', '__URLENCODE__' => 1)), strlen(ENV_VAR_NAME)+1));
+ $this->SaveLastTemplate( $this->Application->GetVar('t') );
}
$this->PrintSession('after save');
$this->Storage->SaveData($this);
}
+ function SaveLastTemplate($t)
+ {
+ $last_env = $this->Application->BuildEnv($t, Array('m_opener' => 'u', '__URLENCODE__' => 1), 'all');
+ $last_template = basename($_SERVER['PHP_SELF']).'|'.substr($last_env, strlen(ENV_VAR_NAME) + 1);
+ $this->StoreVar('last_template', $last_template);
+
+ $this->StoreVar('last_env', substr($this->Application->BuildEnv($t, Array('__URLENCODE__' => 1), 'all'), strlen(ENV_VAR_NAME)+1));
+ }
+
function StoreVar($name, $value)
{
$this->Data->Set($name, $value);
Index: trunk/core/admin_templates/js/catalog.js
===================================================================
diff -u -r5022 -r5024
--- trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5022)
+++ trunk/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5024)
@@ -69,6 +69,11 @@
// sets new category to kernel_form in case if item tab
// loads faster and will check if it's category is same
// as parent category of categories list
+
+ if (get_hidden_field('m_cat_id') == $cat_id) {
+ // it's the same category, then don't reload category list
+ return true;
+ }
set_hidden_field('m_cat_id', $cat_id);
}
Index: trunk/core/kernel/application.php
===================================================================
diff -u -r5018 -r5024
--- trunk/core/kernel/application.php (.../application.php) (revision 5018)
+++ trunk/core/kernel/application.php (.../application.php) (revision 5024)
@@ -125,7 +125,7 @@
/**
* Holds a reference to Session
*
- * @var kSession
+ * @var Session
*/
var $Session = null;
Index: trunk/kernel/admin_templates/incs/catalog.js
===================================================================
diff -u -r5022 -r5024
--- trunk/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5022)
+++ trunk/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5024)
@@ -69,6 +69,11 @@
// sets new category to kernel_form in case if item tab
// loads faster and will check if it's category is same
// as parent category of categories list
+
+ if (get_hidden_field('m_cat_id') == $cat_id) {
+ // it's the same category, then don't reload category list
+ return true;
+ }
set_hidden_field('m_cat_id', $cat_id);
}
Index: trunk/kernel/admin_templates/xml/categories_list.tpl
===================================================================
diff -u -r5022 -r5024
--- trunk/kernel/admin_templates/xml/categories_list.tpl (.../categories_list.tpl) (revision 5022)
+++ trunk/kernel/admin_templates/xml/categories_list.tpl (.../categories_list.tpl) (revision 5024)
@@ -36,6 +36,7 @@
a_toolbar.EnableButton('homecat');
#separator#
+