Skip to content

Commit e0b5283

Browse files
committed
Updated widgets to use new methods from $.Widget.
1 parent 56c4c6a commit e0b5283

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

ui/jquery.ui.accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ $.widget( "ui.accordion", {
173173
return;
174174
}
175175

176-
$.Widget.prototype._setOption.apply( this, arguments );
176+
this._super( "_setOption", key, value );
177177

178178
if ( key == "icons" ) {
179179
this._destroyIcons();

ui/jquery.ui.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ $.widget( "ui.autocomplete", {
225225
},
226226

227227
_setOption: function( key, value ) {
228-
$.Widget.prototype._setOption.apply( this, arguments );
228+
this._super( "_setOption", key, value );
229229
if ( key === "source" ) {
230230
this._initSource();
231231
}

ui/jquery.ui.button.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ $.widget( "ui.button", {
233233
},
234234

235235
_setOption: function( key, value ) {
236-
$.Widget.prototype._setOption.apply( this, arguments );
236+
this._super( "_setOption", key, value );
237237
if ( key === "disabled" ) {
238238
if ( value ) {
239239
this.element.attr( "disabled", true );
@@ -330,7 +330,7 @@ $.widget( "ui.buttonset", {
330330
this.buttons.button( "option", key, value );
331331
}
332332

333-
$.Widget.prototype._setOption.apply( this, arguments );
333+
this._super( "_setOption", key, value );
334334
},
335335

336336
refresh: function() {
@@ -354,7 +354,7 @@ $.widget( "ui.buttonset", {
354354
.end();
355355
},
356356

357-
destroy: function() {
357+
_destroy: function() {
358358
this.element.removeClass( "ui-buttonset" );
359359
this.buttons
360360
.map(function() {
@@ -363,8 +363,6 @@ $.widget( "ui.buttonset", {
363363
.removeClass( "ui-corner-left ui-corner-right" )
364364
.end()
365365
.button( "destroy" );
366-
367-
$.Widget.prototype.destroy.call( this );
368366
}
369367
});
370368

ui/jquery.ui.dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ $.widget("ui.dialog", {
600600
break;
601601
}
602602

603-
$.Widget.prototype._setOption.apply( self, arguments );
603+
this._super( "_setOption", key, value );
604604
},
605605

606606
_size: function() {

ui/jquery.ui.progressbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ $.widget( "ui.progressbar", {
6767
}
6868
}
6969

70-
$.Widget.prototype._setOption.apply( this, arguments );
70+
this._super( "_setOption", key, value );
7171
},
7272

7373
_value: function() {

ui/jquery.ui.spinner.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ $.widget('ui.spinner', {
283283
this.buttons.button("enable");
284284
}
285285
}
286-
$.Widget.prototype._setOption.call( this, key, value );
286+
this._super( "_setOption", key, value );
287287
},
288288

289289
_setOptions: function( options ) {
290-
$.Widget.prototype._setOptions.call( this, options );
290+
this._super( "_setOptions", options );
291291
if ( "value" in options ) {
292292
this._format( this.options.value );
293293
}
@@ -325,7 +325,7 @@ $.widget('ui.spinner', {
325325
.removeClass('ui-spinner-input')
326326
.removeAttr('disabled')
327327
.removeAttr('autocomplete');
328-
$.Widget.prototype.destroy.call( this );
328+
this._super( "destroy" );
329329
this.uiSpinner.replaceWith(this.element);
330330
},
331331

0 commit comments

Comments
 (0)