Index: branches/RC/core/units/custom_fields/custom_fields_config.php =================================================================== diff -u -N -r10913 -r10961 --- branches/RC/core/units/custom_fields/custom_fields_config.php (.../custom_fields_config.php) (revision 10913) +++ branches/RC/core/units/custom_fields/custom_fields_config.php (.../custom_fields_config.php) (revision 10961) @@ -30,6 +30,7 @@ ), 'IDField' => 'CustomFieldId', + 'OrderField' => 'DisplayOrder', 'TitleField' => 'FieldName', // field, used in bluebar when editing existing item @@ -91,7 +92,7 @@ 'OriginalValue' => Array('type' => 'string', 'default' => ''), 'Error' => Array('type' => 'string', 'default' => ''), 'DirectOptions' => Array('type' => 'string', 'default' => ''), - + 'SortValues' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r10868 -r10961 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 10868) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 10961) @@ -1592,7 +1592,12 @@ if ($ids) { $status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') ); + $order_field = $this->Application->getUnitOption($event->Prefix,'OrderField'); + if (!$order_field) { + $order_field = 'Priority'; + } + foreach ($ids as $id) { $object->Load($id); @@ -1606,11 +1611,11 @@ break; case 'OnMassMoveUp': - $object->SetDBField('Priority', $object->GetDBField('Priority') + 1); + $object->SetDBField('Priority', $object->GetDBField($order_field) + 1); break; case 'OnMassMoveDown': - $object->SetDBField('Priority', $object->GetDBField('Priority') - 1); + $object->SetDBField('Priority', $object->GetDBField($order_field) - 1); break; } Index: branches/RC/core/admin_templates/custom_fields/custom_fields_list.tpl =================================================================== diff -u -N -r8929 -r10961 --- branches/RC/core/admin_templates/custom_fields/custom_fields_list.tpl (.../custom_fields_list.tpl) (revision 8929) +++ branches/RC/core/admin_templates/custom_fields/custom_fields_list.tpl (.../custom_fields_list.tpl) (revision 10961) @@ -40,6 +40,19 @@ a_toolbar.AddButton( new ToolBarSeparator('sep2') ); + + a_toolbar.AddButton( new ToolBarButton('move_up', '', function() { + submit_event('cf','OnMassMoveUp'); + } + ) ); + + a_toolbar.AddButton( new ToolBarButton('move_down', '', function() { + submit_event('cf','OnMassMoveDown'); + } + ) ); + + a_toolbar.AddButton( new ToolBarSeparator('sep3') ); + a_toolbar.AddButton( new ToolBarButton('view', '', function() { show_viewmenu(a_toolbar,'view'); } @@ -63,7 +76,7 @@ \ No newline at end of file