vendor/assets/javascripts/jquery.ui.progressbar.js in jquery-ui-rails-2.0.2 vs vendor/assets/javascripts/jquery.ui.progressbar.js in jquery-ui-rails-3.0.0

- old
+ new

@@ -1,24 +1,26 @@ //= require jquery.ui.core //= require jquery.ui.widget /*! - * jQuery UI Progressbar 1.8.24 + * jQuery UI Progressbar 1.9.2 + * http://jqueryui.com * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. * http://jquery.org/license * - * http://docs.jquery.com/UI/Progressbar + * http://api.jqueryui.com/progressbar/ * * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function( $, undefined ) { $.widget( "ui.progressbar", { + version: "1.9.2", options: { value: 0, max: 100 }, @@ -39,21 +41,19 @@ this.oldValue = this._value(); this._refreshValue(); }, - destroy: function() { + _destroy: function() { this.element .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) .removeAttr( "role" ) .removeAttr( "aria-valuemin" ) .removeAttr( "aria-valuemax" ) .removeAttr( "aria-valuenow" ); this.valueDiv.remove(); - - $.Widget.prototype.destroy.apply( this, arguments ); }, value: function( newValue ) { if ( newValue === undefined ) { return this._value(); @@ -70,11 +70,11 @@ if ( this._value() === this.options.max ) { this._trigger( "complete" ); } } - $.Widget.prototype._setOption.apply( this, arguments ); + this._super( key, value ); }, _value: function() { var val = this.options.value; // normalize invalid value @@ -87,12 +87,12 @@ _percentage: function() { return 100 * this._value() / this.options.max; }, _refreshValue: function() { - var value = this.value(); - var percentage = this._percentage(); + var value = this.value(), + percentage = this._percentage(); if ( this.oldValue !== value ) { this.oldValue = value; this._trigger( "change" ); } @@ -101,12 +101,8 @@ .toggle( value > this.min ) .toggleClass( "ui-corner-right", value === this.options.max ) .width( percentage.toFixed(0) + "%" ); this.element.attr( "aria-valuenow", value ); } -}); - -$.extend( $.ui.progressbar, { - version: "1.8.24" }); })( jQuery );