File tree 2 files changed +11
-4
lines changed
manager/assets/modext/widgets/core
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -639,12 +639,19 @@ MODx.combo.Namespace = function(config) {
639
639
Ext . extend ( MODx . combo . Namespace , MODx . combo . ComboBox , {
640
640
preselectFirstValue : function ( r ) {
641
641
var item ;
642
+
642
643
if ( this . config . preselectValue == '' ) {
643
644
item = r . getAt ( 0 ) ;
644
645
} else {
645
- item = { data : { name : this . config . preselectValue } } ;
646
+ var found = r . find ( 'name' , this . config . preselectValue ) ;
647
+
648
+ if ( found != - 1 ) {
649
+ item = r . getAt ( found ) ;
650
+ } else {
651
+ item = r . getAt ( 0 ) ;
652
+ }
646
653
}
647
-
654
+
648
655
if ( item ) {
649
656
this . setValue ( item . data . name ) ;
650
657
this . fireEvent ( 'select' , this , item ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ MODx.grid.SettingsGrid = function(config) {
23
23
, name : 'namespace'
24
24
, id : 'modx-filter-namespace'
25
25
, emptyText : _ ( 'namespace_filter' )
26
- , preselectValue : MODx . request [ 'ns' ] ? MODx . request [ 'ns' ] : ''
26
+ , preselectValue : MODx . request [ 'ns' ] ? MODx . request [ 'ns' ] : 'core '
27
27
, allowBlank : false
28
28
, editable : true
29
29
, typeAhead : true
@@ -138,7 +138,7 @@ MODx.grid.SettingsGrid = function(config) {
138
138
, url : MODx . config . connector_url
139
139
, baseParams : {
140
140
action : 'system/settings/getList'
141
- , namespace : MODx . request [ 'ns' ] ? MODx . request [ 'ns' ] : ''
141
+ , namespace : MODx . request [ 'ns' ] ? MODx . request [ 'ns' ] : 'core '
142
142
, area : MODx . request [ 'area' ]
143
143
}
144
144
, clicksToEdit : 2
You can’t perform that action at this time.
0 commit comments