aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/ui.core.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index a0042f6f2..f3d76132a 100644
--- a/ui/ui.core.js
+++ b/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();
};