Index: trunk/core/admin_templates/js/script.js =================================================================== diff -u -N -r8061 -r8082 --- trunk/core/admin_templates/js/script.js (.../script.js) (revision 8061) +++ trunk/core/admin_templates/js/script.js (.../script.js) (revision 8082) @@ -13,7 +13,7 @@ var submitted = false; var $edit_mode = false; var $init_made = true; // in case of double inclusion of script.js :) - + // hook processing var hBEFORE = 1; // this is const, but including this twice causes errors var hAFTER = 2; // this is const, but including this twice causes errors @@ -442,7 +442,6 @@ submit_event($prefix_special, $event, $t); opener_action($prev_opener); // restore opener in parent window set_hidden_field('events[' + $prefix_special + ']', event_bak); // restore event - set_hidden_field($prefix_special+'_mode', mode_bak) } function openSelector($prefix, $url, $dst_field, $window_size, $event) @@ -505,6 +504,7 @@ opener_action('d'); submit_event(prefix_special,'OnPreCreate', edit_template); } + set_hidden_field(prefix_special+'_mode', ''); } function std_new_item(prefix_special, edit_template) @@ -518,10 +518,8 @@ } } -var mode_bak = null; function std_edit_item(prefix_special, edit_template) { - mode_bak = get_hidden_field(prefix_special+'_mode'); set_hidden_field(prefix_special+'_mode', 't'); if (use_popups(prefix_special, 'OnEdit')) { open_popup(prefix_special, 'OnEdit', edit_template); @@ -530,6 +528,7 @@ opener_action('d'); submit_event(prefix_special,'OnEdit',edit_template); } + set_hidden_field(prefix_special+'_mode', ''); } function std_edit_temp_item(prefix_special, edit_template) Index: trunk/core/units/categories/categories_config.php =================================================================== diff -u -N -r8015 -r8082 --- trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 8015) +++ trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 8082) @@ -236,8 +236,8 @@ 'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null), 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0), 'ResourceId' => Array('type' => 'int', 'default' => null), - 'ParentPath' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'NamedParentPath' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ParentPath' => Array('type' => 'string', 'default' => null), + 'NamedParentPath' => Array('type' => 'string', 'default' => null), 'MetaDescription' => Array('type' => 'string', 'default' => null), 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), Index: trunk/core/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -N -r8070 -r8082 --- trunk/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 8070) +++ trunk/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 8082) @@ -94,7 +94,7 @@ Toolbars['_search'].Render(document.getElementById('search_buttons[]')); - + ','', );" class="columntitle_small">.gif" border="0" align="absmiddle"> @@ -419,16 +419,17 @@ - + Grids[''] = new Grid('', '', ':original', edit, a_toolbar); Grids[''].AddItemsByIdMask('', /^_([\d\w-]+)/, '[$$ID$$][]'); Grids[''].InitItems(); - - - $ViewMenus = new Array(''); + + + $ViewMenus = new Array(''); + Index: trunk/core/admin_templates/js/grid.js =================================================================== diff -u -N -r7932 -r8082 --- trunk/core/admin_templates/js/grid.js (.../grid.js) (revision 7932) +++ trunk/core/admin_templates/js/grid.js (.../grid.js) (revision 8082) @@ -381,6 +381,15 @@ return $ret; } +Grid.prototype.SetSelected = function($ids) { + $ids = $ids.split(','); + for (var i in this.Items) { + if (in_array(this.Items[i].ItemId, $ids)) { + this.Items[i].Select(); + } + } +} + Grid.prototype.InvertSelection = function() { for (var i in this.Items) {