HomeHelpTrac

Changeset 15953


Ignore:
Timestamp:
02/07/12 00:01:09 (4 months ago)
Author:
Anton Lesnikov
Message:

"Sorting and Filter Selects" checklist

Location:
trunk
Files:
1 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/install/sql/v70.sql

    r15945 r15953  
    27892789('sys_studio_nav_items', 'Sql', 'SELECT * FROM `sys_menu_items` WHERE 1 ', 'sys_menu_items', 'id', 'order', 'active', '', 100, NULL, 'start_it', '', 'title,link', 'auto', '', 'BxTemplStudioNavigationItems', ''), 
    27902790('sys_studio_nav_import', 'Sql', 'SELECT * FROM `sys_menu_items` WHERE 1 ', 'sys_menu_items', 'id', '', '', '', 5, NULL, 'start_im', '', 'title,link', 'auto', '', 'BxTemplStudioNavigationImport', ''), 
    2791 ('sys_studio_forms', 'Sql', 'SELECT * FROM `sys_objects_form` WHERE 1 ', 'sys_objects_form', 'id', '', 'active', '', 100, NULL, 'start', '', 'title,module', 'auto', '', 'BxTemplStudioFormsForms', ''), 
    2792 ('sys_studio_forms_displays', 'Sql', 'SELECT `td`.`id` AS `id`, `td`.`object` AS `object`, `td`.`display_name` AS `display_name`, `td`.`title` AS `title`, `td`.`module` AS `module`, `tf`.`title` AS `form_title` FROM `sys_form_displays` AS `td` LEFT JOIN `sys_objects_form` AS `tf` ON `td`.`object`=`tf`.`object` WHERE 1 ', 'sys_form_displays', 'id', '', '', '', 100, NULL, 'start', '', 'td`.`title,td`.`module', 'auto', '', 'BxTemplStudioFormsDisplays', ''), 
     2791('sys_studio_forms', 'Sql', 'SELECT * FROM `sys_objects_form` WHERE 1 ', 'sys_objects_form', 'id', 'module,title', 'active', '', 100, NULL, 'start', '', 'title,module', 'auto', 'title,module', 'BxTemplStudioFormsForms', ''), 
     2792('sys_studio_forms_displays', 'Sql', 'SELECT `td`.`id` AS `id`, `td`.`object` AS `object`, `td`.`display_name` AS `display_name`, `td`.`title` AS `title`, `td`.`module` AS `module`, `tf`.`title` AS `form_title` FROM `sys_form_displays` AS `td` LEFT JOIN `sys_objects_form` AS `tf` ON `td`.`object`=`tf`.`object` WHERE 1 ', 'sys_form_displays', 'id', 'module,object,title', '', '', 100, NULL, 'start', '', 'td`.`title,td`.`module', 'auto', 'title,module,form_title', 'BxTemplStudioFormsDisplays', ''), 
    27932793('sys_studio_forms_fields', 'Sql', 'SELECT `tdi`.`id` AS `id`, `ti`.`caption` AS `title`, `ti`.`type` AS `type`, `ti`.`module` AS `module`, `tdi`.`visible_for_levels` AS `visible_for_levels`, `tdi`.`active` AS `active`, `ti`.`editable` AS `editable`, `ti`.`deletable` AS `deletable`, `tdi`.`order` AS `order` FROM `sys_form_display_inputs` AS `tdi` LEFT JOIN `sys_form_inputs` AS `ti` ON `tdi`.`input_name`=`ti`.`name` AND `ti`.`object`=? WHERE 1 AND `tdi`.`display_name`=?', 'sys_form_display_inputs', 'id', 'order', 'active', '', 100, NULL, 'start', '', 'ti`.`type,ti`.`caption', 'auto', '', 'BxTemplStudioFormsFields', ''), 
    2794 ('sys_studio_forms_pre_lists', 'Sql', 'SELECT * FROM `sys_form_pre_lists` WHERE 1 ', 'sys_form_pre_lists', 'id', '', '', '', 100, NULL, 'start', '', 'module,key,title', 'auto', '', 'BxTemplStudioFormsPreLists', ''), 
    2795 ('sys_studio_forms_pre_values', 'Sql', 'SELECT * FROM `sys_form_pre_values` WHERE 1 ', 'sys_form_pre_values', 'id', 'Order', '', '', 100, NULL, 'start', '', 'Key,Value,LKey,LKey2', 'auto', '', 'BxTemplStudioFormsPreValues', ''); 
     2794('sys_studio_forms_pre_lists', 'Sql', 'SELECT * FROM `sys_form_pre_lists` WHERE 1 ', 'sys_form_pre_lists', 'id', 'title', '', '', 100, NULL, 'start', '', 'module,key,title', 'auto', 'module,key,title', 'BxTemplStudioFormsPreLists', ''), 
     2795('sys_studio_forms_pre_values', 'Sql', 'SELECT * FROM `sys_form_pre_values` WHERE 1 ', 'sys_form_pre_values', 'id', 'Order', '', '', 1000, NULL, 'start', '', 'Key,Value,LKey,LKey2', 'auto', '', 'BxTemplStudioFormsPreValues', ''); 
    27962796 
    27972797CREATE TABLE IF NOT EXISTS `sys_grid_fields` ( 
     
    28722872('sys_studio_forms_fields', 'module', '_adm_form_txt_fields_module', '15%', '13', '', 5), 
    28732873('sys_studio_forms_fields', 'actions', '', '20%', '', '', 6), 
    2874 ('sys_studio_forms_pre_lists', 'key', '_adm_form_txt_pre_lists_key', '20%', '23', '', 1), 
    2875 ('sys_studio_forms_pre_lists', 'title', '_adm_form_txt_pre_lists_title', '25%', '28', '', 2), 
     2874('sys_studio_forms_pre_lists', 'title', '_adm_form_txt_pre_lists_title', '25%', '28', '', 1), 
     2875('sys_studio_forms_pre_lists', 'key', '_adm_form_txt_pre_lists_key', '20%', '23', '', 2), 
    28762876('sys_studio_forms_pre_lists', 'module', '_adm_form_txt_pre_lists_module', '13%', '11', '', 3), 
    28772877('sys_studio_forms_pre_lists', 'values', '_adm_form_txt_pre_lists_values', '12%', '10', '', 3), 
     
    29302930('sys_studio_forms_pre_lists', 'single', 'edit', '', 'document--pencil.png', 0, 1), 
    29312931('sys_studio_forms_pre_lists', 'single', 'delete', '', 'cross.png', 1, 2), 
    2932 ('sys_studio_forms_pre_values', 'independent', 'add', '_adm_form_btn_values_create', '', 0, 1), 
     2932('sys_studio_forms_pre_values', 'independent', 'add', '_adm_form_btn_pre_values_create', '', 0, 1), 
    29332933('sys_studio_forms_pre_values', 'single', 'edit', '', 'document--pencil.png', 0, 1), 
    29342934('sys_studio_forms_pre_values', 'single', 'delete', '', 'cross.png', 1, 2); 
  • trunk/modules/boonex/articles/install/config.php

    r15751 r15953  
    135135     * Category for language keys. 
    136136     */ 
    137     'language_category' => 'Boonex Articles', 
     137    'language_category' => 'BoonEx Articles', 
    138138    /** 
    139139     * Permissions Section 
  • trunk/modules/boonex/english/install/data/langs/en.xml

    r15949 r15953  
    22372237    <string name="_adm_lmi_cpt_displays"><![CDATA[Displays]]></string> 
    22382238    <string name="_adm_lmi_cpt_fields"><![CDATA[Fields]]></string> 
    2239     <string name="_adm_lmi_cpt_pre_lists"><![CDATA[Predefined Lists]]></string> 
    2240     <string name="_adm_lmi_cpt_pre_values"><![CDATA[Predefined Items]]></string> 
     2239    <string name="_adm_lmi_cpt_pre_lists"><![CDATA[Data Lists]]></string> 
     2240    <string name="_adm_lmi_cpt_pre_values"><![CDATA[Data Items]]></string> 
    22412241    <string name="_adm_form_txt_all_modules"><![CDATA[All Modules]]></string> 
    22422242    <string name="_adm_form_txt_all_forms"><![CDATA[All Forms]]></string> 
    22432243    <string name="_adm_form_txt_select_display"><![CDATA[Select Display]]></string> 
    2244     <string name="_adm_form_txt_select_list"><![CDATA[Select List]]></string> 
     2244    <string name="_adm_form_txt_select_list"><![CDATA[Select List...]]></string> 
    22452245    <string name="_adm_form_err_cannot_process_action"><![CDATA[Cannot process action. It does not have an associated handler.]]></string> 
    22462246    <string name="_adm_form_txt_forms_title"><![CDATA[Title]]></string> 
     
    24062406    <string name="_adm_form_err_pre_lists_create"><![CDATA[Cannot add list]]></string> 
    24072407    <string name="_adm_from_err_pre_lists_delete"><![CDATA[Cannot delete list]]></string> 
    2408     <string name="_adm_form_txt_pre_lists_create_popup"><![CDATA[Edit "{0}" List]]></string> 
     2408    <string name="_adm_form_txt_pre_lists_edit_popup"><![CDATA[Edit "{0}" List]]></string> 
    24092409    <string name="_adm_form_err_pre_lists_edit"><![CDATA[Cannot update list]]></string> 
    24102410    <string name="_adm_form_txt_pre_lists_key"><![CDATA[Key]]></string> 
  • trunk/modules/boonex/groups/install/config.php

    r15767 r15953  
    148148     * Category for language keys. 
    149149     */ 
    150     'language_category' => 'Boonex Groups', 
     150    'language_category' => 'BoonEx Groups', 
    151151 
    152152    /** 
  • trunk/studio/classes/BxDolStudioFormsQuery.php

    r15924 r15953  
    9595                $sSelectClause = ", `tf`.`title` AS `form_title`"; 
    9696                $sJoinClause = "LEFT JOIN `sys_objects_form` AS `tf` ON `td`.`object`=`tf`.`object` "; 
     97                $sOrderClause = "ORDER BY `td`.`object` ASC, `td`.`title` ASC"; 
    9798                break; 
    9899        } 
  • trunk/studio/classes/BxDolStudioGrid.php

    r15936 r15953  
    1010 
    1111bx_import('BxTemplGrid'); 
     12bx_import('BxDolStudioUtils'); 
    1213 
    1314define('BX_DOL_STUDIO_GRID_PARAMS_DIVIDER', '#-#'); 
     
    2526 
    2627    public function getSystemName($sValue) { 
    27         return stdGetSystemName($sValue); 
     28        return BxDolStudioUtils::getSystemName($sValue); 
    2829    } 
    2930 
    3031    public function getClassName($sValue) { 
    31         return stdGetClassName($sValue); 
     32        return BxDolStudioUtils::getClassName($sValue); 
    3233    } 
    3334 
    3435    protected function getModuleTitle($sName) { 
    35         return stdGetModuleTitle($sName); 
     36        return BxDolStudioUtils::getModuleTitle($sName); 
    3637    } 
    3738 
    3839    protected function getModules($bShowCustom = true, $bShowSystem = true) { 
    39         return stdGetModules($bShowCustom, $bShowSystem); 
     40        return BxDolStudioUtils::getModules($bShowCustom, $bShowSystem); 
    4041    } 
    4142 
  • trunk/studio/classes/BxDolStudioPage.php

    r15939 r15953  
    1010 
    1111bx_import('BxDol'); 
     12bx_import('BxDolStudioUtils'); 
    1213bx_import('BxDolStudioPageQuery'); 
    1314 
     
    101102 
    102103    protected function getSystemName($sValue) { 
    103         return stdGetSystemName($sValue); 
     104        return BxDolStudioUtils::getSystemName($sValue); 
    104105    } 
    105106 
    106107    protected function getClassName($sValue) { 
    107         return stdGetClassName($sValue); 
     108        return BxDolStudioUtils::getClassName($sValue); 
    108109    } 
    109110 
    110111    protected function getModuleTitle($sName) { 
    111         return stdGetModuleTitle($sName); 
     112        return BxDolStudioUtils::getModuleTitle($sName); 
    112113    } 
    113114 
     115    protected function getModuleIcon($sName) { 
     116        return BxDolStudioUtils::getModuleIcon($sName); 
     117    } 
     118     
    114119    protected function getModules($bShowCustom = true, $bShowSystem = true) { 
    115         return stdGetModules($bShowCustom, $bShowSystem); 
     120        return BxDolStudioUtils::getModules($bShowCustom, $bShowSystem); 
    116121    } 
    117122} 
  • trunk/studio/inc/utils.inc.php

    r15949 r15953  
    77defined('BX_DOL') or die('hack attempt'); 
    88 
    9 define('BX_DOL_STUDIO_MODULE_SYSTEM', 'system'); 
    10 define('BX_DOL_STUDIO_MODULE_CUSTOM', 'custom'); 
    11  
    12 function stdGetSystemName($sValue) { 
    13     return str_replace(' ', '_', strtolower($sValue)); 
    14 } 
    15  
    16 function stdGetClassName($sValue) { 
    17     return str_replace(' ', '', ucwords(str_replace('_', ' ', $sValue))); 
    18 } 
    19  
    20 function stdGetModuleIcon($sName, $sType = 'menu') { 
    21     $aType2Prefix = array('menu' => 'mi', 'page' => 'pi'); 
    22  
    23     $oTemplate = BxDolStudioTemplate::getInstance(); 
    24     $sDefaultIcon = $oTemplate->getIconUrl($aType2Prefix[$sType] . '-mod-empty.png');  
    25  
    26     bx_import('BxDolModuleQuery'); 
    27     $aModule = BxDolModuleQuery::getInstance()->getModuleByName($sName); 
    28     if(!empty($aModule)) 
    29         return $sDefaultIcon; 
    30  
    31     $sModuleIcon = isset($aModule['path']) ? $oTemplate->getIconUrl('modules/' . $aModule['path'] . '|std-' . $aType2Prefix[$sType] . '.png') : ''; 
    32     return !empty($sModuleIcon) ? $sModuleIcon : $sDefaultIcon; 
    33 } 
    34  
    35 function stdGetModuleTitle($sName) { 
    36     $sPrefix = '_adm_txt_module_'; 
    37  
    38     if(in_array($sName, array(BX_DOL_STUDIO_MODULE_SYSTEM, BX_DOL_STUDIO_MODULE_CUSTOM))) 
    39         return _t($sPrefix . $sName); 
    40  
    41     bx_import('BxDolModuleQuery'); 
    42     $aModule = BxDolModuleQuery::getInstance()->getModuleByName($sName); 
    43     if(!empty($aModule)) 
    44         return $aModule['title']; 
    45  
    46     return _t($sPrefix . strtolower($sName)); 
    47 } 
    48  
    49 function stdGetModules($bShowCustom = true, $bShowSystem = true) { 
    50     $aResult = array(); 
    51  
    52     if($bShowSystem) 
    53         $aResult[] = array('key' => BX_DOL_STUDIO_MODULE_SYSTEM, 'value' => stdGetModuleTitle(BX_DOL_STUDIO_MODULE_SYSTEM)); 
    54  
    55     if($bShowCustom) 
    56         $aResult[] = array('key' => BX_DOL_STUDIO_MODULE_CUSTOM, 'value' => stdGetModuleTitle(BX_DOL_STUDIO_MODULE_CUSTOM)); 
    57  
    58     bx_import('BxDolModuleQuery'); 
    59     $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1)); 
    60     foreach($aModules as $aModule) 
    61         $aResult[] = array('key' => $aModule['name'], 'value' => $aModule['title']); 
    62  
    63     return $aResult; 
    64 } 
    65  
    66 function stdAddInArray($aInput, $sKey, $aValues) { 
    67     reset($aInput); 
    68     $iInput = count($aInput); 
    69     for($i = 0; $i < $iInput; $i++, next($aInput)) 
    70         if(key($aInput) == $sKey) 
    71             break; 
    72  
    73     $aOutput = array_slice($aInput, 0, $i + 1); 
    74     $aOutput = array_merge($aOutput, $aValues); 
    75     $aOutput = array_merge($aOutput, array_slice($aInput, $i + 1)); 
    76  
    77     return $aOutput; 
    78 } 
    799/** @} */ 
  • trunk/studio/js/permissions_actions.js

    r15794 r15953  
    1919 
    2020BxDolStudioPermissionsActions.prototype.onChangeLevel = function() { 
    21     var iLevel = parseInt($('#bx-grid-level-' + this.sObjNameGrid).val()); 
     21    var iLevel = parseInt($('#bx-grid-level-' + this.sObjNameGrid).val().replace('id-', '')); 
    2222    document.location.href = this.sPageUrl + (iLevel > 0 ? '&level=' + iLevel : '');  
    2323}; 
  • trunk/studio/js/polyglot_keys.js

    r15706 r15953  
    1717 
    1818BxDolStudioPolyglotKeys.prototype.onChangeFilter = function() { 
    19     var sValueModule = $('#bx-grid-module-' + this.sObjNameGrid).val(); 
     19    var sValueModule = $('#bx-grid-module-' + this.sObjNameGrid).val().replace('id-', ''); 
    2020 
    2121    var sValueSearch = $('#bx-grid-search-' + this.sObjNameGrid).val(); 
  • trunk/studio/templates/base/scripts/BxBaseStudioBuilderPage.php

    r15949 r15953  
    1010defined('BX_DOL') or die('hack attempt'); 
    1111 
     12bx_import('BxDolStudioUtils'); 
    1213bx_import('BxDolStudioBuilderPage'); 
    1314bx_import('BxTemplStudioFormView'); 
     
    141142                        'onclick' => $sJsObject . ".performAction('block_edit', {id: " . $aBlock['id'] . "})", 
    142143                        'title' => _t($aBlock['title']), 
    143                         'icon' => stdGetModuleIcon($aBlock['module']), 
    144                         'module' =>stdGetModuleTitle($aBlock['module']), 
     144                        'icon' => $this->getModuleIcon($aBlock['module']), 
     145                        'module' => $this->getModuleTitle($aBlock['module']), 
    145146                        'bx_if:show_checkbox' => array( 
    146147                            'condition' => false, 
     
    359360        if($oForm->isSubmittedAndValid()) { 
    360361            $sTitleValue = $oForm->getCleanValue('title'); 
    361             $sObject = stdGetSystemName($sTitleValue); 
     362            $sObject = BxDolStudioUtils::getSystemName($sTitleValue); 
    362363            $sTitleKey = '_sys_bpb_caption_' . $sObject; 
    363364            $oForm->setSubmittedValue('title', $sTitleKey, $aForm['form_attrs']['method']); 
     
    13171318                'html_id' => $this->aHtmlIds['block_id'] . $aBlock['id'], 
    13181319                'title' => _t($aBlock['title']), 
    1319                 'icon' => stdGetModuleIcon($aBlock['module']), 
    1320                 'module' =>stdGetModuleTitle($aBlock['module']), 
     1320                'icon' => $this->getModuleIcon($aBlock['module']), 
     1321                'module' => $this->getModuleTitle($aBlock['module']), 
    13211322                'bx_if:show_checkbox' => array( 
    13221323                    'condition' => true, 
  • trunk/studio/templates/base/scripts/BxBaseStudioFormsDisplays.php

    r15936 r15953  
    200200            ), 
    201201            'value' => $this->sForm, 
    202             'values' => array( 
    203                 array('key' => '', 'value' => _t('_adm_form_txt_all_forms')), 
    204             ) 
     202            'values' => array() 
    205203        ); 
    206204 
     
    208206        $this->oDb->getForms(array('type' => 'all'), $aForms, false); 
    209207        foreach($aForms as $aForm) 
    210             $aInputForms['values'][] = array('key' => $aForm['object'], 'value' => _t($aForm['title'])); 
     208            $aInputForms['values'][$aForm['object']] = _t($aForm['title']); 
     209 
     210        asort($aInputForms['values']); 
     211        $aInputForms['values'] = array_merge(array('' => _t('_adm_form_txt_all_forms')), $aInputForms['values']); 
    211212 
    212213        $sContent .= $oForm->genRow($aInputForms); 
     
    220221            ), 
    221222            'value' => '', 
    222             'values' => array( 
    223                 array('key' => '', 'value' => _t('_adm_form_txt_all_modules')) 
    224             ) 
    225         ); 
    226         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules(false)); 
    227  
     223            'values' => $this->getModules(false) 
     224        ); 
     225 
     226        asort($aInputModules['values']); 
     227        $aInputModules['values'] = array_merge(array('' => _t('_adm_form_txt_all_modules')), $aInputModules['values']); 
     228         
    228229        $sContent .= $oForm->genRow($aInputModules); 
    229230 
  • trunk/studio/templates/base/scripts/BxBaseStudioFormsFields.php

    r15943 r15953  
    197197            'value' => $this->sObject . $this->sParamsDivider . $this->sDisplay, 
    198198            'values' => array( 
    199                 array('key' => '', 'value' => _t('_adm_form_txt_select_display')), 
     199                '' => _t('_adm_form_txt_select_display'), 
    200200            ) 
    201201        ); 
     
    205205 
    206206        foreach($aDisplays as $aDisplay) 
    207             $aDisplaysGrouped[$aDisplay['object']][] = $aDisplay;  
     207            $aDisplaysGrouped[_t($aDisplay['form_title'])][] = $aDisplay; 
     208        ksort($aDisplaysGrouped); 
    208209 
    209210        foreach($aDisplaysGrouped as $sForm => $aDisplays) { 
     
    211212                $aInputDisplays['values'][] = array('type' => 'group_header', 'value' => _t($aDisplays[0]['form_title'])); 
    212213 
     214            $aDisplaysSubgroup = array(); 
    213215            foreach($aDisplays as $aDisplay) 
    214                 $aInputDisplays['values'][] = array('key' => $aDisplay['object'] . $this->sParamsDivider . $aDisplay['name'], 'value' => _t($aDisplay['title'])); 
     216                $aDisplaysSubgroup[$aDisplay['object'] . $this->sParamsDivider . $aDisplay['name']] = _t($aDisplay['title']); 
     217 
     218            asort($aDisplaysSubgroup); 
     219            $aInputDisplays['values'] = array_merge($aInputDisplays['values'], $aDisplaysSubgroup); 
    215220 
    216221            if(count($aDisplays) > 0) 
  • trunk/studio/templates/base/scripts/BxBaseStudioFormsForms.php

    r15936 r15953  
    195195            ), 
    196196            'value' => '', 
    197             'values' => array( 
    198                 array('key' => '', 'value' => _t('_adm_form_txt_all_modules')) 
    199             ) 
     197            'values' => $this->getModules(false) 
    200198        ); 
    201         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules(false)); 
     199 
     200        asort($aInputModules['values']); 
     201        $aInputModules['values'] = array_merge(array('' => _t('_adm_form_txt_all_modules')), $aInputModules['values']); 
    202202 
    203203        $sContent .= $oForm->genRow($aInputModules); 
  • trunk/studio/templates/base/scripts/BxBaseStudioFormsPreValues.php

    r15936 r15953  
    430430            ), 
    431431            'value' => $this->sList, 
    432             'values' => array( 
    433                 array('key' => '0', 'value' => _t('_adm_form_txt_select_list')) 
    434             ) 
     432            'values' => array() 
    435433        ); 
    436434 
     
    438436        $this->oDb->getLists(array('type' => 'all'), $aLists, false); 
    439437        foreach($aLists as $aList) 
    440             $aInputLists['values'][] = array('key' => $aList['key'], 'value' => _t($aList['title'])); 
     438            $aInputLists['values'][$aList['key']] = _t($aList['title']); 
     439 
     440        asort($aInputLists['values']); 
     441        $aInputLists['values'] = array_merge(array('' => _t('_adm_form_txt_select_list')), $aInputLists['values']); 
    441442 
    442443        $sContent .= $oForm->genRow($aInputLists); 
  • trunk/studio/templates/base/scripts/BxBaseStudioNavigationImport.php

    r15936 r15953  
    146146            ), 
    147147            'value' => '', 
    148             'values' => array( 
    149                 array('key' => '0', 'value' => _t('_adm_nav_txt_all_sets')) 
    150             ) 
     148            'values' => array() 
    151149        ); 
    152150 
    153151        $aSets = array(); 
    154         $iSets = $this->oDb->getSets(array('type' => 'all', 'except' => $this->sSet), $aSets); 
     152        $this->oDb->getSets(array('type' => 'all', 'except' => $this->sSet), $aSets, false); 
    155153        foreach($aSets as $aSet) 
    156             $aInputSets['values'][] = array('key' => $aSet['name'], 'value' => _t($aSet['title'])); 
     154            $aInputSets['values'][$aSet['name']] = _t($aSet['title']); 
     155 
     156        asort($aInputSets['values']); 
     157        $aInputSets['values'] = array_merge(array('' => _t('_adm_nav_txt_select_set')), $aInputSets['values']); 
    157158 
    158159        $sContent .= $oForm->genRow($aInputSets); 
     
    166167            ), 
    167168            'value' => '', 
    168             'values' => array( 
    169                 array('key' => '', 'value' => _t('_adm_nav_txt_all_modules')), 
    170             ) 
     169            'values' => $this->getModules() 
    171170        ); 
    172         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules()); 
     171 
     172        asort($aInputModules['values']); 
     173        $aInputModules['values'] = array_merge(array('' => _t('_adm_nav_txt_all_modules')), $aInputModules['values']); 
    173174 
    174175        $sContent .= $oForm->genRow($aInputModules); 
  • trunk/studio/templates/base/scripts/BxBaseStudioNavigationItems.php

    r15936 r15953  
    645645            ), 
    646646            'value' => $this->sSet, 
    647             'values' => array( 
    648                 array('key' => '0', 'value' => _t('_adm_nav_txt_select_set')) 
    649             ) 
     647            'values' => array() 
    650648        ); 
    651649 
    652650        $aSets = array(); 
    653         $iSets = $this->oDb->getSets(array('type' => 'all'), $aSets); 
     651        $this->oDb->getSets(array('type' => 'all'), $aSets, false); 
    654652        foreach($aSets as $aSet) 
    655             $aInputSets['values'][] = array('key' => $aSet['name'], 'value' => _t($aSet['title'])); 
     653            $aInputSets['values'][$aSet['name']] = _t($aSet['title']); 
     654 
     655        asort($aInputSets['values']); 
     656        $aInputSets['values'] = array_merge(array('' => _t('_adm_nav_txt_select_set')), $aInputSets['values']); 
    656657 
    657658        $sContent .= $oForm->genRow($aInputSets); 
     
    667668            ), 
    668669            'value' => '', 
    669             'values' => array( 
    670                 array('key' => '', 'value' => _t('_adm_nav_txt_all_modules')) 
    671             ) 
     670            'values' => $this->getModules() 
    672671        ); 
    673         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules()); 
     672 
     673        asort($aInputModules['values']); 
     674        $aInputModules['values'] = array_merge(array('' => _t('_adm_nav_txt_all_modules')), $aInputModules['values']); 
    674675 
    675676        $sContent .= $oForm->genRow($aInputModules); 
  • trunk/studio/templates/base/scripts/BxBaseStudioNavigationMenus.php

    r15936 r15953  
    528528            ), 
    529529            'value' => '', 
    530             'values' => array( 
    531                 array('key' => '', 'value' => _t('_adm_nav_txt_all_modules')), 
    532             ) 
     530            'values' => $this->getModules() 
    533531        ); 
    534         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules()); 
     532 
     533        asort($aInputModules['values']); 
     534        $aInputModules['values'] = array_merge(array('' => _t('_adm_nav_txt_all_modules')), $aInputModules['values']); 
    535535 
    536536        $sContent .= $oForm->genRow($aInputModules); 
  • trunk/studio/templates/base/scripts/BxBaseStudioNavigationSets.php

    r15936 r15953  
    349349            ), 
    350350            'value' => '', 
    351             'values' => array( 
    352                 array('key' => '', 'value' => _t('_adm_nav_txt_all_modules')) 
    353             ) 
     351            'values' => $this->getModules() 
    354352        ); 
    355         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules()); 
     353 
     354        asort($aInputModules['values']); 
     355        $aInputModules['values'] = array_merge(array('' => _t('_adm_nav_txt_all_modules')), $aInputModules['values']); 
    356356 
    357357        $sContent .= $oForm->genRow($aInputModules); 
  • trunk/studio/templates/base/scripts/BxBaseStudioPermissionsActions.php

    r15936 r15953  
    257257            ), 
    258258            'value' => $this->iLevel, 
    259             'values' => array( 
    260                 array('key' => '0', 'value' => _t('_adm_prm_txt_select_level')) 
    261             ) 
     259            'values' => array() 
    262260        ); 
    263261 
    264262        $aLevels = array(); 
    265         $iLevels = $this->oDb->getLevels(array('type' => 'all'), $aLevels); 
     263        $this->oDb->getLevels(array('type' => 'all'), $aLevels, false); 
    266264        foreach($aLevels as $aLevel) 
    267             $aInputLevels['values'][] = array('key' => $aLevel['id'], 'value' => _t($aLevel['name'])); 
     265            $aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']); 
     266 
     267        asort($aInputLevels['values']); 
     268        $aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']); 
    268269 
    269270        $sContent .= $oForm->genRow($aInputLevels); 
     
    279280            ), 
    280281            'value' => '', 
    281             'values' => array( 
    282                 array('key' => '', 'value' => _t('_adm_prm_txt_all_modules')), 
    283             ) 
     282            'values' => $this->getModules(false) 
    284283        ); 
    285         $aInputModules['values'] = array_merge($aInputModules['values'], $this->getModules(false)); 
     284 
     285        asort($aInputModules['values']); 
     286        $aInputModules['values'] = array_merge(array('' => _t('_adm_prm_txt_all_modules')), $aInputModules['values']); 
    286287 
    287288        $sContent .= $oForm->genRow($aInputModules); 
  • trunk/studio/templates/base/scripts/BxBaseStudioPermissionsLevels.php

    r15936 r15953  
    450450    } 
    451451    protected function _getCellIcon ($mixedValue, $sKey, $aField, $aRow) { 
    452         $sSrc = BX_DOL_URL_ROOT . 'media/images/membership/' . $mixedValue; 
     452        $sSrc = ''; 
    453453        if(is_numeric($mixedValue)) { 
    454454            bx_import('BxDolStorage'); 
     
    458458                $sSrc = $sFileUrl; 
    459459        } 
     460        else  
     461            $sSrc = $this->_oTemplate->getImageUrl($mixedValue); 
    460462 
    461463        $mixedValue = $this->_oTemplate->parseHtmlByName('bx_img.html', array( 
  • trunk/studio/templates/base/scripts/BxBaseStudioPermissionsPrices.php

    r15936 r15953  
    330330            ), 
    331331            'value' => $this->iLevel, 
    332             'values' => array( 
    333                 array('key' => '0', 'value' => _t('_adm_prm_txt_select_level')) 
    334             ) 
     332            'values' => array() 
    335333        ); 
    336334 
    337335        $aLevels = array(); 
    338         $iLevels = $this->oDb->getLevels(array('type' => 'all'), $aLevels); 
     336        $this->oDb->getLevels(array('type' => 'all'), $aLevels, false); 
    339337        foreach($aLevels as $aLevel) 
    340             $aInputLevels['values'][] = array('key' => $aLevel['id'], 'value' => _t($aLevel['name'])); 
     338            $aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']); 
     339 
     340        asort($aInputLevels['values']); 
     341        $aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']); 
    341342 
    342343        $sContent .= $oForm->genRow($aInputLevels); 
  • trunk/studio/templates/base/scripts/BxBaseStudioPolyglotKeys.php

    r15817 r15953  
    295295        parent::_getFilterControls(); 
    296296 
     297        $sContent = ""; 
     298 
    297299        bx_import('BxTemplStudioFormView'); 
    298300        $oForm = new BxTemplStudioFormView(array()); 
     
    305307                'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()' 
    306308            ), 
    307             'values' => array( 
    308                 array('key' => '0', 'value' => _t('_adm_pgt_txt_all_categories')) 
    309             ) 
     309            'values' => array() 
    310310        ); 
    311311 
     
    313313        $iCategories = $this->oDb->getCategoriesBy(array('type' => 'all'), $aCategories); 
    314314        foreach($aCategories as $aCategory) 
    315             $aInputModules['values'][] = array('key' => $aCategory['id'], 'value' => $aCategory['name']); 
     315            $aInputModules['values']['id-' . $aCategory['id']] = $aCategory['name']; 
     316 
     317        asort($aInputModules['values']); 
     318        $aInputModules['values'] = array_merge(array('id-0' => _t('_adm_pgt_txt_all_categories')), $aInputModules['values']); 
     319 
     320        $sContent .= $oForm->genRow($aInputModules); 
    316321 
    317322        $aInputSearch = array( 
     
    324329        ); 
    325330 
    326         return $oForm->genRow($aInputModules) . $oForm->genRow($aInputSearch); 
     331        $sContent .= $oForm->genRow($aInputSearch); 
     332 
     333        return $sContent; 
    327334    } 
    328335} 
Note: See TracChangeset for help on using the changeset viewer.