aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-03-01 15:03:30 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-03-01 15:03:30 +0100
commit5e51b8db284b23bf818148051aaf5b41a7b9c7b1 (patch)
tree1b7591edd62eb0a94135a1069bbd93ad936a4af1 /ui
parentd901cd416069c153fba627ee9ec6daad2a4f67aa (diff)
downloadjquery-ui-5e51b8db284b23bf818148051aaf5b41a7b9c7b1.tar.gz
jquery-ui-5e51b8db284b23bf818148051aaf5b41a7b9c7b1.zip
Update Widget data naming/usage. Remove unnecessary fallbacks, update .removeData to use full name.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.widget.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index d06b2654f..17416ff9f 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -163,9 +163,7 @@ $.widget.bridge = function( name, object ) {
if ( isMethodCall ) {
this.each(function() {
- // 1.9 BC for #7810
- // TODO remove fallback to name
- var instance = $.data( this, fullName ) || $.data( this, name );
+ var instance = $.data( this, fullName );
if ( !instance ) {
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
@@ -183,9 +181,7 @@ $.widget.bridge = function( name, object ) {
});
} else {
this.each(function() {
- // 1.9 BC for #7810
- // TODO remove fallback to name
- var instance = $.data( this, fullName ) || $.data( this, name );
+ var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} )._init();
} else {
@@ -252,7 +248,7 @@ $.Widget.prototype = {
// all event bindings should go through this._bind()
this.element
.unbind( "." + this.widgetName )
- .removeData( this.widgetName );
+ .removeData( this.widgetFullName );
this.widget()
.unbind( "." + this.widgetName )
.removeAttr( "aria-disabled" )