@ -30,14 +30,18 @@ export class DriverSelector extends BI.Widget {
customDrivers : SearchTextValueCombo = null ;
beforeRender ( cb : Function ) {
this . store . initDriverClassList ( cb ) ;
}
watch = {
driverClassItems : items = > {
// this.customDrivers.populate(items);
// this.customDrivers.setValue(this.model.customDriver.value);
this . customDrivers . populate ( items ) ;
this . customDrivers . setValue ( this . model . customDriver . value ) ;
} ,
driverManageEntryVisible : b = > {
this . driverManageEntry . setVisible ( false ) ;
this . driverManageEntry . setVisible ( b ) ;
} ,
} ;
@ -55,7 +59,6 @@ export class DriverSelector extends BI.Widget {
type : BI . TextValueCombo . xtype ,
width : 86 ,
value : this.model.selectedDriverType ,
invisible : true ,
items : [
{
text : BI.i18nText ( 'Dec-Basic_Default' ) ,
@ -95,7 +98,7 @@ export class DriverSelector extends BI.Widget {
this . defaultDrivers = _ref ;
} ,
invisible : this.model.driverSource !== '' ,
width : 300 ,
width : 204 ,
items : this.model.defaultDrivers ,
value : this.model.defaultDriver.driver ,
listeners : [
@ -116,7 +119,7 @@ export class DriverSelector extends BI.Widget {
ref : _ref = > {
this . customDrivers = _ref ;
} ,
invisible : true ,
invisible : this.model.d riverSo urc e === '' ,
width : 204 ,
watermark : BI.i18nText ( 'Dec-Please_Input' ) ,
items : this.model.driverClassItems ,
@ -146,7 +149,7 @@ export class DriverSelector extends BI.Widget {
text : BI.i18nText ( 'Dec-Dcm_Create_New_Driver' ) ,
} ,
from : '.dec-dcm' ,
invisible : tru e ,
invisible : ! this . model . driverManageEntryVisibl e,
listeners : [
{
eventName : 'EVENT_CLOSE' ,
@ -175,7 +178,7 @@ export class DriverSelector extends BI.Widget {
getValue() {
return {
// driverSource: this.model.driverSource,
driverSource : this.model.driverSource ,
driver : this.model.driverSource === '' ? this . model.defaultDriver.driver : this.model.customDriver.driver ,
} ;
}