Page MenuHomeIn-Portal Phabricator

custom
No OneTemporary

File Metadata

Created
Sun, Apr 20, 2:09 AM
Index: branches/RC/custom/units/test/test_config.php
===================================================================
--- branches/RC/custom/units/test/test_config.php (revision 11988)
+++ branches/RC/custom/units/test/test_config.php (nonexistent)
@@ -1,184 +0,0 @@
-<?php
-
-$config = Array(
- 'Prefix' => 'test',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'TestEventHandler','file'=>'test_eh.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
-
- 'AutoLoad' => true,
-
- 'QueryString' => Array(
- 1 => 'id',
- 2 => 'Page',
- 3 => 'event',
- 4 => 'mode',
- ),
- 'IDField' => 'TestId',
- 'StatusField' => Array('Status'),
- 'TableName' => TABLE_PREFIX.'Tests',
-
-/*
- '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
-*/
-
- 'TitlePresets' => Array (
- 'default' => Array (
- 'new_status_labels' => Array ('test' => '!la_title_AddingTest!'),
- 'edit_status_labels' => Array ('test' => '!la_title_EditingTest!'),
- ),
-
- 'test_list' => Array ('prefixes' => Array ('test_List'), 'format' => '#section_label#'),
- 'test_edit' => Array ('prefixes' => Array ('test'), 'format' => '#test_status# #test_titlefield#'),
- ),
-
- 'PermSection' => Array('main' => 'custom:tests'),
-
- // don't forget to add corresponding permissions to install script
- // INSERT INTO Permissions VALUES (0, 'custom:custom.view', 11, 1, 1, 0);
- // INSERT INTO Permissions VALUES (0, 'custom:tests.view', 11, 1, 1, 0), (0, 'custom:tests.add', 11, 1, 1, 0), (0, 'custom:tests.edit', 11, 1, 1, 0), (0, 'custom:tests.delete', 11, 1, 1, 0);
- 'Sections' => Array(
- 'custom:tests' => Array(
- 'parent' => 'custom',
- 'icon' => 'custom:tests',
- 'label' => 'la_tab_Tests',
- 'url' => Array('t' => 'custom/tests/test_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 1,
- 'type' => stTREE,
- ),
- ),
-
- 'TitleField' => 'LastName', // 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'),
- )
- ),
- 'Fields' => Array(
- 'TestId' => 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(
- '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_default_type',
- 2=>'la_some_type',
- 3=>'la_another_type',
- ),
- '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#', 'not_null' => true),
- '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_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',
- 'max_size'=>MAX_UPLOAD_SIZE, // in Bytes !
- 'file_types'=>'*.*',
- 'files_description'=>'!la_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 (
- 'TestId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Title' => Array ('title'=>'la_col_TestName', 'data_block' => 'grid_delete_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'),
-// 'BirthTime' => Array ('title' => 'la_col_BirthTime', 'filter_block' => 'grid_date_range_filter'),
- ),
- ),
- ),
-
- 'ConfigMapping' => Array(
- 'PerPage' => 'Comm_Perpage_Tests',
- 'ShortListPerPage' => 'Comm_Perpage_Tests_Short',
- ),
-);
-
-/*
-
-Don't forget to:
-
-- Add table create statement to install_schema.sql
- CREATE TABLE Tests (
- `TestId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
- `Title` VARCHAR( 255 ) NOT NULL ,
- `Description` TEXT NULL ,
- `Email` VARCHAR( 255 ) NOT NULL ,
- `Type` TINYINT NOT NULL ,
- `Phone` VARCHAR( 50 ) NOT NULL ,
- `Qty` DOUBLE NOT NULL ,
- `Status` TINYINT NOT NULL ,
- `CreatedOn` INT NOT NULL ,
- `Good` TINYINT NOT NULL
-)
-
-- Add permissions for admin gorup to install script (see 'Sections' key above)
-
-
-*/
\ No newline at end of file
Property changes on: branches/RC/custom/units/test/test_config.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.8.2.10
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/custom/units/test/test_eh.php
===================================================================
--- branches/RC/custom/units/test/test_eh.php (revision 11988)
+++ branches/RC/custom/units/test/test_eh.php (nonexistent)
@@ -1,5 +0,0 @@
-<?php
-
-class TestEventHandler extends kDBEventHandler {
-
-}
\ No newline at end of file
Property changes on: branches/RC/custom/units/test/test_eh.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/custom/admin_templates/tests/test_edit.tpl
===================================================================
--- branches/RC/custom/admin_templates/tests/test_edit.tpl (revision 11988)
+++ branches/RC/custom/admin_templates/tests/test_edit.tpl (nonexistent)
@@ -1,88 +0,0 @@
-<inp2:adm_SetPopupSize width="750" height="570"/>
-
-<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="custom:tests" prefix="test" title_preset="test_edit"/>
-
-<!-- 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('test','<inp2:test_SaveEvent/>');
- }
- ));
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- cancel_edit('test','OnCancelEdit','<inp2:test_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('test', '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('test', '<inp2:test_PrevId/>');
- }
- ));
- a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
- go_to_id('test', '<inp2:test_NextId/>');
- }
- ));
-
- a_toolbar.Render();
-
- <inp2:m_if check="test_IsSingle" >
- a_toolbar.HideButton('prev');
- a_toolbar.HideButton('next');
- a_toolbar.HideButton('sep1');
- <inp2:m_else/>
- <inp2:m_if check="test_IsLast" >
- a_toolbar.DisableButton('next');
- </inp2:m_if>
- <inp2:m_if check="test_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="js/uploader.js"></script>
- </td>
- </tr>
-</tbody>
-</table>
-
-<inp2:test_SaveWarning name="grid_save_warning"/>
-<inp2:test_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="test" field="TestId" title="!la_fld_Id!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="test" field="Title" title="!la_fld_Title!" style="width: 100px"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="test" field="Good" title="!la_fld_Good!"/>
- <inp2:m_RenderElement name="inp_edit_fck" prefix="test" field="Description" title="!la_fld_Description!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="test" field="Status" title="la_fld_Status"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="test" field="Type" title="la_fld_Type" has_empty="1"/>
-
-<!-- <inp2:m_RenderElement name="inp_edit_date" prefix="test" field="CreatedOn" title="la_fld_CreatedOn"/>-->
-<!-- <inp2:m_RenderElement name="inp_edit_time" prefix="test" field="BirthTime" title="la_fld_BirthTime"/>-->
-<!-- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="test" field="IsSystem" title="!la_fld_IsSystemTemplate!" onchange="OnSystemClick()"/>-->
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="test" field="Qty" title="!la_fld_Qty!" style="width: 50px"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="test" field="Phone" title="!la_fld_Phone!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="test" field="Email" title="!la_fld_Email!" style="width: 200px"/>
-
- <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="test" field="Image" title="!la_fld_Image!"/>
- <inp2:m_RenderElement name="inp_edit_swf_upload" prefix="test" field="DataFile" title="!la_fld_DataFile!"/>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
-</div>
-
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/custom/admin_templates/tests/test_edit.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.6.2.7
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/custom/admin_templates/tests/test_list.tpl
===================================================================
--- branches/RC/custom/admin_templates/tests/test_list.tpl (revision 11988)
+++ branches/RC/custom/admin_templates/tests/test_list.tpl (nonexistent)
@@ -1,114 +0,0 @@
-<inp2:m_include t="incs/header" />
-
-<inp2:m_RenderElement name="combined_header" prefix="test" section="custom:tests" title_preset="test_list" pagination="1"/>
-
-<!-- ToolBar -->
-<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
-<tbody>
- <tr>
- <td>
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td >
- <script type="text/javascript">
- a_toolbar = new ToolBar();
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'new_item',
- '<inp2:m_phrase label="la_ToolTip_NewTest" escape="1"/>::<inp2:m_phrase label="la_Add" escape="1"/>',
- function() {
- std_precreate_item('test', 'custom/tests/test_edit')
- }
- )
- );
-
- function edit() {
- std_edit_item('test', 'custom/tests/test_edit');
- }
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'edit',
- '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>',
- edit
- )
- );
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'delete',
- '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
- function() {
- std_delete_items('test');
- }
- )
- );
-
- a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'export',
- '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>',
- function() {
- std_csv_export('test', 'Default', 'export/export_progress');
- }
- )
- );
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'import',
- '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>',
- function() {
- std_csv_import('test', 'Default', 'import/import_start');
- }
- )
- );
-
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
- a_toolbar.AddButton(
- new ToolBarButton(
- 'view',
- '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
- function(id) {
- show_viewmenu(a_toolbar,'view');
- }
- )
- );
-
- a_toolbar.Render();
- </script>
- </td>
-
- <inp2:m_RenderElement name="search_main_toolbar" prefix="test" grid="Default"/>
- </tr>
- </table>
- </td>
- </tr>
-</tbody>
-</table>
-
-<style type="text/css">
- .red-row td.Status {
- background-color: red;
- }
-</style>
-
-<inp2:m_DefineElement name="grid_image_td">
- <img src="<inp2:Field name='$field' format='resize:120x120'/>" <inp2:Field name='$field' format='resize:120x120;img_size' no_special='1'/> alt=""/><br />
-</inp2:m_DefineElement>
-
-<inp2:m_DefineElement name="grid_delete_td">
- <a href="<inp2:m_Link {$PrefixSpecial}_event='OnDelete' pass='m,$PrefixSpecial'/>" onclick="return confirm('Delete Record?')"><inp2:Field name="$field"/></a>
-</inp2:m_DefineElement>
-
-
-<inp2:m_RenderElement name="grid" PrefixSpecial="test" IdField="TestId" grid="Default" grid_filters="1" limited_heights="true" max_row_height="100"/>
-<script type="text/javascript">
- Grids['test'].SetDependantToolbarButtons( new Array('edit', 'delete') );
-</script>
-
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/custom/admin_templates/tests/test_list.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4.2.6
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property

Event Timeline