aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.progressbar.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.progressbar.js')
-rw-r--r--ui/ui.progressbar.js12
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();