Author: nbelaevski
Date: 2010-12-06 14:22:19 -0500 (Mon, 06 Dec 2010)
New Revision: 20422
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js
Log:
https://jira.jboss.org/browse/RF-9882
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-12-06
19:13:42 UTC (rev 20421)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-12-06
19:22:19 UTC (rev 20422)
@@ -110,9 +110,9 @@
ProgressBarState result;
- if (value.doubleValue() <= minValue.doubleValue()) {
+ if (value.doubleValue() < minValue.doubleValue()) {
result = ProgressBarState.initialState;
- } else if (value.doubleValue() > maxValue.doubleValue()) {
+ } else if (value.doubleValue() >= maxValue.doubleValue()) {
result = ProgressBarState.finishState;
} else {
result = ProgressBarState.progressState;
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js 2010-12-06
19:13:42 UTC (rev 20421)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js 2010-12-06
19:22:19 UTC (rev 20422)
@@ -46,7 +46,7 @@
name: "ProgressBar",
__isInitialState: function() {
- return parseFloat(this.value) <= parseFloat(this.getMinValue());
+ return parseFloat(this.value) < parseFloat(this.getMinValue());
},
__isProgressState: function() {
@@ -54,7 +54,7 @@
},
__isFinishState: function() {
- return parseFloat(this.value) > parseFloat(this.getMaxValue());
+ return parseFloat(this.value) >= parseFloat(this.getMaxValue());
},
__beforeUpdate: function(event) {
@@ -120,7 +120,7 @@
__setValue: function(val, initialStateSetup) {
this.value = parseFloat(this.__getPropertyOrObject(val, "value"));
- if (this.__isFinishState()) {
+ if (this.__isFinishState() || this.__isInitialState()) {
this.disable();
}
},