});
/**
* @class Roo.bootstrap.MoneyField
- * @extends Roo.bootstrap.TriggerField
+ * @extends Roo.bootstrap.ComboBox
* Bootstrap MoneyField class
*
* @constructor
*/
Roo.bootstrap.MoneyField = function(config) {
+
Roo.bootstrap.MoneyField.superclass.constructor.call(this, config);
+
};
-Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.TriggerField, {
+Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
inputlg : 9,
inputmd : 9,
inputsm : 9,
inputxs : 6,
+ store : false,
+
getAutoCreate : function()
{
var align = this.labelAlign || this.parentLabelAlign();
},
{
tag :'span',
- cls : 'input-group-addon',
+ cls : 'input-group-addon dropdown-toggle',
cn : [
{
tag: 'span',
});
return cfg;
- },
-
- initEvents : function()
- {
-
}
});
\ No newline at end of file
},onKeyUp:function(e){var k=e.getKey();var c=e.getCharCode();if((String.fromCharCode(c)=='.'||String.fromCharCode(c)=='-')&&this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent();}if(this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent();
}this.setValue(this.getValue());}});
// Roo/bootstrap/MoneyField.js
-Roo.bootstrap.MoneyField=function(A){Roo.bootstrap.MoneyField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MoneyField,Roo.bootstrap.TriggerField,{inputlg:9,inputmd:9,inputsm:9,inputxs:6,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
+Roo.bootstrap.MoneyField=function(A){Roo.bootstrap.MoneyField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MoneyField,Roo.bootstrap.ComboBox,{inputlg:9,inputmd:9,inputsm:9,inputxs:6,store:false,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,cls:'form-control roo-money-amount-input',autocomplete:'new-password'};if(this.name){C.name=this.name;}if(this.disabled){C.disabled=true;}var D=12-this.inputlg;var E=12-this.inputmd;var F=12-this.inputsm;
var G=12-this.inputxs;var H={tag:'div',cls:'row roo-money-field',cn:[{tag:'div',cls:'roo-money-currency column col-lg-'+D+' col-md-'+E+' col-sm-'+F+' col-xs-'+G,cn:[{tag:'div',cls:'roo-select2-container input-group',cn:[{tag:'input',cls:'form-control roo-money-currency-input',autocomplete:'new-password'}
-,{tag:'span',cls:'input-group-addon',cn:[{tag:'span',cls:'caret'}]}]}]},{tag:'div',cls:'roo-money-amount column col-lg-'+this.inputlg+' col-md-'+this.inputmd+' col-sm-'+this.inputsm+' col-xs-'+this.inputxs,cn:[{tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]}
+,{tag:'span',cls:'input-group-addon dropdown-toggle',cn:[{tag:'span',cls:'caret'}]}]}]},{tag:'div',cls:'roo-money-amount column col-lg-'+this.inputlg+' col-md-'+this.inputmd+' col-sm-'+this.inputsm+' col-xs-'+this.inputxs,cn:[{tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]}
]}]};if(this.fieldLabel.length){var I={tag:'i',tooltip:'This field is required'};var J={tag:'label','for':id,cls:'control-label',cn:[]};var K={tag:'span',html:this.fieldLabel};I.cls='roo-required-indicator text-danger fa fa-lg fa-star left-indicator';J.cn=[I,K];
if(this.indicatorpos=='right'){I.cls='roo-required-indicator text-danger fa fa-lg fa-star right-indicator';J.cn=[K,I];}if(A=='left'){H={tag:'div',cn:[H]};if(this.labelWidth>12){J.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;
}if(this.labellg>0){J.cls+=' col-lg-'+this.labellg;C.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){J.cls+=' col-md-'+this.labelmd;H.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){J.cls+=' col-sm-'+this.labelsm;H.cls+=' col-sm-'+(12-this.labelsm);
-}if(this.labelxs>0){J.cls+=' col-xs-'+this.labelxs;H.cls+=' col-xs-'+(12-this.labelxs);}}}B.cn=[J,H];var L=this;['xs','sm','md','lg'].map(function(M){if(L[M]){B.cls+=' col-'+M+'-'+L[M];}});return B;},initEvents:function(){}});
+}if(this.labelxs>0){J.cls+=' col-xs-'+this.labelxs;H.cls+=' col-xs-'+(12-this.labelxs);}}}B.cn=[J,H];var L=this;['xs','sm','md','lg'].map(function(M){if(L[M]){B.cls+=' col-'+M+'-'+L[M];}});return B;}});