1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-22 11:36:38 +02:00
ttrss/lib/dijit/form/NumberSpinner.js
Anders Kaseorg 6887a0f573 lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1
The itemNode and expandoNode elements have changed from img to
span (https://bugs.dojotoolkit.org/ticket/16699), so we now put our
tree icons inside them rather than replacing them.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2017-01-21 13:22:14 -05:00

2 lines
874 B
JavaScript

//>>built
define("dijit/form/NumberSpinner",["dojo/_base/declare","dojo/keys","./_Spinner","./NumberTextBox"],function(_1,_2,_3,_4){return _1("dijit.form.NumberSpinner",[_3,_4.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(_5,_6){var tc=this.constraints,v=isNaN(_5),_7=!isNaN(tc.max),_8=!isNaN(tc.min);if(v&&_6!=0){_5=(_6>0)?_8?tc.min:_7?tc.max:0:_7?this.constraints.max:_8?tc.min:0;}var _9=_5+_6;if(v||isNaN(_9)){return _5;}if(_7&&(_9>tc.max)){_9=tc.max;}if(_8&&(_9<tc.min)){_9=tc.min;}return _9;},_onKeyDown:function(e){if(this.disabled||this.readOnly){return;}if((e.keyCode==_2.HOME||e.keyCode==_2.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.get("value")!="undefined"){var _a=this.constraints[(e.keyCode==_2.HOME?"min":"max")];if(typeof _a=="number"){this._setValueAttr(_a,false);}e.stopPropagation();e.preventDefault();}}});});