Index: branches/1.1.x/units/widgets/widgets_config.php =================================================================== diff -u -N -r13472 -r13546 --- branches/1.1.x/units/widgets/widgets_config.php (.../widgets_config.php) (revision 13472) +++ branches/1.1.x/units/widgets/widgets_config.php (.../widgets_config.php) (revision 13546) @@ -9,12 +9,12 @@ defined('FULL_PATH') or die('restricted access!'); - $config = Array( + $config = Array ( 'Prefix' => 'widget', 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file'=> '', 'build_event' => 'OnListBuild'), + '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'), @@ -71,18 +71,16 @@ ), ), + 'PermSection' => Array ('main' => 'custom:widgets'), - - 'PermSection' => Array('main' => 'custom:widgets'), - 'Sections' => Array ( 'custom:widgets' => Array ( 'parent' => 'custom', 'icon' => 'custom', 'label' => 'la_tab_Widgets', 'url' => Array ('t' => 'custom/widgets/widget_list', 'pass' => 'm'), 'permissions' => Array ('view', 'add', 'edit', 'delete'), - 'priority' => 1, + 'priority' => 1, 'type' => stTREE, ), ), @@ -110,17 +108,24 @@ 'VirtualFields' => Array ( 'VirtualActionField' => Array ('type' => 'string', 'default' => ''), ), - + 'Fields' => Array ( 'WidgetId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Title' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => true, 'max_len' => 255), - 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'Email' => Array( + 'Title' => Array ( + 'type' => 'string', 'max_len' => 255, + 'required' => 1, 'default' => '', 'not_null' => 1, + ), + 'Description' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'using_fck' => 1, + 'default' => null, + ), + 'Email' => Array ( 'type' => 'string', 'formatter' => 'kFormatter', - 'regexp'=> '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', + 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => 1, 'default' => '', - 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') + 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'), ), 'Type' => Array ( 'type' => 'int', @@ -134,40 +139,46 @@ 'required' => 1, ), 'Phone' => Array ( - 'type' => 'string', 'formatter' => 'kFormatter', + 'type' => 'string', + 'formatter' => 'kFormatter', 'default' => '', 'using_fck' => 1, 'not_null' => 1), - 'Qty' => Array ('type' => 'double', 'required' => 0, 'not_null' => 1, 'default' => 0), + 'Qty' => Array ( + 'type' => 'double', + 'required' => 0, 'not_null' => 1, 'default' => 0 + ), '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, ), 'CreatedOn' => Array ( - 'type' => 'int', 'formatter' => 'kDateFormatter', - 'time_format' => '', 'input_time_format' => '', 'default'=>'#NOW#'), - + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'time_format' => '', 'input_time_format' => '', + 'default' => '#NOW#', + ), 'Good' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', - 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), + 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ), 'BirthTime' => Array ( 'type' => 'int', 'formatter' => 'kDateFormatter', 'date_format' => '', 'input_date_format' => '', 'default' => null ), - 'Image' => Array( + 'Image' => Array ( 'type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, // in Bytes ! - 'file_types' => '*.jpg;*.gif;*.png', 'files_description'=>'!la_hint_ImageFiles!', + 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!', 'upload_dir' => '/system/user_files/', // relative to project's home 'as_image' => true, 'thumb_width' => 100, 'thumb_height' => 100, 'multiple' => false, // false or max number of files - will be stored as serialized array of paths 'direct_links' => false, // use direct file urls or send files through wrapper (requires mod_mime_magic) 'required' => 1, 'default' => null ), - 'DataFile' => Array( - 'type' => 'string', 'formatter'=>'kUploadFormatter', + 'DataFile' => Array ( + 'type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, // in Bytes ! 'file_types' => '*.*', 'files_description' => '!la_hint_AllFiles!',