Index: branches/1.3.x/units/widgets/widgets_config.php =================================================================== diff -u -N -r15496 -r15653 --- branches/1.3.x/units/widgets/widgets_config.php (.../widgets_config.php) (revision 15496) +++ branches/1.3.x/units/widgets/widgets_config.php (.../widgets_config.php) (revision 15653) @@ -9,14 +9,13 @@ defined('FULL_PATH') or die('restricted access!'); $config = Array ( + 'Prefix' => 'widget', - 'Prefix' => 'widget', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'WidgetEventHandler', 'file' => 'widget_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'WidgetTagProcessor', 'file' => 'widget_tp.php', 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'WidgetEventHandler', 'file' => 'widget_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'WidgetTagProcessor', 'file' => 'widget_tp.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, @@ -38,11 +37,11 @@ 'StatusField' => Array ('Status'), - 'TableName' => TABLE_PREFIX.'Widgets', + 'TableName' => TABLE_PREFIX.'Widgets', /* - 'ForeignKey' => 'ParentId', // field title in TableName, linking record to a parent - 'ParentTableKey' => 'ParentId', // id (or other key) field title in parent's table + 'ForeignKey' => 'ParentId', // field title in TableName, linking record to a parent + 'ParentTableKey' => 'ParentId', // id (or other key) field title in parent's table 'ParentPrefix' => 'parent', 'AutoDelete' => true, // delete these items when parent is being deleted 'AutoClone' => true, // clone these items when parent is being cloned @@ -74,7 +73,7 @@ 'Sections' => Array ( 'custom:widgets' => Array ( - 'parent' => 'custom', + 'parent' => 'custom', 'icon' => 'custom', 'label' => 'la_tab_Widgets', 'url' => Array ('t' => 'custom/widgets/widget_list', 'pass' => 'm'), @@ -84,31 +83,26 @@ ), ), - 'TitleField' => 'Title', // field, used in bluebar when editing existing item + 'TitleField' => 'Title', // field, used in bluebar when editing existing item // Use %1$s for local table name with prefix, %2$s for calculated fields 'ListSQLs' => Array ( // key - special, value - list select sql - '' => 'SELECT %1$s.* %2$s - FROM %1$s', + '' => ' SELECT %1$s.* %2$s + FROM %1$s', ), - 'ItemSQLs' => Array ( - '' => 'SELECT %1$s.* %2$s - FROM %1$s', - ), - - 'ListSortings' => Array ( + 'ListSortings' => Array ( '' => Array ( // 'ForcedSorting' => Array ('Priority' => 'desc'), 'Sorting' => Array ('Title' => 'asc'), ) ), - 'VirtualFields' => Array ( + 'VirtualFields' => Array ( 'VirtualActionField' => Array ('type' => 'string', 'default' => ''), ), - 'Fields' => Array ( + 'Fields' => Array ( 'WidgetId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'Title' => Array ( 'type' => 'string', 'max_len' => 255, @@ -145,7 +139,7 @@ 'type' => 'double', 'required' => 0, 'not_null' => 1, 'default' => 0 ), - 'Status' => Array ( + 'Status' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2, @@ -192,7 +186,7 @@ ), ), - 'Grids' => Array ( + 'Grids' => Array ( 'Default' => Array ( // 'Icons' => Array ('default' => 'icon16_custom.gif'), 'Fields' => Array (