aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-08-16 13:59:31 +0000
committerScott González <scott.gonzalez@gmail.com>2008-08-16 13:59:31 +0000
commitac40bf6e3f8348c352b548c6e684921d9298e747 (patch)
treeff66a7c3102772fb6e413d3fe42913427bb20adf
parent91c492a49ca7107e74fff1c46228d039f7fb77ce (diff)
downloadjquery-ui-ac40bf6e3f8348c352b548c6e684921d9298e747.tar.gz
jquery-ui-ac40bf6e3f8348c352b548c6e684921d9298e747.zip
Core: Updated widget factory to use proper names for internal methods. Part of #3188.
-rw-r--r--ui/ui.core.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index b101ee524..49828f9bf 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -77,16 +77,16 @@ $.widget = function(name, prototype) {
this.element = $(element)
.bind('setData.' + name, function(e, key, value) {
- return self.setData(key, value);
+ return self._setData(key, value);
})
.bind('getData.' + name, function(e, key) {
- return self.getData(key);
+ return self._getData(key);
})
.bind('remove', function() {
return self.destroy();
});
- this.init();
+ this._init();
};
// add widget prototype
@@ -94,15 +94,15 @@ $.widget = function(name, prototype) {
};
$.widget.prototype = {
- init: function() {},
+ _init: function() {},
destroy: function() {
this.element.removeData(this.widgetName);
},
- getData: function(key) {
+ _getData: function(key) {
return this.options[key];
},
- setData: function(key, value) {
+ _setData: function(key, value) {
this.options[key] = value;
if (key == 'disabled') {
@@ -112,13 +112,13 @@ $.widget.prototype = {
},
enable: function() {
- this.setData('disabled', false);
+ this._setData('disabled', false);
},
disable: function() {
- this.setData('disabled', true);
+ this._setData('disabled', true);
},
- trigger: function(type, e, data) {
+ _trigger: function(type, e, data) {
var eventName = (type == this.widgetEventPrefix
? type : this.widgetEventPrefix + type);
e = e || $.event.fix({ type: eventName, target: this.element[0] });