dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10350
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2845: Fix bug: Error on setting min and max values.
------------------------------------------------------------
revno: 2845
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-02-15 09:41:58 +0700
message:
Fix bug: Error on setting min and max values.
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm 2010-11-22 22:16:17 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm 2011-02-15 02:41:58 +0000
@@ -45,9 +45,9 @@
<td>$encoder.htmlEncode( $i18n.getString( "max_limit" ) ) </td>
<td><input type="text" id="maxLimit" style="width:10em" value="$!{dataElementHistory.maxLimit}" class="{validate:{digits:true}}"
#if( $auth.hasAccess( "dhis-web-dataentry", "saveMinMaxLimits" ) && $auth.hasAccess( "dhis-web-dataentry", "removeMinMaxLimits" ))
- onchange="saveMinMaxLimit()"
+ onkeyup="saveMinMaxLimit()"
#else disabled="disabled" #end onfocus="this.select()"/>
- <span id='maxSpan' style="color:red;"></span>
+ <i><span id='maxSpan' style="color:red;"></span></i>
</td>
</tr>
<tr>
@@ -55,9 +55,9 @@
<td>$encoder.htmlEncode( $i18n.getString( "min_limit" ) ) </td>
<td><input type="text" id="minLimit" style="width:10em" value="$!{dataElementHistory.minLimit}"
#if( $auth.hasAccess( "dhis-web-dataentry", "saveMinMaxLimits" ) && $auth.hasAccess( "dhis-web-dataentry", "removeMinMaxLimits" ))
- onchange="saveMinMaxLimit()"
+ onkeyup="saveMinMaxLimit()"
#else disabled="disabled" #end onfocus="this.select()"/>
- <span id='minSpan' style="color:red;"></span>
+ <i><span id='minSpan' style="color:red;"></span></i>
</td>
</tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js 2010-11-22 22:29:04 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js 2011-02-15 02:41:58 +0000
@@ -154,7 +154,7 @@
$( '#maxSpan' ).html( '' );
}
- if ( minValue >= maxValue ) {
+ if ( eval(minValue) > eval(maxValue) ) {
$( '#maxSpan' ).html( i18n_max_must_be_greater_than_min );
return;
}