diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-01-14 16:55:13 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-01-14 16:55:13 -0500 |
commit | ef1202dbe0af19b7929d6a31ef1ec66db7147889 (patch) | |
tree | 8b8da499b8a8d6dab46e8732198efaf192ad0e80 /ui/jquery.ui.widget.js | |
parent | 68d905dd45bb63f696dbda83507897d7fb1e9d58 (diff) | |
download | jquery-ui-ef1202dbe0af19b7929d6a31ef1ec66db7147889.tar.gz jquery-ui-ef1202dbe0af19b7929d6a31ef1ec66db7147889.zip |
Widget: destroy() now calls _destroy() so that widgets don't need to call the base destroy method. Fixes #5056 - Widget factory: Remove need to call base destroy method.
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 444367423..37c26ab2f 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -141,8 +141,8 @@ $.Widget.prototype = { _getCreateOptions: function() { return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; }, - _create: function() {}, - _init: function() {}, + _create: $.noop, + _init: $.noop, _super: function( method ) { return this.base[ method ].apply( this, slice.call( arguments, 1 ) ); @@ -152,6 +152,7 @@ $.Widget.prototype = { }, destroy: function() { + this._destroy(); this.element .unbind( "." + this.widgetName ) .removeData( this.widgetName ); @@ -162,6 +163,7 @@ $.Widget.prototype = { this.widgetBaseClass + "-disabled " + "ui-state-disabled" ); }, + _destroy: $.noop, widget: function() { return this.element; |