summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js')
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js b/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js
index eafc4e151..31eca735c 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerGroup.js
@@ -23,7 +23,7 @@ Ext.ux.form.SpinnerGroup = Ext.extend(Ext.form.CheckboxGroup, {
colCfg: {},
// private
- onRender: function(ct, position) {
+ onRender: function (ct, position) {
if (!this.el) {
var panelCfg = {
cls: this.groupCls,
@@ -131,14 +131,14 @@ Ext.ux.form.SpinnerGroup = Ext.extend(Ext.form.CheckboxGroup, {
}
}
- var fields = this.panel.findBy(function(c) {
+ var fields = this.panel.findBy(function (c) {
return c.isFormField;
}, this);
this.items = new Ext.util.MixedCollection();
this.items.addAll(fields);
- this.items.each(function(field) {
+ this.items.each(function (field) {
field.on('spin', this.onFieldChange, this);
field.on('change', this.onFieldChange, this);
}, this);
@@ -159,45 +159,45 @@ Ext.ux.form.SpinnerGroup = Ext.extend(Ext.form.CheckboxGroup, {
Ext.ux.form.SpinnerGroup.superclass.onRender.call(this, ct, position);
},
- onFieldChange: function(spinner) {
+ onFieldChange: function (spinner) {
this.fireEvent('change', this, this.getValue());
},
initValue: Ext.emptyFn,
- getValue: function() {
+ getValue: function () {
var value = [this.items.getCount()];
- this.items.each(function(item, i) {
+ this.items.each(function (item, i) {
value[i] = Number(item.getValue());
});
return value;
},
- getRawValue: function() {
+ getRawValue: function () {
var value = [this.items.getCount()];
- this.items.each(function(item, i) {
+ this.items.each(function (item, i) {
value[i] = Number(item.getRawValue());
});
return value;
},
- setValue: function(value) {
+ setValue: function (value) {
if (!this.rendered) {
this.value = value;
this.lazyValueSet = true;
} else {
- this.items.each(function(item, i) {
+ this.items.each(function (item, i) {
item.setValue(value[i]);
});
}
},
- setRawValue: function(value) {
+ setRawValue: function (value) {
if (!this.rendered) {
this.rawValue = value;
this.lazyRawValueSet = true;
} else {
- this.items.each(function(item, i) {
+ this.items.each(function (item, i) {
item.setRawValue(value[i]);
});
}