@ -36,6 +36,11 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
return ( o . itemsCreator === BI . emptyFn ) ? this . _getSyncConfig ( ) : this . _getAsyncConfig ( ) ;
} ,
_shouldWrapper : function ( ) {
var o = this . options ;
return ! o . allowEdit && o . itemsCreator === BI . emptyFn ;
} ,
_getBaseConfig : function ( ) {
var self = this , o = this . options ;
return {
@ -94,6 +99,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
container : o . container ,
allowInsertValue : o . allowInsertValue ,
allowSearchValue : o . allowSearchValue ,
allowEdit : o . allowEdit ,
cls : "multilayer-single-tree-trigger" ,
ref : function ( _ref ) {
self . trigger = _ref ;
@ -130,11 +136,6 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
action : function ( ) {
self . fireEvent ( BI . MultiLayerSingleTreeCombo . EVENT _SEARCHING ) ;
}
} , {
eventName : BI . MultiLayerSingleTreeTrigger . EVENT _STOP ,
action : function ( ) {
self . fireEvent ( BI . MultiLayerSingleTreeCombo . EVENT _STOP ) ;
}
} , {
eventName : BI . MultiLayerSingleTreeTrigger . EVENT _ADD _ITEM ,
action : function ( ) {
@ -183,28 +184,13 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
tipType : o . tipType ,
warningTitle : o . warningTitle ,
valueFormatter : o . valueFormatter ,
} ,
}
} ) ;
} ,
_getAsyncConfig : function ( ) {
var o = this . options , self = this ;
var baseConfig = this . _getBaseConfig ( ) ;
return BI . extend ( baseConfig , o . allowEdit ? this . _getSearchConfig ( ) : {
el : {
type : "bi.single_tree_trigger" ,
ref : function ( _ref ) {
self . textTrigger = _ref ;
} ,
text : o . text ,
height : o . height ,
items : o . items ,
value : o . value ,
tipType : o . tipType ,
warningTitle : o . warningTitle ,
valueFormatter : o . valueFormatter ,
} ,
} ) ;
var config = this . _getBaseConfig ( ) ;
return BI . extend ( config , this . _getSearchConfig ( ) ) ;
} ,
getSearcher : function ( ) {
@ -257,6 +243,5 @@ BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI . MultiLayerSingleTreeCombo . EVENT _BLUR = "EVENT_BLUR" ;
BI . MultiLayerSingleTreeCombo . EVENT _FOCUS = "EVENT_FOCUS" ;
BI . MultiLayerSingleTreeCombo . EVENT _CHANGE = "EVENT_CHANGE" ;
BI . MultiLayerSingleTreeCombo . EVENT _STOP = "EVENT_STOP" ;
BI . MultiLayerSingleTreeCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" ;
BI . shortcut ( "bi.multilayer_single_tree_combo" , BI . MultiLayerSingleTreeCombo ) ;
BI . shortcut ( "bi.multilayer_single_tree_combo" , BI . MultiLayerSingleTreeCombo ) ;