Index: branches/5.3.x/units/currencies/currencies_config.php =================================================================== diff -u -N -r15583 -r15656 --- branches/5.3.x/units/currencies/currencies_config.php (.../currencies_config.php) (revision 15583) +++ branches/5.3.x/units/currencies/currencies_config.php (.../currencies_config.php) (revision 15656) @@ -1,6 +1,6 @@ 'curr', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'CurrenciesEventHandler', 'file' => 'currencies_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'CurrenciesTagProcessor', 'file' => 'currencies_tag_processor.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'hooks' => Array (), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'curr', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'CurrenciesEventHandler', 'file' => 'currencies_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'CurrenciesTagProcessor', 'file' => 'currencies_tag_processor.php', 'build_event' => 'OnBuild'), - /*'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'tax', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'onEdit' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnLoadZoneForm', - ), - ),*/ - 'IDField' => 'CurrencyId', - 'StatusField' => Array ('Status', 'IsPrimary'), - 'TitleField' => 'ISO', - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('curr' => '!la_title_AddingCurrency!'), - 'edit_status_labels' => Array ('curr' => '!la_title_EditingCurrency!'), - 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), - ), - 'currencies_list' =>Array ( 'prefixes' => Array ('curr_List'), - 'format' => "!la_title_Currencies!", - ), - 'currencies_edit' =>Array ( 'prefixes' => Array ('curr'), - 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), - 'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!", - ), - ), + 'AutoLoad' => true, - 'PermSection' => Array ('main' => 'in-commerce:currencies'), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'Sections' => Array ( - 'in-commerce:currencies' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_currencies', - 'label' => 'la_tab_Currencies', - 'url' => Array ('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'), - 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'), - 'priority' => 3, - 'type' => stTREE, - ), - ), + 'IDField' => 'CurrencyId', + 'StatusField' => Array ('Status', 'IsPrimary'), + 'TitleField' => 'ISO', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('curr' => '!la_title_AddingCurrency!'), + 'edit_status_labels' => Array ('curr' => '!la_title_EditingCurrency!'), + 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), + ), + 'currencies_list' =>Array ( + 'prefixes' => Array ('curr_List'), 'format' => "!la_title_Currencies!", + ), + 'currencies_edit' =>Array ( + 'prefixes' => Array ('curr'), + 'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'), + 'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!", + ), + ), - 'TableName' => TABLE_PREFIX.'Currencies', - 'AutoDelete' => true, - 'AutoClone' => true, + 'PermSection' => Array ('main' => 'in-commerce:currencies'), - 'SubItems' => Array (), + 'Sections' => Array ( + 'in-commerce:currencies' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_currencies', + 'label' => 'la_tab_Currencies', + 'url' => Array ('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'), + 'priority' => 3, + 'type' => stTREE, + ), + ), - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'LanguageLabels phr ON %1$s.Name = phr.Phrase' - ), + 'TableName' => TABLE_PREFIX.'Currencies', + 'AutoDelete' => true, + 'AutoClone' => true, - 'CalculatedFields' => Array ( - '' => Array ( - 'Translation' => 'phr.l%2$s_Translation', - ), - ), + 'SubItems' => Array (), - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'), - 'Sorting' => Array ('ISO' => 'asc'), - ) - ), - 'Fields' => Array ( - 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'Symbol' => Array ('type' => 'string', 'default' => null), - 'SymbolPosition' => Array ('type' => 'int', 'default' => null, 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'), 'use_phrases' => '1'), - 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), - 'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1), - 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1, - ), - 'IsPrimary' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'LanguageLabels phr ON %1$s.Name = phr.Phrase' + ), - 'VirtualFields' => Array ( - 'Translation' => Array ('type' => 'string', 'default' => ''), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'Translation' => 'phr.l%2$s_Translation', + ), + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'CurrencyId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'ISO' => Array ( 'title' => 'column:la_fld_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 90, ), - 'Translation' => Array ( 'title' => 'column:la_fld_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter', 'width' => 250, ), - 'RateToPrimary' => Array ( 'title' => 'column:la_fld_RateToPrimary', 'filter_block' => 'grid_range_filter', 'width' => 130, ), - 'Modified' => Array ( 'title' => 'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), - 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'), + 'Sorting' => Array ('ISO' => 'asc'), + ) + ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'Symbol' => Array ('type' => 'string', 'default' => null), + 'SymbolPosition' => Array ('type' => 'int', 'default' => null, 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'), 'use_phrases' => '1'), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1), + 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + 'IsPrimary' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + ), + + 'VirtualFields' => Array ( + 'Translation' => Array ('type' => 'string', 'default' => ''), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'CurrencyId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'ISO' => Array ( 'title' => 'column:la_fld_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 90, ), + 'Translation' => Array ( 'title' => 'column:la_fld_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter', 'width' => 250, ), + 'RateToPrimary' => Array ( 'title' => 'column:la_fld_RateToPrimary', 'filter_block' => 'grid_range_filter', 'width' => 130, ), + 'Modified' => Array ( 'title' => 'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), + 'Status' => Array ( 'filter_block' => 'grid_options_filter', 'width' => 100, ), + ), + ), + ), +); \ No newline at end of file