diff options
author | Eduardo Lundgren <eduardolundgren@gmail.com> | 2009-01-16 00:33:46 +0000 |
---|---|---|
committer | Eduardo Lundgren <eduardolundgren@gmail.com> | 2009-01-16 00:33:46 +0000 |
commit | 78c4d87d7b2f9f8ece53f062eb44cabf9dd51bf3 (patch) | |
tree | 5d7e87e5d970d9abf0bf429943a56f3295374b59 /ui/ui.progressbar.js | |
parent | 358be8bd46ca81f16f4ca8215d35118c22b1d86d (diff) | |
download | jquery-ui-78c4d87d7b2f9f8ece53f062eb44cabf9dd51bf3.tar.gz jquery-ui-78c4d87d7b2f9f8ece53f062eb44cabf9dd51bf3.zip |
Fix for #3838 - Components should use this.widgetName on internally
Diffstat (limited to 'ui/ui.progressbar.js')
-rw-r--r-- | ui/ui.progressbar.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/ui.progressbar.js b/ui/ui.progressbar.js index 47c8848f1..82e6cca78 100644 --- a/ui/ui.progressbar.js +++ b/ui/ui.progressbar.js @@ -12,9 +12,15 @@ */ (function($) { +var widgetName = "progressbar"; +var classWidgetName = ".progressbar"; + $.widget("ui.progressbar", { _init: function() { + // update widgetName with the name given by the widget factory + widgetName = this.widgetName; + classWidgetName = '.' + widgetName; var self = this, options = this.options; @@ -25,7 +31,7 @@ $.widget("ui.progressbar", { + " ui-widget-content" + " ui-corner-all") .attr({ - role: "progressbar", + role: widgetName, "aria-valuemin": this._valueMin(), "aria-valuemax": this._valueMax(), "aria-valuenow": this._value() @@ -48,8 +54,8 @@ $.widget("ui.progressbar", { .removeAttr("aria-valuemin") .removeAttr("aria-valuemax") .removeAttr("aria-valuenow") - .removeData("progressbar") - .unbind(".progressbar"); + .removeData(widgetName) + .unbind(classWidgetName); this.valueDiv.remove(); |