@ -6,7 +6,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig : function ( ) {
return BI . extend ( BI . MultiLayerSelectTreeCombo . superclass . _defaultConfig . apply ( this , arguments ) , {
baseCls : "bi-multilayer-select-tree-combo bi-border bi-focus-shadow bi-border-radius " ,
baseCls : "bi-multilayer-select-tree-combo" ,
isDefaultInit : false ,
height : 24 ,
text : "" ,
@ -21,7 +21,11 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
} ,
_init : function ( ) {
this . options . height -= 2 ;
var o = this . options ;
if ( this . _shouldWrapper ( ) ) {
o . height -= 2 ;
BI . isNumeric ( o . width ) && ( o . width -= 2 ) ;
}
BI . MultiLayerSelectTreeCombo . superclass . _init . apply ( this , arguments ) ;
} ,
@ -30,7 +34,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
var combo = ( o . itemsCreator === BI . emptyFn ) ? this . _getSyncConfig ( ) : this . _getAsyncConfig ( ) ;
return ( ! o . allowEdit && o . itemsCreator === BI . emptyFn ) ? combo : {
return this . _shouldWrapper ( ) ? combo : {
type : "bi.absolute" ,
items : [ {
el : combo ,
@ -62,10 +66,16 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
} ;
} ,
_shouldWrapper : function ( ) {
var o = this . options ;
return ! o . allowEdit && o . itemsCreator === BI . emptyFn ;
} ,
_getBaseConfig : function ( ) {
var self = this , o = this . options ;
return {
type : "bi.combo" ,
cls : "bi-border bi-focus-shadow bi-border-radius" ,
container : o . container ,
destroyWhenHide : o . destroyWhenHide ,
adjustLength : 2 ,