Index: branches/5.2.x/core/units/selectors/selectors_config.php =================================================================== diff -u -N -r14585 -r16388 --- branches/5.2.x/core/units/selectors/selectors_config.php (.../selectors_config.php) (revision 14585) +++ branches/5.2.x/core/units/selectors/selectors_config.php (.../selectors_config.php) (revision 16388) @@ -1,6 +1,6 @@ 'selectors', - 'ItemClass' => Array('class'=>'SelectorsItem','file'=>'selectors_item.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'SelectorsEventHandler','file'=>'selectors_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'SelectorsTagProcessor','file'=>'selectors_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'selectors', + 'ItemClass' => Array ('class' => 'SelectorsItem', 'file' => 'selectors_item.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'SelectorsEventHandler', 'file' => 'selectors_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'SelectorsTagProcessor', 'file' => 'selectors_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'Clones' => Array( - 'selectorsbase' => Array( - 'Hooks' => Array(), - 'Constrain' => 'Type = 1', - 'SubItems' => Array('selectorsblock'), - ), + 'Clones' => Array ( + 'selectorsbase' => Array ( + 'Hooks' => Array (), + 'Constrain' => 'Type = 1', + 'SubItems' => Array ('selectorsblock'), + ), - 'selectorsblock' => Array( - 'Hooks' => Array(), - 'Constrain' => 'Type = 2', - 'ForeignKey' => Array('css' => 'StylesheetId', 'selectorsbase' => 'ParentId'), - 'ParentTableKey' => Array('css' => 'StylesheetId', 'selectorsbase' => 'SelectorId'), - 'ParentPrefix' => 'selectorsbase', - ), - ), + 'selectorsblock' => Array ( + 'Hooks' => Array (), + 'Constrain' => 'Type = 2', + 'ForeignKey' => Array ('css' => 'StylesheetId', 'selectorsbase' => 'ParentId'), + 'ParentTableKey' => Array ('css' => 'StylesheetId', 'selectorsbase' => 'SelectorId'), + 'ParentPrefix' => 'selectorsbase', + ), + ), - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'selectors', - 'HookToSpecial' => '', - 'HookToEvent' => Array('OnItemBuild'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnPrepareBaseStyles', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'selectors', + 'HookToSpecial' => '', + 'HookToEvent' => Array ('OnItemBuild'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnPrepareBaseStyles', + ), - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'selectors', - 'HookToSpecial' => 'block', - 'HookToEvent' => Array('OnListBuild'), - 'DoPrefix' => '', - 'DoSpecial' => 'block', - 'DoEvent' => 'OnPrepareBaseStyles', - ), - ), + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => 'selectors', + 'HookToSpecial' => 'block', + 'HookToEvent' => Array ('OnListBuild'), + 'DoPrefix' => '', + 'DoSpecial' => 'block', + 'DoEvent' => 'OnPrepareBaseStyles', + ), + ), - 'MyHooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => Array('Prefix1.*', 'Prefix2.Special1'), - 'HookToEvents' => Array('OnBeforeItemUpdate', 'OnBeforeItemCreate'), - 'DoPrefix' => Array('Prefix1.*', 'Prefix2.Special1'), - 'DoEvent' => 'OnMyEvent', - ), - ), + 'MyHooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => Array ('Prefix1.*', 'Prefix2.Special1'), + 'HookToEvents' => Array ('OnBeforeItemUpdate', 'OnBeforeItemCreate'), + 'DoPrefix' => Array ('Prefix1.*', 'Prefix2.Special1'), + 'DoEvent' => 'OnMyEvent', + ), + ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'SelectorId', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TitleField' => 'Name', + 'IDField' => 'SelectorId', - 'TableName' => TABLE_PREFIX.'StylesheetSelectors', + 'TitleField' => 'Name', - 'ForeignKey' => 'StylesheetId', - 'ParentTableKey' => 'StylesheetId', - 'ParentPrefix' => 'css', - 'AutoDelete' => true, - 'AutoClone' => true, + 'TableName' => TABLE_PREFIX.'StylesheetSelectors', - 'ListSQLs' => Array( ''=>' SELECT %1$s.* - FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), - ) - ), - 'Fields' => Array( - 'SelectorId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StylesheetId' => Array('type' => 'int', 'unique'=>Array('SelectorName'), 'current_table_only' => 1, 'not_null' => 1, 'default' => 0), - 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1), - 'SelectorName' => Array('type' => 'string', 'unique'=>Array('StylesheetId'), 'current_table_only' => 1, 'not_null' => '1','default' => '','required'=>1), - 'SelectorData' => Array('type' => 'string', 'default' => NULL), - 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array( 1 => 'la_BaseSelectors', 2 => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'AdvancedCSS' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'ParentId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'required' => 1, 'not_null' => 1, 'default' => 0), - ), + 'ForeignKey' => 'StylesheetId', + 'ParentTableKey' => 'StylesheetId', + 'ParentPrefix' => 'css', + 'AutoDelete' => true, + 'AutoClone' => true, - 'VirtualFields' => Array( - 'FontStyle' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','normal'=>'normal','italic'=>'italic','oblique'=>'oblique'), 'default'=>''), - 'FontWeight' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','100'=>'100','200'=>'200','300'=>'300','normal'=>'normal','500'=>'500','600'=>'600','bold'=>'bold','800'=>'800','900'=>'900','lighter'=>'lighter','bolder'=>'bolder'), 'default' => ''), - 'StyleCursor' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','default'=>'default','auto'=>'auto','n-resize'=>'n-resize','ne-resize'=>'ne-resize','e-resize'=>'e-resize','se-resize'=>'se-resize','s-resize'=>'s-resize','sw-resize'=>'sw-resize','w-resize'=>'w-resize','nw-resize'=>'nw-resize','crosshair'=>'crosshair','pointer'=>'pointer','move'=>'move','text'=>'text','wait'=>'wait','help'=>'help','hand'=>'hand','all-scroll'=>'all-scroll','col-resize'=>'col-resize','row-resize'=>'row-resize','no-drop'=>'no-drop','not-allowed'=>'not-allowed','progress'=>'progress','vertical-text'=>'vertical-text','alias'=>'alias','cell'=>'cell','copy'=>'copy','count-down'=>'count-down','count-up'=>'count-up','count-up-down'=>'count-up-down','grab'=>'grab','grabbing'=>'grabbing','spinning'=>'spinning'), 'default' => ''), - 'StyleDisplay' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','inline'=>'inline','block'=>'block','inline-block'=>'inline-block','list-item'=>'list-item','marker'=>'marker','compact'=>'compact','run-in'=>'run-in','table-header-group'=>'table-header-group','table-footer-group'=>'table-footer-group','table'=>'table','inline-table'=>'inline-table','table-caption'=>'table-caption','table-row'=>'table-row','table-row-group'=>'table-row-group','table-column'=>'table-column','table-column-group'=>'table-column-group'), 'default' => ''), - 'TextAlign' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','left'=>'left','right'=>'right','center'=>'center','justify'=>'justify'), 'default' => ''), - 'TextDecoration' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','none'=>'none','underline'=>'underline','overline'=>'overline','line-through'=>'line-through','blink'=>'blink'), 'default' => ''), - 'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse'), 'default' => ''), - 'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed'), 'default' => ''), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* + FROM %s', + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( - 'default'=>'icon16_selector.gif'), - 'Fields' => Array( - 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'), - 'SelectorName' => Array ('filter_block' => 'grid_like_filter'), - 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'), - ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'BlockStyles' => Array( - 'Icons' => Array('default'=>'icon16_selector.gif'), - 'Fields' => Array( - 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'), - 'SelectorName' => Array ('filter_block' => 'grid_like_filter'), - 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'), - 'ParentId' => Array ('title' => 'la_col_Basedon', 'filter_block' => 'grid_options_filter'), - ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'SelectorId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'StylesheetId' => Array ('type' => 'int', 'unique'=>Array ('SelectorName'), 'current_table_only' => 1, 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required'=>1), + 'SelectorName' => Array ('type' => 'string', 'unique'=>Array ('StylesheetId'), 'current_table_only' => 1, 'not_null' => '1', 'default' => '', 'required'=>1), + 'SelectorData' => Array ('type' => 'string', 'default' => NULL), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>Array ( 1 => 'la_BaseSelectors', 2 => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'AdvancedCSS' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'required' => 1, 'not_null' => 1, 'default' => 0), + ), + + 'VirtualFields' => Array ( + 'FontStyle' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'normal' => 'normal', 'italic' => 'italic', 'oblique' => 'oblique'), 'default' => ''), + 'FontWeight' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', '100' => '100', '200' => '200', '300' => '300', 'normal' => 'normal', '500' => '500', '600' => '600', 'bold' => 'bold', '800' => '800', '900' => '900', 'lighter' => 'lighter', 'bolder' => 'bolder'), 'default' => ''), + 'StyleCursor' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'default' => 'default', 'auto' => 'auto', 'n-resize' => 'n-resize', 'ne-resize' => 'ne-resize', 'e-resize' => 'e-resize', 'se-resize' => 'se-resize', 's-resize' => 's-resize', 'sw-resize' => 'sw-resize', 'w-resize' => 'w-resize', 'nw-resize' => 'nw-resize', 'crosshair' => 'crosshair', 'pointer' => 'pointer', 'move' => 'move', 'text' => 'text', 'wait' => 'wait', 'help' => 'help', 'hand' => 'hand', 'all-scroll' => 'all-scroll', 'col-resize' => 'col-resize', 'row-resize' => 'row-resize', 'no-drop' => 'no-drop', 'not-allowed' => 'not-allowed', 'progress' => 'progress', 'vertical-text' => 'vertical-text', 'alias' => 'alias', 'cell' => 'cell', 'copy' => 'copy', 'count-down' => 'count-down', 'count-up' => 'count-up', 'count-up-down' => 'count-up-down', 'grab' => 'grab', 'grabbing' => 'grabbing', 'spinning' => 'spinning'), 'default' => ''), + 'StyleDisplay' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'none' => 'none', 'inline' => 'inline', 'block' => 'block', 'inline-block' => 'inline-block', 'list-item' => 'list-item', 'marker' => 'marker', 'compact' => 'compact', 'run-in' => 'run-in', 'table-header-group' => 'table-header-group', 'table-footer-group' => 'table-footer-group', 'table' => 'table', 'inline-table' => 'inline-table', 'table-caption' => 'table-caption', 'table-row' => 'table-row', 'table-row-group' => 'table-row-group', 'table-column' => 'table-column', 'table-column-group' => 'table-column-group'), 'default' => ''), + 'TextAlign' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'left' => 'left', 'right' => 'right', 'center' => 'center', 'justify' => 'justify'), 'default' => ''), + 'TextDecoration' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'none' => 'none', 'underline' => 'underline', 'overline' => 'overline', 'line-through' => 'line-through', 'blink' => 'blink'), 'default' => ''), + 'StyleVisibility' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'visible' => 'visible', 'hidden' => 'hidden', 'collapse' => 'collapse'), 'default' => ''), + 'StylePosition' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options'=>Array ('' => '', 'inherit' => 'inherit', 'static' => 'static', 'relative' => 'relative', 'absolute' => 'absolute', 'fixed' => 'fixed'), 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ('default' => 'icon16_selector.gif'), + 'Fields' => Array ( + 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'), + 'SelectorName' => Array ('filter_block' => 'grid_like_filter'), + 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'), + ), + ), + + 'BlockStyles' => Array ( + 'Icons' => Array ('default' => 'icon16_selector.gif'), + 'Fields' => Array ( + 'Name' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'), + 'SelectorName' => Array ('filter_block' => 'grid_like_filter'), + 'Description' => Array ('data_block' => 'grid_description_td', 'filter_block' => 'grid_like_filter'), + 'ParentId' => Array ('title' => 'la_col_Basedon', 'filter_block' => 'grid_options_filter'), + ), + ), + ), +); \ No newline at end of file