mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-30 13:16:17 +00:00
add an override to setValue within the ext spinner extension so setValue amounts are run through the strategy
This commit is contained in:
parent
f216ffe54e
commit
fa2dedda73
@ -30,6 +30,7 @@ Ext.ux.form.Spinner = function(config){
|
|||||||
'spinup' : true,
|
'spinup' : true,
|
||||||
'spindown' : true
|
'spindown' : true
|
||||||
});
|
});
|
||||||
|
this.initStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.extend(Ext.ux.form.Spinner, Ext.form.TriggerField, {
|
Ext.extend(Ext.ux.form.Spinner, Ext.form.TriggerField, {
|
||||||
@ -103,7 +104,9 @@ Ext.extend(Ext.ux.form.Spinner, Ext.form.TriggerField, {
|
|||||||
this.dd.endDrag = this.endDrag.createDelegate(this);
|
this.dd.endDrag = this.endDrag.createDelegate(this);
|
||||||
this.dd.startDrag = this.startDrag.createDelegate(this);
|
this.dd.startDrag = this.startDrag.createDelegate(this);
|
||||||
this.dd.onDrag = this.onDrag.createDelegate(this);
|
this.dd.onDrag = this.onDrag.createDelegate(this);
|
||||||
|
},
|
||||||
|
|
||||||
|
initStrategy: function() {
|
||||||
/*
|
/*
|
||||||
jsakalos suggestion
|
jsakalos suggestion
|
||||||
http://extjs.com/forum/showthread.php?p=121850#post121850 */
|
http://extjs.com/forum/showthread.php?p=121850#post121850 */
|
||||||
@ -299,6 +302,11 @@ Ext.extend(Ext.ux.form.Spinner, Ext.form.TriggerField, {
|
|||||||
this.fireEvent("spin", this);
|
this.fireEvent("spin", this);
|
||||||
this.fireEvent("spindown", this);
|
this.fireEvent("spindown", this);
|
||||||
this.fireEvent("change", this);
|
this.fireEvent("change", this);
|
||||||
|
},
|
||||||
|
|
||||||
|
setValue: function(value) {
|
||||||
|
value = this.strategy.fixBoundries(value);
|
||||||
|
this.setRawValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user