Page MenuHomeIn-Portal Phabricator

custom
No OneTemporary

File Metadata

Created
Sat, Feb 1, 4:56 PM
Index: branches/1.1.x/units/widgets/widgets_config.php
===================================================================
--- branches/1.1.x/units/widgets/widgets_config.php (revision 14528)
+++ branches/1.1.x/units/widgets/widgets_config.php (revision 14529)
@@ -1,217 +1,217 @@
<?php
/**
* Sample config file for widgets
*
* @author dmitrya
* @package Development Kit
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'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'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
// in case, when one method does everything
'RewriteListener' => 'WidgetRewriteListener',
// in case, when building and parsing is done by separate methods
// 'RewriteListener' => Array ('WidgetRewriteBuilder', 'WidgetRewriteParser'),
'IDField' => 'WidgetId',
'StatusField' => Array ('Status'),
'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
'ParentPrefix' => 'parent',
'AutoDelete' => true, // delete these items when parent is being deleted
'AutoClone' => true, // clone these items when parent is being cloned
*/
// used to build editing links in admin grids
'AdminTemplatePath' => 'widgets',
'AdminTemplatePrefix' => 'widget_',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('widget' => '!la_title_AddingWidget!'),
'edit_status_labels' => Array ('widget' => '!la_title_EditingWidget!'),
'new_titlefield' => Array ('widget' => '!la_title_NewWidget!'),
),
'widget_list' => Array (
'prefixes' => Array ('widget_List'), 'format' => '#section_label#',
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'export', 'import', 'view', 'dbl-click',),
),
'widget_edit' => Array (
'prefixes' => Array ('widget'), 'format' => '#widget_status# - #widget_titlefield#',
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'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,
'type' => stTREE,
),
),
'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',
),
'ItemSQLs' => Array (
'' => 'SELECT %1$s.* %2$s
FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
// 'ForcedSorting' => Array ('Priority' => 'desc'),
'Sorting' => Array ('Title' => 'asc'),
)
),
'VirtualFields' => Array (
'VirtualActionField' => Array ('type' => 'string', 'default' => ''),
),
'Fields' => Array (
'WidgetId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'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',
'sample_value' => 'email@domain.com',
'not_null' => 1, 'default' => '',
'error_msgs' => Array ('invalid_format' => '!la_invalid_email!'),
),
'Type' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
1 => 'la_opt_Default',
2 => 'la_opt_Custom',
),
'not_null' => 1,
'default' => 1,
'required' => 1,
),
'Phone' => Array (
'type' => 'string',
'formatter' => 'kFormatter',
'default' => '', 'using_fck' => 1, 'not_null' => 1),
'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#',
),
'Good' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'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 (
'type' => 'string', 'formatter' => 'kUploadFormatter',
'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
'upload_dir' => '/system/user_files/', // relative to project's home
'as_image' => true, 'thumb_format' => 'resize:100x100',
'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',
'max_size' => MAX_UPLOAD_SIZE, // in Bytes !
'file_types' => '*.*',
'files_description' => '!la_hint_AllFiles!',
'upload_dir' => '/system/user_files/', // relative to project's home
'as_image' => false,
'multiple' => 5, // false or max number of files - will be stored as serialized array of paths
'direct_links' => true, // use direct file urls or send files through wrapper (requires mod_mime_magic)
'default' => null
),
),
'Grids' => Array (
'Default' => Array (
// 'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
- 'WidgetId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Title' => Array ('title' => 'la_col_Name', 'data_block' => 'grid_custom_td'),
- 'Image' => Array ('title' => 'la_col_Image', 'data_block' => 'grid_image_td'),
- 'Type' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
- 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
- 'Good' => Array ('title' => 'la_col_Good'),
- 'Qty' => Array ('title' => 'la_col_Qty', 'header_block' => 'grid_column_title_no_sorting', 'filter_block' => 'grid_float_range_filter'),
- 'Email' => Array ('title' => 'la_col_Email'),
- 'Phone' => Array ('title' => 'la_col_Phone'),
- 'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter'),
- 'Description' => Array ('title' => 'la_col_Description'),
- 'VirtualActionField' => Array ('title' => 'la_col_Action', 'data_block' => 'grid_delete_td'),
+ 'WidgetId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Title' => Array ('title' => 'column:la_fld_Name', 'data_block' => 'grid_custom_td'),
+ 'Image' => Array ('data_block' => 'grid_image_td'),
+ 'Type' => Array ('filter_block' => 'grid_options_filter'),
+ 'Status' => Array ('filter_block' => 'grid_options_filter'),
+ 'Good' => Array ('filter_block' => 'grid_like_filter'),
+ 'Qty' => Array ('header_block' => 'grid_column_title_no_sorting', 'filter_block' => 'grid_float_range_filter'),
+ 'Email' => Array ('filter_block' => 'grid_like_filter'),
+ 'Phone' => Array ('filter_block' => 'grid_like_filter'),
+ 'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'),
+ 'Description' => Array ('filter_block' => 'grid_like_filter'),
+ 'VirtualActionField' => Array ('title' => 'column:la_fld_Action', 'data_block' => 'grid_delete_td'),
),
),
),
/*'ConfigMapping' => Array (
'PerPage' => 'Perpage_Widgets',
'ShortListPerPage' => 'Perpage_Widgets_Short',
),*/
);
Index: branches/1.1.x/admin_templates/widgets/widget_edit.tpl
===================================================================
--- branches/1.1.x/admin_templates/widgets/widget_edit.tpl (revision 14528)
+++ branches/1.1.x/admin_templates/widgets/widget_edit.tpl (revision 14529)
@@ -1,91 +1,91 @@
<inp2:adm_SetPopupSize width="750" height="570"/>
<inp2:m_DefaultParam prefix="widget" grid="Default" title_preset="widget_edit" section="custom:widgets" id_field="WidgetId"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="$section" prefix="$prefix" title_preset="$title_preset"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('<inp2:m_Param name="prefix"/>','<inp2:{$prefix}_SaveEvent/>');
}
));
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('<inp2:m_Param name="prefix"/>','OnCancelEdit','<inp2:{$prefix}_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
));
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('<inp2:m_Param name="prefix"/>', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
));
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_PrevId/>');
}
));
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_NextId/>');
}
));
a_toolbar.Render();
<inp2:m_if check="{$prefix}_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="{$prefix}_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="{$prefix}_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>
</td>
</tr>
</tbody>
</table>
<inp2:{$prefix}_SaveWarning name="grid_save_warning"/>
<inp2:{$prefix}_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_Page"/>
<inp2:m_RenderElement name="inp_id_label" prefix="$prefix" field="$id_field" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Title" title="la_fld_Title" style="width: 100px"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="$prefix" field="Good" title="la_fld_Good"/>
- <inp2:m_RenderElement name="inp_edit_fck" prefix="$prefix" field="Description" title="la_fld_Description"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="$prefix" field="Status" title="la_fld_Status"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="$prefix" field="Type" title="la_fld_Type" has_empty="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Title" style="width: 100px"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="$prefix" field="Good"/>
+ <inp2:m_RenderElement name="inp_edit_fck" prefix="$prefix" field="Description"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="$prefix" field="Status"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="$prefix" field="Type" has_empty="1"/>
<!--##
- <inp2:m_RenderElement name="inp_edit_date" prefix="$prefix" field="CreatedOn" title="la_fld_CreatedOn"/>
+ <inp2:m_RenderElement name="inp_edit_date" prefix="$prefix" field="CreatedOn"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="$prefix" field="IsSystem" title="la_fld_IsSystemTemplate" onchange="OnSystemClick()"/>
##-->
- <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Qty" title="la_fld_Qty" style="width: 50px"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="$prefix" field="Phone" title="la_fld_Phone"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Email" title="la_fld_Email" style="width: 200px"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Qty" style="width: 50px"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="$prefix" field="Phone"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Email" style="width: 200px"/>
- <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="$prefix" field="Image" title="la_fld_Image"/>
- <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="$prefix" field="DataFile" title="la_fld_DataFile"/>
+ <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="$prefix" field="Image"/>
+ <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="$prefix" field="DataFile"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/1.1.x/install/english.lang
===================================================================
--- branches/1.1.x/install/english.lang (revision 14528)
+++ branches/1.1.x/install/english.lang (revision 14529)
@@ -1,19 +1,17 @@
-<LANGUAGES>
- <LANGUAGE PackName="English" Encoding="base64"><DATEFORMAT>m/d/Y</DATEFORMAT><TIMEFORMAT>g:i A</TIMEFORMAT><INPUTDATEFORMAT>m/d/Y</INPUTDATEFORMAT><INPUTTIMEFORMAT>g:i:s A</INPUTTIMEFORMAT><DECIMAL>.</DECIMAL><THOUSANDS>,</THOUSANDS><CHARSET>utf-8</CHARSET><UNITSYSTEM>2</UNITSYSTEM>
+<LANGUAGES Version="4">
+ <LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<PHRASES>
- <PHRASE Label="la_col_Good" Module="Custom" Type="1">R29vZA==</PHRASE>
- <PHRASE Label="la_col_Phone" Module="Custom" Type="1">UGhvbmU=</PHRASE>
<PHRASE Label="la_fld_DataFile" Module="Custom" Type="1">RGF0YSBmaWxl</PHRASE>
- <PHRASE Label="la_fld_Good" Module="Custom" Type="1">R29vZA==</PHRASE>
+ <PHRASE Label="la_fld_Good" Module="Custom" Type="1" Column="R29vZA==">R29vZA==</PHRASE>
<PHRASE Label="la_opt_Custom" Module="Custom" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_opt_Default" Module="Custom" Type="1">RGVmYXVsdA==</PHRASE>
<PHRASE Label="la_tab_Widgets" Module="Custom" Type="1">V2lkZ2V0cw==</PHRASE>
<PHRASE Label="la_title_AddingWidget" Module="Custom" Type="1">QWRkaW5nIFdpZGdldA==</PHRASE>
<PHRASE Label="la_title_EditingWidget" Module="Custom" Type="1">RWRpdGluZyBXaWRnZXQ=</PHRASE>
<PHRASE Label="la_title_In-Custom" Module="Custom" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_title_NewWidget" Module="Custom" Type="1">TmV3IFdpZGdldA==</PHRASE>
<PHRASE Label="la_title_Widgets" Module="Custom" Type="1">V2lkZ2V0cw==</PHRASE>
<PHRASE Label="la_ToolTip_NewWidget" Module="Custom" Type="1">TmV3IFdpZGdldA==</PHRASE>
</PHRASES>
</LANGUAGE>
</LANGUAGES>
\ No newline at end of file

Event Timeline