diff options
Diffstat (limited to 'themes/default/js/ui/jquery.ui.spinner.js')
-rw-r--r-- | themes/default/js/ui/jquery.ui.spinner.js | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/themes/default/js/ui/jquery.ui.spinner.js b/themes/default/js/ui/jquery.ui.spinner.js index b323e04af..95f253f4c 100644 --- a/themes/default/js/ui/jquery.ui.spinner.js +++ b/themes/default/js/ui/jquery.ui.spinner.js @@ -1,8 +1,8 @@ /*! - * jQuery UI Spinner 1.9.0 + * jQuery UI Spinner 1.10.1 * http://jqueryui.com * - * Copyright 2012 jQuery Foundation and other contributors + * Copyright 2013 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -27,7 +27,7 @@ function modifier( fn ) { } $.widget( "ui.spinner", { - version: "1.9.0", + version: "1.10.1", defaultElement: "<input>", widgetEventPrefix: "spin", options: { @@ -94,7 +94,6 @@ $.widget( "ui.spinner", { }, keyup: "_stop", focus: function() { - this.uiSpinner.addClass( "ui-state-active" ); this.previous = this.element.val(); }, blur: function( event ) { @@ -104,7 +103,6 @@ $.widget( "ui.spinner", { } this._refresh(); - this.uiSpinner.removeClass( "ui-state-active" ); if ( this.previous !== this.element.val() ) { this._trigger( "change", event ); } @@ -196,7 +194,6 @@ $.widget( "ui.spinner", { .parent() // add buttons .append( this._buttonHtml() ); - this._hoverable( uiSpinner ); this.element.attr( "role", "spinbutton" ); @@ -242,7 +239,7 @@ $.widget( "ui.spinner", { }, _uiSpinnerHtml: function() { - return "<span class='ui-spinner ui-state-default ui-widget ui-widget-content ui-corner-all'></span>"; + return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"; }, _buttonHtml: function() { @@ -371,6 +368,14 @@ $.widget( "ui.spinner", { value = this._parse( value ); } } + if ( key === "icons" ) { + this.buttons.first().find( ".ui-icon" ) + .removeClass( this.options.icons.up ) + .addClass( value.up ); + this.buttons.last().find( ".ui-icon" ) + .removeClass( this.options.icons.down ) + .addClass( value.down ); + } this._super( key, value ); @@ -448,14 +453,20 @@ $.widget( "ui.spinner", { this._stepUp( steps ); }), _stepUp: function( steps ) { - this._spin( (steps || 1) * this.options.step ); + if ( this._start() ) { + this._spin( (steps || 1) * this.options.step ); + this._stop(); + } }, stepDown: modifier(function( steps ) { this._stepDown( steps ); }), _stepDown: function( steps ) { - this._spin( (steps || 1) * -this.options.step ); + if ( this._start() ) { + this._spin( (steps || 1) * -this.options.step ); + this._stop(); + } }, pageUp: modifier(function( pages ) { |