@ -17,7 +17,7 @@
text : item . text ,
text : item . text ,
icon : item . icon ,
icon : item . icon ,
cls : item . cls ,
cls : item . cls ,
iconCls1 : item . iconCls1 ,
iconCls1 : item . iconCls1 ,
value : item . value
value : item . value
} ;
} ;
}
}
@ -25,7 +25,7 @@
} ) ;
} ) ;
return result ;
return result ;
}
}
/ * *
/ * *
* Created by roy on 15 / 8 / 14.
* Created by roy on 15 / 8 / 14.
* /
* /
@ -41,16 +41,17 @@
container : null ,
container : null ,
stopPropagation : false ,
stopPropagation : false ,
el : { } ,
el : { } ,
popup : { } ,
minWidth : 140 ,
minWidth : 140 ,
maxHeight : 1000 ,
maxHeight : 1000 ,
destroyWhenHide : false
destroyWhenHide : false
} ) ;
} ) ;
} ,
} ,
_init : function ( ) {
_init : function ( ) {
BI . DownListCombo . superclass . _init . apply ( this , arguments ) ;
BI . DownListCombo . superclass . _init . apply ( this , arguments ) ;
var self = this , o = this . options ;
var self = this , o = this . options ;
this . downlistcombo = BI . createWidget ( {
this . downlistcombo = BI . createWidget ( {
element : this ,
element : this ,
type : "bi.combo" ,
type : "bi.combo" ,
@ -63,12 +64,13 @@
belowMouse : o . belowMouse ,
belowMouse : o . belowMouse ,
stopPropagation : o . stopPropagation ,
stopPropagation : o . stopPropagation ,
destroyWhenHide : o . destroyWhenHide ,
destroyWhenHide : o . destroyWhenHide ,
el : BI . createWidget ( o . el , {
el : {
type : "bi.icon_trigger" ,
type : "bi.icon_trigger" ,
extraCls : o . iconCls ,
extraCls : o . iconCls ,
width : o . width ,
width : o . width ,
height : o . height
height : o . height ,
} ) ,
... o . el
} ,
popup : {
popup : {
el : {
el : {
type : "bi.down_list_popup" ,
type : "bi.down_list_popup" ,
@ -94,39 +96,40 @@
} ,
} ,
stopPropagation : o . stopPropagation ,
stopPropagation : o . stopPropagation ,
maxHeight : o . maxHeight ,
maxHeight : o . maxHeight ,
minWidth : o . minWidth
minWidth : o . minWidth ,
... o . popup
}
}
} ) ;
} ) ;
this . downlistcombo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) {
this . downlistcombo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) {
self . fireEvent ( BI . DownListCombo . EVENT _BEFORE _POPUPVIEW ) ;
self . fireEvent ( BI . DownListCombo . EVENT _BEFORE _POPUPVIEW ) ;
} ) ;
} ) ;
} ,
} ,
hideView : function ( ) {
hideView : function ( ) {
this . downlistcombo . hideView ( ) ;
this . downlistcombo . hideView ( ) ;
} ,
} ,
showView : function ( e ) {
showView : function ( e ) {
this . downlistcombo . showView ( e ) ;
this . downlistcombo . showView ( e ) ;
} ,
} ,
populate : function ( items ) {
populate : function ( items ) {
this . popupView . populate ( items ) ;
this . popupView . populate ( items ) ;
} ,
} ,
setValue : function ( v ) {
setValue : function ( v ) {
this . popupView . setValue ( v ) ;
this . popupView . setValue ( v ) ;
} ,
} ,
getValue : function ( ) {
getValue : function ( ) {
return this . popupView . getValue ( ) ;
return this . popupView . getValue ( ) ;
} ,
} ,
adjustWidth : function ( ) {
adjustWidth : function ( ) {
this . downlistcombo . adjustWidth ( ) ;
this . downlistcombo . adjustWidth ( ) ;
} ,
} ,
adjustHeight : function ( ) {
adjustHeight : function ( ) {
this . downlistcombo . adjustHeight ( ) ;
this . downlistcombo . adjustHeight ( ) ;
}
}
@ -134,6 +137,6 @@
BI . DownListCombo . EVENT _CHANGE = "EVENT_CHANGE" ;
BI . DownListCombo . EVENT _CHANGE = "EVENT_CHANGE" ;
BI . DownListCombo . EVENT _SON _VALUE _CHANGE = "EVENT_SON_VALUE_CHANGE" ;
BI . DownListCombo . EVENT _SON _VALUE _CHANGE = "EVENT_SON_VALUE_CHANGE" ;
BI . DownListCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" ;
BI . DownListCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" ;
BI . shortcut ( "bi.down_list_combo" , BI . DownListCombo ) ;
BI . shortcut ( "bi.down_list_combo" , BI . DownListCombo ) ;
} ( ) ) ;
} ( ) ) ;