* @param {Roo.bootstrap.ComboBox} combo This combo box
* @param {Object} cfg set html .
*/
- 'touchviewdisplay' : true
-
+ 'touchviewdisplay' : true,
+ /**
+ * @event ontouchviewload
+ * Fires when touch view load (local store)
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ */
+ 'ontouchviewload' : true
});
this.item = [];
this.list.on('scroll', this.onViewScroll, this);
if(!this.tpl){
- this.tpl = '<li class="roo-select2-result"><div class="checkbox"><input id="{roo-id}" type="checkbox" {roo-data-checked}><label for="{roo-id}"><b>{' + this.displayField + '}</b></label></div></li>';
+ this.tpl = '<li class="roo-select2-result"><div class="checkbox"><input id="{roo-id}"' +
+ 'type="checkbox" {roo-data-checked}><label for="{roo-id}"><b>{' + this.displayField + '}</b></label></div></li>';
}
this.view = new Roo.View(this.list, this.tpl, {
- singleSelect:true, tickable:true, parent:this, store: this.store, selectedClass: this.selectedClass
+ singleSelect:true,
+ tickable:true,
+ parent:this,
+ store: this.store,
+ selectedClass: this.selectedClass
});
//this.view.wrapEl.setDisplayed(false);
onEmptyResults : function(){
if(this.tickable && this.editable){
+ this.hasFocus = false;
this.restrictHeight();
return;
}
if(this.fireEvent('beforequery', qe)===false || qe.cancel){
return false;
}
-
- Roo.log(qe);
-
q = qe.query;
forceAll = qe.forceAll;
if(forceAll === true || (q.length >= this.minChars)){
this.hasQuery = true;
- Roo.log('in??');
+
if(this.lastQuery != q || this.alwaysQuery){
this.lastQuery = q;
if(this.mode == 'local'){
this.onLoad();
- Roo.log('onload???');
}else{
validate : function()
{
+ if(this.getVisibilityEl().hasClass('hidden')){
+ return true;
+ }
+
var v = this.getRawValue();
if(this.multiple){
(function() { firstChecked.findParent('li').scrollIntoView(_this.touchViewListGroup.dom); }).defer(500);
}
+ this.fireEvent('ontouchviewload', this);
+
},
onTouchViewLoadException : function()