Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r11523 -r11525 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11523) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11525) @@ -594,16 +594,25 @@ $tab_prefixes = $this->Application->GetVar('tp'); // {all, , none} if ($tab_prefixes === false) $tab_prefixes = 'all'; $skip_prefixes = isset($params['skip_prefixes']) && $params['skip_prefixes'] ? explode(',', $params['skip_prefixes']) : Array(); + $replace_main = isset($params['replace_m']) && $params['replace_m']; // get all prefixes available $prefixes = Array(); foreach ($this->Application->ModuleInfo as $module_name => $module_data) { - if ($module_data['Var'] == 'm' || $module_data['Var'] == 'adm') continue; - $prefixes[] = $module_data['Var']; + $prefix = $module_data['Var']; + + if ($prefix == 'adm'/* || $prefix == 'm'*/) continue; + + if ($prefix == 'm' && $replace_main) { + $prefix = 'c'; + } + + $prefixes[] = $prefix; } if ($tab_prefixes == 'none') { $skip_prefixes = array_unique(array_merge($skip_prefixes, $prefixes)); + unset($skip_prefixes[ array_search($replace_main ? 'c' : 'm', $skip_prefixes) ]); } elseif ($tab_prefixes != 'all') { // prefix list here @@ -974,7 +983,9 @@ if ($category_path === false) { // not chached if ($category_id > 0) { - $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $object->GetField('CachedNavbar')), ' > '); + $cached_navbar = preg_replace('/^Content&\|&/i', '', $object->GetField('CachedNavbar')); + + $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $cached_navbar), ' > '); } else { $category_path = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') ); Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r11405 -r11525 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11405) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11525) @@ -418,13 +418,14 @@ foreach ($this->Application->ModuleInfo as $module_name => $module_info) { $prefix = $module_info['Var']; - if (in_array($prefix, $skip_prefixes) || !$this->Application->prefixRegistred($prefix) || !$this->Application->getUnitOption($prefix, 'CatalogItem')) { - continue; - } if ($prefix == 'm' && $replace_main) { $prefix = 'c'; } + if (in_array($prefix, $skip_prefixes) || !$this->Application->prefixRegistred($prefix) || !$this->Application->getUnitOption($prefix, 'CatalogItem')) { + continue; + } + $icon = $this->Application->getUnitOption($prefix, 'CatalogTabIcon'); if (strpos($icon, ':') !== false) { list ($icon_module, $icon) = explode(':', $icon, 2); @@ -458,6 +459,7 @@ } $params['t'] = 'catalog/item_selector/item_selector_'.$mode; + $params['m_cat_id'] = $this->Application->findModule('Name', 'Proj-CMS', 'RootCat'); $default_params = Array('no_amp' => 1, 'pass' => 'all,'.$params['prefix']); unset($params['prefix']); Index: branches/RC/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl =================================================================== diff -u -N -r11368 -r11525 --- branches/RC/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 11368) +++ branches/RC/core/admin_templates/catalog/item_selector/item_selector_catalog.tpl (.../item_selector_catalog.tpl) (revision 11525) @@ -1,7 +1,7 @@ - + @@ -28,7 +28,7 @@ - + Index: branches/RC/core/admin_templates/js/script.js =================================================================== diff -u -N -r11495 -r11525 --- branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 11495) +++ branches/RC/core/admin_templates/js/script.js (.../script.js) (revision 11525) @@ -557,7 +557,12 @@ // get template name from url var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(m[^:]+)'); $regex = $regex.exec($url); + var $t = $regex[3]; + if ($regex[4].match(/^m([\d]+)-/)) { + // remember category from url + $additional['m_cat_id'] = RegExp.$1; + } // substitute form action with selector's url var $kf = document.getElementById($form_name); @@ -1568,28 +1573,26 @@ Application.setHook('m:OnAfterWindowLoad', func); } -function replaceFireBug($load) { - if (!isset($load)) { - $load = true; - } - +function replaceFireBug() { if (window.console === undefined || !console.firebug) { - if ($load && $.isFunction(window.loadFirebugConsole)) { - window.loadFirebugConsole(); - return replaceFireBug(false); - } - var names = [ 'log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml', 'group', 'groupEnd', 'time', 'timeEnd', 'count', 'trace', 'profile', 'profileEnd' ]; - window.console = {}; - for (var i = 0; i < names.length; ++i) { - window.console[names[i]] = function($msg) { - alert('FireBug console object methods are not available outside Firefox!' + "\n" + $msg); - } + if (window.top.console !== undefined || window.top.firebug) { + // console is not defined in iframes, so define it here + window.console = window.top.console; } + else { + window.console = {}; + + for (var i = 0; i < names.length; ++i) { + window.console[names[i]] = function($msg) { + alert('FireBug console object methods are not available outside Firefox!' + "\n" + $msg); + } + } + } } } function runOnChange(elId) { @@ -1649,7 +1652,7 @@ function getWindowOpener($window) { // use this intead of "window.opener" - if ($window.name == 'main') { + if ($window.name == 'main' || $window.name == 'main_frame') { return null; } Index: branches/RC/core/admin_templates/catalog_tab.tpl =================================================================== diff -u -N -r11495 -r11525 --- branches/RC/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 11495) +++ branches/RC/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 11525) @@ -58,7 +58,7 @@
- + : ">
Index: branches/RC/core/admin_templates/catalog/catalog.tpl =================================================================== diff -u -N -r11495 -r11525 --- branches/RC/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 11495) +++ branches/RC/core/admin_templates/catalog/catalog.tpl (.../catalog.tpl) (revision 11525) @@ -44,7 +44,7 @@ 'homecat', '', function() { - $Catalog.go_to_cat(0); + $Catalog.go_to_cat(); } ) ); Index: branches/RC/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r11410 -r11525 --- branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 11410) +++ branches/RC/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 11525) @@ -653,7 +653,10 @@ $ret = ''; $block_params = array_merge($params, Array('is_silent' => 2)); // don't make fatal errors in case if template is missing $current_template = $this->Application->GetVar('t'); + + $replace_main = isset($params['replace_m']) && $params['replace_m']; $skip_prefixes = isset($params['skip_prefixes']) ? explode(',', $params['skip_prefixes']) : Array(); + foreach ($this->Application->ModuleInfo as $module_name => $module_data) { $module_key = mb_strtolower($module_name); @@ -671,14 +674,24 @@ } $block_params['t'] = $module_prefix.$this->SelectParam($params, $module_key.'_template,'.$module_key.'_t,template,t'); - if ($block_params['t'] == $current_template || in_array($module_data['Var'], $skip_prefixes)) continue; + $check_prefix = $module_data['Var']; + + if ($check_prefix == 'adm' && $replace_main) { + $check_prefix = 'c'; + } + + if ($block_params['t'] == $current_template || in_array($check_prefix, $skip_prefixes)) { + continue; + } + $no_data = $this->SelectParam($params, $module_key.'_block_no_data,block_no_data'); if ($no_data) { $block_params['block_no_data'] = $module_prefix.'/'.$no_data; } $ret .= $this->MyInclude($block_params); } + return $ret; } Index: branches/RC/core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl =================================================================== diff -u -N -r11395 -r11525 --- branches/RC/core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl (.../item_selector_advanced_view.tpl) (revision 11395) +++ branches/RC/core/admin_templates/catalog/item_selector/item_selector_advanced_view.tpl (.../item_selector_advanced_view.tpl) (revision 11525) @@ -1,7 +1,7 @@ - + @@ -31,12 +31,15 @@ - + - + + + + + -