All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.js.base.spinner.min.js Maven / Gradle / Ivy

There is a newer version: 5.0.5
Show newest version
'use strict';(function(d){"function"===typeof define&&define.amd?define("jquery ./button ../version ../keycode ../safe-active-element ../widget".split(" "),d):d(jQuery)})(function(d){function e(a){return function(){var c=this.element.val();a.apply(this,arguments);this._refresh();c!==this.element.val()&&this._trigger("change")}}d.widget("ui.spinner",{version:"1.12.1",defaultElement:"\x3cinput\x3e",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br",
"ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);""!==this.value()&&this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},
_getCreateOptions:function(){var a=this._super(),c=this.element;d.each(["min","max","step"],function(b,d){var e=c.attr(d);null!=e&&e.length&&(a[d]=e)});return a},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",a))},mousewheel:function(a,c){if(c){if(!this.spinning&&
!this._start(a))return!1;this._spin((0Math.ceil(.5*this.uiSpinner.height())&&0b.max?b.max:null!==b.min&&a




© 2015 - 2024 Weber Informatics LLC | Privacy Policy