/**
* @event expand
* Fires when the dropdown list is expanded
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ */
'expand' : true,
/**
* @event collapse
* Fires when the dropdown list is collapsed
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ */
'collapse' : true,
/**
* @event beforeselect
* Fires before a list item is selected. Return false to cancel the selection.
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- * @param {Roo.data.Record} record The data record returned from the underlying store
- * @param {Number} index The index of the selected item in the dropdown list
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ * @param {Roo.data.Record} record The data record returned from the underlying store
+ * @param {Number} index The index of the selected item in the dropdown list
+ */
'beforeselect' : true,
/**
* @event select
* Fires when a list item is selected
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- * @param {Roo.data.Record} record The data record returned from the underlying store (or false on clear)
- * @param {Number} index The index of the selected item in the dropdown list
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ * @param {Roo.data.Record} record The data record returned from the underlying store (or false on clear)
+ * @param {Number} index The index of the selected item in the dropdown list
+ */
'select' : true,
/**
* @event beforequery
* Fires before all queries are processed. Return false to cancel the query or set cancel to true.
* The event object passed has these properties:
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- * @param {String} query The query
- * @param {Boolean} forceAll true to force "all" query
- * @param {Boolean} cancel true to cancel the query
- * @param {Object} e The query event object
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ * @param {String} query The query
+ * @param {Boolean} forceAll true to force "all" query
+ * @param {Boolean} cancel true to cancel the query
+ * @param {Object} e The query event object
+ */
'beforequery': true,
/**
* @event add
* Fires when the 'add' icon is pressed (add a listener to enable add button)
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ */
'add' : true,
/**
* @event edit
* Fires when the 'edit' icon is pressed (add a listener to enable add button)
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- * @param {Roo.data.Record|false} record The data record returned from the underlying store (or false on nothing selected)
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ * @param {Roo.data.Record|false} record The data record returned from the underlying store (or false on nothing selected)
+ */
'edit' : true,
/**
* @event remove
* Fires when the remove value from the combobox array
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ */
'remove' : true,
/**
* @event afterremove
* Fires when the remove value from the combobox array
- * @param {Roo.bootstrap.ComboBox} combo This combo box
- */
+ * @param {Roo.bootstrap.ComboBox} combo This combo box
+ */
'afterremove' : true,
/**
* @event specialfilter
*/
if(!this.tickable){
cfg = Roo.bootstrap.ComboBox.superclass.getAutoCreate.call(this);
- if(this.name == 'info_year_invest_id_display_name'){
- Roo.log('cfg.................................................');
- Roo.log(cfg);
- }
return cfg;
}
tag: 'label',
//cls : 'input-group-addon',
html : this.fieldLabel
-
},
-
combobox
-
];
if(this.indicatorpos == 'right'){
-
cfg.cn = [
{
tag: 'label',
//cls : 'input-group-addon',
- cn : [
- {
- tag : 'span',
- html : this.fieldLabel
- },
- {
- tag : 'i',
- cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
- tooltip : 'This field is required'
- }
- ]
+ html : this.fieldLabel
+ },
+ {
+ tag : 'i',
+ cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
+ tooltip : 'This field is required'
},
-
-
-
combobox
-
];
-
+
}
} else {
throw "can not find store for combo";
}
+ this.indicator = this.indicatorEl();
+
this.store = Roo.factory(this.store, Roo.data);
this.store.parent = this;
// use the rendered HTML.
// so we have to trash and replace the previous code.
if (Roo.XComponent.build_from_html) {
-
// remove this element....
var e = this.el.dom, k=0;
while (e ) { e = e.previousSibling; ++k;}
this.rendered = false;
this.render(this.parent().getChildContainer(true), k);
-
-
-
}
if(Roo.isIOS && this.useNativeIOS){
this.list.on('mouseover', this.onViewOver, this);
this.list.on('mousemove', this.onViewMove, this);
-
this.list.on('scroll', this.onViewScroll, this);
/*
var close = this.closeTriggerEl();
if(close){
- (vv.length || vv * 1 > 0) ? close.show() : close.hide();
+ if(dv.length || vv * 1 > 0){
+ close.show() ;
+ this.blockFocus=true;
+ } else {
+ close.hide();
+ }
}
if(this.hiddenField){
cfg.cn = [
{
tag: 'label',
+ 'for' : id,
cls : 'control-label',
- html : this.fieldLabel,
cn : [
{
- tag : 'i',
- cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
- tooltip : 'This field is required'
+ tag : 'span',
+ html : this.fieldLabel
+ },
+ {
+ tag : 'i',
+ cls : 'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',
+ tooltip : 'This field is required'
}
]
},
{
- cls : '',
+ cls : "",
cn: [
combobox
]
}
+
];
+
+ labelCfg = cfg.cn[0];
+ contentCfg = cfg.cn[1];
}
- labelCfg = cfg.cn[0];
- contentCfg = cfg.cn[2];
+
if(this.labelWidth > 12){
labelCfg.style = "width: " + this.labelWidth + 'px';
this.touchViewEl.setStyle('z-index', Roo.bootstrap.Modal.zIndex++);
this.touchViewEl.show();
- this.touchViewEl.select('.modal-dialog', true).first().setStyle('margin', '0px');
- this.touchViewEl.select('.modal-dialog > .modal-content', true).first().setSize(
- Roo.lib.Dom.getViewWidth(true), Roo.lib.Dom.getViewHeight(true));
+ this.touchViewEl.select('.modal-dialog', true).first().setStyle({ margin : '0px', width : '100%'});
+
+ //this.touchViewEl.select('.modal-dialog > .modal-content', true).first().setSize(
+ // Roo.lib.Dom.getViewWidth(true), Roo.lib.Dom.getViewHeight(true));
var bodyHeight = Roo.lib.Dom.getViewHeight() - this.touchViewFooterEl.getHeight() + this.touchViewBodyEl.getPadding('tb');
var default_text = '-- SELECT --';
+ if(this.placeholder.length){
+ default_text = this.placeholder;
+ }
+
+ if(this.emptyTitle.length){
+ default_text = ' - ' + this.emptyTitle + ' -';
+ }
+
var opt = this.inputEl().createChild({
tag: 'option',
value : 0,