Skip to content

Commit 1b80154

Browse files
committed
Widget: Rename widgetBaseClass to widgetFullName. Deprecates widgetBaseClass, to be removed later. Fixes #8154
1 parent 5fda4f6 commit 1b80154

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ui/jquery.ui.widget.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ $.widget = function( name, base, prototype ) {
105105
constructor: constructor,
106106
namespace: namespace,
107107
widgetName: name,
108-
widgetBaseClass: fullName
108+
// TODO remove widgetBaseClass, see #8155
109+
widgetBaseClass: fullName,
110+
widgetFullName: fullName
109111
});
110112

111113
// If this widget is being redefined then we need to find all widgets that
@@ -148,7 +150,7 @@ $.widget.extend = function( target ) {
148150
};
149151

150152
$.widget.bridge = function( name, object ) {
151-
var fullName = object.prototype.widgetBaseClass;
153+
var fullName = object.prototype.widgetFullName;
152154
$.fn[ name ] = function( options ) {
153155
var isMethodCall = typeof options === "string",
154156
args = slice.call( arguments, 1 ),
@@ -225,7 +227,7 @@ $.Widget.prototype = {
225227
// 1.9 BC for #7810
226228
// TODO remove dual storage
227229
$.data( element, this.widgetName, this );
228-
$.data( element, this.widgetBaseClass, this );
230+
$.data( element, this.widgetFullName, this );
229231
this._bind({ remove: "destroy" });
230232
this.document = $( element.style ?
231233
// element within the document
@@ -255,7 +257,7 @@ $.Widget.prototype = {
255257
.unbind( "." + this.widgetName )
256258
.removeAttr( "aria-disabled" )
257259
.removeClass(
258-
this.widgetBaseClass + "-disabled " +
260+
this.widgetFullName + "-disabled " +
259261
"ui-state-disabled" );
260262

261263
// clean up events and states
@@ -322,7 +324,7 @@ $.Widget.prototype = {
322324

323325
if ( key === "disabled" ) {
324326
this.widget()
325-
.toggleClass( this.widgetBaseClass + "-disabled ui-state-disabled", !!value )
327+
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
326328
.attr( "aria-disabled", value );
327329
this.hoverable.removeClass( "ui-state-hover" );
328330
this.focusable.removeClass( "ui-state-focus" );

0 commit comments

Comments
 (0)