Index: branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5833) @@ -1587,41 +1587,6 @@ } /** - * Saves selected category as new import category - * - * @param kEvent $event - */ - function OnSelectItems(&$event) - { - $dst_field = $this->Application->RecallVar('dst_field'); - $items_info = $this->Application->GetVar('c'); - if ($items_info) { - $category_id = array_shift( array_keys($items_info) ); - $sql = 'SELECT CategoryId - FROM '.TABLE_PREFIX.'Category - WHERE ResourceId = '.$category_id; - $category_id = $this->Conn->GetOne($sql); - } - else { - $category_id = 0; - } - - if ($dst_field == 'ImportCategory') { - $this->Application->StoreVar('ImportCategory', $category_id); - $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh - - $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); - $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); - - $passed = $this->Application->GetVar('passed'); - $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); - $event->setEventParam('pass_events', true); - } - - $this->finalizePopup($event); - } - - /** * Process items selected in item_selector * * @param kEvent $event @@ -1633,13 +1598,27 @@ $dst_field = $this->Application->RecallVar('dst_field'); if ($dst_field == 'ItemCategory') { + // Item Edit -> Categories Tab -> New Categories $object =& $event->getObject(); $category_ids = explode(',', $selected_ids['c']); foreach ($category_ids as $category_id) { $object->assignToCategory($category_id); } } + + if ($dst_field == 'ImportCategory') { + // Tools -> Import -> Item Import -> Select Import Category + $this->Application->StoreVar('ImportCategory', $selected_ids['c']); + $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh + $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); + $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); + + $passed = $this->Application->GetVar('passed'); + $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); + $event->setEventParam('pass_events', true); + } + $this->finalizePopup($event); } Index: branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php =================================================================== diff -u -r5795 -r5833 --- branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5795) +++ branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5833) @@ -490,7 +490,7 @@ elseif ($tab_prefixes != 'all') { // prefix list here $tab_prefixes = explode(',', $tab_prefixes); // list of prefixes that should stay - $skip_prefixes = array_diff($prefixes, $tab_prefixes); + $skip_prefixes = array_unique(array_merge($skip_prefixes, array_diff($prefixes, $tab_prefixes))); } $params['name'] = $params['render_as']; Index: branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5833) @@ -1587,41 +1587,6 @@ } /** - * Saves selected category as new import category - * - * @param kEvent $event - */ - function OnSelectItems(&$event) - { - $dst_field = $this->Application->RecallVar('dst_field'); - $items_info = $this->Application->GetVar('c'); - if ($items_info) { - $category_id = array_shift( array_keys($items_info) ); - $sql = 'SELECT CategoryId - FROM '.TABLE_PREFIX.'Category - WHERE ResourceId = '.$category_id; - $category_id = $this->Conn->GetOne($sql); - } - else { - $category_id = 0; - } - - if ($dst_field == 'ImportCategory') { - $this->Application->StoreVar('ImportCategory', $category_id); - $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh - - $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); - $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); - - $passed = $this->Application->GetVar('passed'); - $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); - $event->setEventParam('pass_events', true); - } - - $this->finalizePopup($event); - } - - /** * Process items selected in item_selector * * @param kEvent $event @@ -1633,13 +1598,27 @@ $dst_field = $this->Application->RecallVar('dst_field'); if ($dst_field == 'ItemCategory') { + // Item Edit -> Categories Tab -> New Categories $object =& $event->getObject(); $category_ids = explode(',', $selected_ids['c']); foreach ($category_ids as $category_id) { $object->assignToCategory($category_id); } } + + if ($dst_field == 'ImportCategory') { + // Tools -> Import -> Item Import -> Select Import Category + $this->Application->StoreVar('ImportCategory', $selected_ids['c']); + $this->Application->StoreVar($event->getPrefixSpecial().'_ForceNotValid', 1); // not to loose import/export values on form refresh + $this->Application->SetVar($event->getPrefixSpecial().'_id', 0); + $this->Application->SetVar($event->getPrefixSpecial().'_event', 'OnExportBegin'); + + $passed = $this->Application->GetVar('passed'); + $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); + $event->setEventParam('pass_events', true); + } + $this->finalizePopup($event); } Index: branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r5795 -r5833 --- branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5795) +++ branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5833) @@ -490,7 +490,7 @@ elseif ($tab_prefixes != 'all') { // prefix list here $tab_prefixes = explode(',', $tab_prefixes); // list of prefixes that should stay - $skip_prefixes = array_diff($prefixes, $tab_prefixes); + $skip_prefixes = array_unique(array_merge($skip_prefixes, array_diff($prefixes, $tab_prefixes))); } $params['name'] = $params['render_as']; Index: branches/unlabeled/unlabeled-1.24.2/kernel/units/admin/admin_tag_processor.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.24.2/kernel/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.24.2/kernel/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5833) @@ -386,7 +386,7 @@ function SelectorLink($params) { $mode = 'catalog'; - if (isset($params['mode'])) { + if (isset($params['mode'])) { // {catalog, advanced_view} $mode = $params['mode']; unset($params['mode']); } Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/img/toolbar/tool_new_link_f2.gif =================================================================== diff -u -r5187 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/img/toolbar/tool_new_link_f3.gif =================================================================== diff -u -r5187 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.24.2/core/units/admin/admin_tag_processor.php =================================================================== diff -u -r5820 -r5833 --- branches/unlabeled/unlabeled-1.24.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5820) +++ branches/unlabeled/unlabeled-1.24.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5833) @@ -386,7 +386,7 @@ function SelectorLink($params) { $mode = 'catalog'; - if (isset($params['mode'])) { + if (isset($params['mode'])) { // {catalog, advanced_view} $mode = $params['mode']; unset($params['mode']); } Index: branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl =================================================================== diff -u -r5566 -r5833 --- branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl (.../index.tpl) (revision 5566) +++ branches/unlabeled/unlabeled-1.7.2/kernel/admin_templates/index.tpl (.../index.tpl) (revision 5833) @@ -38,10 +38,10 @@ - " name="head" scrolling="no" noresize> + " name="head" scrolling="no" noresize> - " name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0"> - " name="main" marginwidth="0" marginheight="0" frameborder="no" noresize scrolling="auto"> + " name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0"> + " name="main" marginwidth="0" marginheight="0" frameborder="no" noresize scrolling="auto"> Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/img/toolbar/tool_new_link.gif =================================================================== diff -u -r5187 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.8.2/kernel/units/general/helpers/sections_helper.php =================================================================== diff -u -r5552 -r5833 --- branches/unlabeled/unlabeled-1.8.2/kernel/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 5552) +++ branches/unlabeled/unlabeled-1.8.2/kernel/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 5833) @@ -59,7 +59,7 @@ // we could also skip not allowed sections here in future $section_params['SectionPrefix'] = $prefix; $section_params['url']['m_opener'] = 'r'; - + $section_params['url']['no_pass_through'] = 1; $pass_section = getArrayValue($section_params, 'url', 'pass_section'); if ($pass_section) { Index: branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/config/config_general.tpl =================================================================== diff -u -r5814 -r5833 --- branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 5814) +++ branches/unlabeled/unlabeled-1.4.2/kernel/admin_templates/config/config_general.tpl (.../config_general.tpl) (revision 5833) @@ -113,7 +113,7 @@ <b><inp2:conf_CategoryPath separator=" &gt; " render_as="category_caption" /></b> <input type="hidden" name="conf[ModuleRootCategory][VariableValue]" value="<inp2:conf_ModuleRootCategory/>"/> - <a href="javascript:openSelector('conf', '<inp2:adm_SelectorLink prefix="conf" mode="catalog" selection_mode="single" tab_prefixes="none"/>', 'ModuleRootCategory', '950x600');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a> + <a href="javascript:openSelector('conf', '<inp2:adm_SelectorLink prefix="conf" selection_mode="single" tab_prefixes="none"/>', 'ModuleRootCategory', '950x600');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a> </td> <td class="error">&nbsp;</td> </tr> Index: branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/sections_helper.php =================================================================== diff -u -r5552 -r5833 --- branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 5552) +++ branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 5833) @@ -59,7 +59,7 @@ // we could also skip not allowed sections here in future $section_params['SectionPrefix'] = $prefix; $section_params['url']['m_opener'] = 'r'; - + $section_params['url']['no_pass_through'] = 1; $pass_section = getArrayValue($section_params, 'url', 'pass_section'); if ($pass_section) { Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/categories/categories_edit_relations.tpl =================================================================== diff -u -r5814 -r5833 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/categories/categories_edit_relations.tpl (.../categories_edit_relations.tpl) (revision 5814) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/categories/categories_edit_relations.tpl (.../categories_edit_relations.tpl) (revision 5833) @@ -40,7 +40,7 @@ //Relations related: a_toolbar.AddButton( new ToolBarButton('new_relation', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>', function() { - openSelector('c-rel', '<inp2:adm_SelectorLink prefix="c-rel" mode="catalog" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600'); + openSelector('c-rel', '<inp2:adm_SelectorLink prefix="c-rel" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600'); } ) ); function edit() Index: branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/categories/categories_edit_relations.tpl =================================================================== diff -u -r5814 -r5833 --- branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/categories/categories_edit_relations.tpl (.../categories_edit_relations.tpl) (revision 5814) +++ branches/unlabeled/unlabeled-1.1.2/kernel/admin_templates/categories/categories_edit_relations.tpl (.../categories_edit_relations.tpl) (revision 5833) @@ -40,7 +40,7 @@ //Relations related: a_toolbar.AddButton( new ToolBarButton('new_relation', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>', function() { - openSelector('c-rel', '<inp2:adm_SelectorLink prefix="c-rel" mode="catalog" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600'); + openSelector('c-rel', '<inp2:adm_SelectorLink prefix="c-rel" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600'); } ) ); function edit() Index: branches/unlabeled/unlabeled-1.2.52/kernel/admin_templates/img/toolbar/tool_new_listing_f2.gif =================================================================== diff -u -r1571 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.2.52/kernel/admin_templates/img/toolbar/tool_new_listing_type.gif =================================================================== diff -u -r1571 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.2.52/kernel/admin_templates/img/toolbar/tool_new_listing.gif =================================================================== diff -u -r1571 -r5833 Binary files differ Index: branches/unlabeled/unlabeled-1.2.52/kernel/admin_templates/img/toolbar/tool_new_listing_type_f2.gif =================================================================== diff -u -r1571 -r5833 Binary files differ