Skip to content
Permalink
Browse files

Implemented #3187: Added metadata support to the widget factory.

  • Loading branch information
scottgonzalez committed Aug 15, 2008
1 parent b89bb4b commit 7f2b0b0db11081eb866a32e5f52a1d5d400c48d7
Showing with 7 additions and 1 deletion.
  1. +7 −1 ui/ui.core.js
@@ -124,7 +124,12 @@ $.widget = function(name, prototype) {
this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
this.widgetBaseClass = namespace + '-' + name;

this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
this.options = $.extend({},
$.widget.defaults,
$[namespace][name].defaults,
$.metadata && $.metadata.get(element)[name],
options);

this.element = $(element)
.bind('setData.' + name, function(e, key, value) {
return self.setData(key, value);
@@ -135,6 +140,7 @@ $.widget = function(name, prototype) {
.bind('remove', function() {
return self.destroy();
});

this.init();
};

0 comments on commit 7f2b0b0

Please sign in to comment.
You can’t perform that action at this time.