diff options
author | Avinash R <nashpapa@gmail.com> | 2012-11-07 10:05:00 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-11-07 10:05:00 -0500 |
commit | 75bd22eb731f5a81099ad97c88eede3862195fec (patch) | |
tree | 30ddbb4fe23de8925973a88de6df92679803c129 /ui/jquery.ui.widget.js | |
parent | 979bcab51353d53625c28bbe97dd1ce971ac2a5e (diff) | |
download | jquery-ui-75bd22eb731f5a81099ad97c88eede3862195fec.tar.gz jquery-ui-75bd22eb731f5a81099ad97c88eede3862195fec.zip |
Widget: Bridge falls back to name if there is no widgetFullName, and always stores instances in data. Fixed #8775 - Widget: Bridge fails if widgetFullName is not supplied.
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 00f36fe67..5a069f2ef 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -158,7 +158,7 @@ $.widget.extend = function( target ) { }; $.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName; + var fullName = object.prototype.widgetFullName || name; $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string", args = slice.call( arguments, 1 ), @@ -194,7 +194,7 @@ $.widget.bridge = function( name, object ) { if ( instance ) { instance.option( options || {} )._init(); } else { - new object( options, this ); + $.data( this, fullName, new object( options, this ) ); } }); } |