dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13054
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4120: Completed jquery in data entry
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 4120 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-07-12 16:04:13 +0200
message:
Completed jquery in data entry
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
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/status.vm
--
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/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-07-12 13:49:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-07-12 13:59:10 +0000
@@ -225,12 +225,12 @@
function handleResponse( json )
{
- var code = json.code;
+ var code = json.c;
if ( code == 0 )
{
markValue( resultColor );
- }
+ }
else
{
markValue( COLOR_RED );
@@ -246,7 +246,6 @@
function markValue( color )
{
- var element = document.getElementById( dataElementId + '-' + optionComboId + '-val' );
- element.style.backgroundColor = color;
+ $( '#' + dataElementId + '-' + optionComboId + '-val' ).css( "background-color", color );
}
}
\ No newline at end of file
=== 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 2011-07-11 10:22:45 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js 2011-07-12 14:04:13 +0000
@@ -35,7 +35,7 @@
function handleResponse( json )
{
- var code = json.code;
+ var code = json.c;
if ( code == 0 )
{
@@ -75,37 +75,46 @@
var minValue = $( '#minLimit' ).val();
var maxValue = $( '#maxLimit' ).val();
- if ( !minValue || minValue == '' ) {
+ if ( !minValue || minValue == '' )
+ {
return;
}
- else if ( !isInt( minValue ) ) {
+ else if ( !isInt( minValue ) )
+ {
$( '#minSpan' ).html( i18n_enter_digits );
return;
}
- else {
+ else
+ {
$( '#minSpan' ).html( '' );
}
- if ( !maxValue || maxValue == '' ) {
+ if ( !maxValue || maxValue == '' )
+ {
return;
}
- else if ( !isInt( maxValue ) ) {
+ else if ( !isInt( maxValue ) )
+ {
$( '#maxSpan' ).html( i18n_enter_digits );
return;
}
- else {
+ else
+ {
$( '#maxSpan' ).html( '' );
}
- if ( eval(minValue) > eval(maxValue) ) {
+ if ( eval(minValue) > eval(maxValue) )
+ {
$( '#maxSpan' ).html( i18n_max_must_be_greater_than_min );
return;
}
- else {
+ else
+ {
$( '#maxSpan' ).html( '' );
}
- if ( window.opener && window.opener.document ) {
+ if ( window.opener && window.opener.document )
+ {
window.opener.document.getElementById( currentDataElementId + '-' + currentOptionComboId + '-min' ).innerHTML = minValue;
window.opener.document.getElementById( currentDataElementId + '-' + currentOptionComboId + '-max' ).innerHTML = maxValue;
}
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm 2011-05-08 19:22:16 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm 2011-07-12 13:59:10 +0000
@@ -1,1 +1,1 @@
-{ "code": "${statusCode}" }
\ No newline at end of file
+{"c":"${statusCode}"}
\ No newline at end of file