From d71ff306af68e3ea09022312937ce9a11d72293b Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 01:24:53 +0300
Subject: [PATCH 1/7] add default displayValue option for progressbar
---
ui/jquery.ui.progressbar.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js
index e0b728f1a24..932b03f16c3 100644
--- a/ui/jquery.ui.progressbar.js
+++ b/ui/jquery.ui.progressbar.js
@@ -15,7 +15,8 @@
$.widget( "ui.progressbar", {
options: {
- value: 0
+ value: 0,
+ displayValue: false
},
min: 0,
From 22cb0775f317cd9b02f2e49e3d65a90e69f248ba Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 01:32:28 +0300
Subject: [PATCH 2/7] add displayValue as contents of .ui-progressbar-value if
not false
---
ui/jquery.ui.progressbar.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js
index 932b03f16c3..15ff527cc05 100644
--- a/ui/jquery.ui.progressbar.js
+++ b/ui/jquery.ui.progressbar.js
@@ -32,7 +32,8 @@ $.widget( "ui.progressbar", {
"aria-valuenow": this._value()
});
- this.valueDiv = $( "" )
+ var displayValue = (this.options.displayValue !== false) ? this.options.displayValue : '';
+ this.valueDiv = $( "" )
.appendTo( this.element );
this._refreshValue();
From 3e351044a7f9f0909196c2ac40c795acd92283f2 Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 01:35:22 +0300
Subject: [PATCH 3/7] add menu entry for the progressbar displayValue demo
---
demos/progressbar/index.html | 1 +
1 file changed, 1 insertion(+)
diff --git a/demos/progressbar/index.html b/demos/progressbar/index.html
index cf8ee9fe370..1216b580e83 100644
--- a/demos/progressbar/index.html
+++ b/demos/progressbar/index.html
@@ -13,6 +13,7 @@ Examples
Default functionality
Animated
Resizable progressbar
+ Display value
From 8d1d7b0bd5d4284dbd0c76622c18f957bbcf54cf Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 01:41:17 +0300
Subject: [PATCH 4/7] add displayvalue.html demo page
---
demos/progressbar/displayvalue.html | 40 +++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 demos/progressbar/displayvalue.html
diff --git a/demos/progressbar/displayvalue.html b/demos/progressbar/displayvalue.html
new file mode 100644
index 00000000000..1fd2d9cfc0a
--- /dev/null
+++ b/demos/progressbar/displayvalue.html
@@ -0,0 +1,40 @@
+
+
+
+
+ jQuery UI Progressbar - Display value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Display custom value (string) in progressbar.
+
+
+
+
+
+
+
From 10fc83d2020aefd75f5baf89a5f1c4cb438c9006 Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 01:58:59 +0300
Subject: [PATCH 5/7] align .ui-progressbar-value's content in the center
---
themes/base/jquery.ui.progressbar.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/themes/base/jquery.ui.progressbar.css b/themes/base/jquery.ui.progressbar.css
index 50fe84a6f4a..035e2e0ee71 100644
--- a/themes/base/jquery.ui.progressbar.css
+++ b/themes/base/jquery.ui.progressbar.css
@@ -8,4 +8,4 @@
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; text-align: center}
\ No newline at end of file
From cad34357c8ef2549585fcdbd680f29c831f07094 Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 01:59:44 +0300
Subject: [PATCH 6/7] wrap displayValue in span.ui-progressbar-displayvalue
---
ui/jquery.ui.progressbar.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js
index 15ff527cc05..80e85c78d06 100644
--- a/ui/jquery.ui.progressbar.js
+++ b/ui/jquery.ui.progressbar.js
@@ -32,7 +32,12 @@ $.widget( "ui.progressbar", {
"aria-valuenow": this._value()
});
- var displayValue = (this.options.displayValue !== false) ? this.options.displayValue : '';
+ var displayValue = '';
+ if(this.options.displayValue !== false)
+ displayValue = ''
+ + this.options.displayValue
+ + '';
+
this.valueDiv = $( "" )
.appendTo( this.element );
From ebfa546cab0584634ba68299d2bec5123d4929e3 Mon Sep 17 00:00:00 2001
From: Nikolay Yordanov
Date: Tue, 7 Sep 2010 02:01:04 +0300
Subject: [PATCH 7/7] add missing semicolon
---
themes/base/jquery.ui.progressbar.css | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/themes/base/jquery.ui.progressbar.css b/themes/base/jquery.ui.progressbar.css
index 035e2e0ee71..550aace3640 100644
--- a/themes/base/jquery.ui.progressbar.css
+++ b/themes/base/jquery.ui.progressbar.css
@@ -8,4 +8,5 @@
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; text-align: center}
\ No newline at end of file
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; text-align: center; }
+.ui-progressbar .ui-progressbar-displayvalue {position: relative; top: 3px; }