Index: branches/5.3.x/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl
===================================================================
diff -u -r15974 -r16229
--- branches/5.3.x/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 15974)
+++ branches/5.3.x/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 16229)
@@ -15,7 +15,7 @@
"/>
@@ -41,4 +41,4 @@
);
-
\ No newline at end of file
+
Index: branches/5.3.x/core/admin_templates/users/user_edit_items.tpl
===================================================================
diff -u -r15974 -r16229
--- branches/5.3.x/core/admin_templates/users/user_edit_items.tpl (.../user_edit_items.tpl) (revision 15974)
+++ branches/5.3.x/core/admin_templates/users/user_edit_items.tpl (.../user_edit_items.tpl) (revision 16229)
@@ -42,7 +42,7 @@
}
}*/
- var $Catalog = new Catalog('', 'useritems_', 'UserItemEditor');
+ var $Catalog = new Catalog('', 'useritems_', 'UserItemEditor');
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '', function() {
@@ -167,4 +167,4 @@
);
-
\ No newline at end of file
+
Index: branches/5.3.x/core/admin_templates/catalog/advanced_view.tpl
===================================================================
diff -u -r15974 -r16229
--- branches/5.3.x/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 15974)
+++ branches/5.3.x/core/admin_templates/catalog/advanced_view.tpl (.../advanced_view.tpl) (revision 16229)
@@ -38,7 +38,7 @@
this.switchTab();
}
- var $Catalog = new Catalog('', 'advanced_view_', 'AdvancedView');
+ var $Catalog = new Catalog('', 'advanced_view_', 'AdvancedView');
var a_toolbar = new ToolBar();
@@ -146,4 +146,4 @@
);
-
\ No newline at end of file
+
Index: branches/5.3.x/core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl
===================================================================
diff -u -r15974 -r16229
--- branches/5.3.x/core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl (.../item_selector_advanced_view.tpl) (revision 15974)
+++ branches/5.3.x/core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl (.../item_selector_advanced_view.tpl) (revision 16229)
@@ -21,7 +21,7 @@
this.switchTab();
}
- var $Catalog = new Catalog('', 'is_advanced_view_', 'ItemSelectorAdvancedView');
+ var $Catalog = new Catalog('', 'is_advanced_view_', 'ItemSelectorAdvancedView');
@@ -51,4 +51,4 @@
);
-
\ No newline at end of file
+
Index: branches/5.3.x/core/admin_templates/reviews/reviews.tpl
===================================================================
diff -u -r15974 -r16229
--- branches/5.3.x/core/admin_templates/reviews/reviews.tpl (.../reviews.tpl) (revision 15974)
+++ branches/5.3.x/core/admin_templates/reviews/reviews.tpl (.../reviews.tpl) (revision 16229)
@@ -41,7 +41,7 @@
}
}
- var $Catalog = new Catalog('', 'reviews_', 'Reviews');
+ var $Catalog = new Catalog('', 'reviews_', 'Reviews');
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('edit', '', edit) );
@@ -84,7 +84,7 @@
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
- $kf.action = '' . replace('#PREFIX#', $Catalog.ActivePrefix);
+ $kf.action = '' . replace('#PREFIX#', $Catalog.ActivePrefix);
std_edit_temp_item(
$Catalog.ActivePrefix, 'reviews/review_direct_edit',
@@ -120,4 +120,4 @@
);
-
\ No newline at end of file
+
Index: branches/5.3.x/core/units/admin/admin_tag_processor.php
===================================================================
diff -u -r15974 -r16229
--- branches/5.3.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 15974)
+++ branches/5.3.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 16229)
@@ -1,6 +1,6 @@
SelectParam($params, 't,template');
+
+ if ( !$template ) {
+ $mode = 'catalog';
+
+ // {catalog, advanced_view}
+ if ( isset($params['mode']) ) {
+ $mode = $params['mode'];
+ unset($params['mode']);
+ }
+
+ $params['t'] = 'catalog/item_selector/item_selector_' . $mode;
}
- $params['t'] = 'catalog/item_selector/item_selector_'.$mode;
- $params['m_cat_id'] = $this->Application->getBaseCategory();
+ if ( !isset($params['m_cat_id']) ) {
+ $params['m_cat_id'] = $this->Application->getBaseCategory();
+ }
- $default_params = Array('pass' => 'all,'.$params['prefix']);
- unset($params['prefix']);
+ $default_params = array('pass' => 'all');
- $pass_through = Array();
- if (isset($params['tabs_dependant'])) { // {yes, no}
- $pass_through['td'] = $params['tabs_dependant'];
+ if ( isset($params['prefix']) && $params['prefix'] ) {
+ $default_params['pass'] .= ',' . $params['prefix'];
+ unset($params['prefix']);
+ }
+
+ $pass_through = $this->Application->GetVar('pass_through', '');
+
+ if ( isset($params['pass_through']) && $params['pass_through'] ) {
+ $pass_through .= ',' . $params['pass_through'];
+ }
+
+ $pass_through = array_filter(explode(',', $pass_through));
+
+ // {yes, no}
+ if ( isset($params['tabs_dependant']) ) {
+ $params['td'] = $params['tabs_dependant'];
+ $pass_through[] = 'td';
unset($params['tabs_dependant']);
}
- if (isset($params['selection_mode'])) { // {single, multi}
- $pass_through['tm'] = $params['selection_mode'];
+ // {single, multi}
+ if ( isset($params['selection_mode']) ) {
+ $params['tm'] = $params['selection_mode'];
+ $pass_through[] = 'tm';
unset($params['selection_mode']);
}
- if (isset($params['tab_prefixes'])) { // {all, none, }
- $pass_through['tp'] = $params['tab_prefixes'];
+ // {all, none, }
+ if ( isset($params['tab_prefixes']) ) {
+ $params['tp'] = $params['tab_prefixes'];
+ $pass_through[] = 'tp';
unset($params['tab_prefixes']);
}
- if ($pass_through) {
- // add pass_through to selector url if any
- $params['pass_through'] = implode(',', array_keys($pass_through));
- $params = array_merge($params, $pass_through);
+ if ( $pass_through ) {
+ // Add pass_through to selector url if any.
+ $params['pass_through'] = implode(',', array_unique($pass_through));
}
// user can override default parameters (except pass_through of course)
$params = array_merge($default_params, $params);
- return $this->Application->ProcessParsedTag('m', 'T', $params);
+ return $this->Application->ProcessParsedTag('m', 'T', $params);
}
function TimeFrame($params)
@@ -1193,4 +1219,4 @@
return $this->Application->ParseBlock($block_params);
}
- }
\ No newline at end of file
+ }