3 * @class Roo.bootstrap.MoneyField
4 * @extends Roo.bootstrap.TriggerField
5 * Bootstrap MoneyField class
8 * Create a new MoneyField.
9 * @param {Object} config Configuration options
12 Roo.bootstrap.MoneyField = function(config) {
13 Roo.bootstrap.MoneyField.superclass.constructor.call(this, config);
16 Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.TriggerField, {
23 getAutoCreate : function()
25 var align = this.labelAlign || this.parentLabelAlign();
37 cls : 'form-control roo-money-amount-input',
38 autocomplete: 'new-password'
42 input.name = this.name;
46 input.disabled = true;
49 var clg = 12 - this.inputlg;
50 var cmd = 12 - this.inputmd;
51 var csm = 12 - this.inputsm;
52 var cxs = 12 - this.inputxs;
56 cls : 'row roo-money-field',
60 cls : 'column col-lg-' + clg + ' col-md-' + cmd + ' col-sm-' + csm + ' col-xs-' + cxs,
64 cls: 'roo-select2-container input-group',
68 cls : 'form-control roo-money-amount-input',
69 autocomplete: 'new-password'
73 cls : 'input-group-addon btn dropdown-toggle',
87 cls : 'column col-lg-' + this.inputlg + ' col-md-' + this.inputmd + ' col-sm-' + this.inputsm + ' col-xs-' + this.inputxs,
91 cls: this.hasFeedback ? 'has-feedback' : '',
102 if (this.fieldLabel.length) {
105 tooltip: 'This field is required'
111 cls: 'control-label',
117 html: this.fieldLabel
120 indicator.cls = 'roo-required-indicator text-danger fa fa-lg fa-star left-indicator';
126 if(this.indicatorpos == 'right') {
127 indicator.cls = 'roo-required-indicator text-danger fa fa-lg fa-star right-indicator';
134 if(align == 'left') {
142 if(this.labelWidth > 12){
143 label.style = "width: " + this.labelWidth + 'px';
145 if(this.labelWidth < 13 && this.labelmd == 0){
146 this.labelmd = this.labelWidth;
148 if(this.labellg > 0){
149 label.cls += ' col-lg-' + this.labellg;
150 input.cls += ' col-lg-' + (12 - this.labellg);
152 if(this.labelmd > 0){
153 label.cls += ' col-md-' + this.labelmd;
154 container.cls += ' col-md-' + (12 - this.labelmd);
156 if(this.labelsm > 0){
157 label.cls += ' col-sm-' + this.labelsm;
158 container.cls += ' col-sm-' + (12 - this.labelsm);
160 if(this.labelxs > 0){
161 label.cls += ' col-xs-' + this.labelxs;
162 container.cls += ' col-xs-' + (12 - this.labelxs);
174 ['xs','sm','md','lg'].map(function(size){
175 if (settings[size]) {
176 cfg.cls += ' col-' + size + '-' + settings[size];
183 initEvents : function()