← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7250: (DV) Data validation bug fixed + RP param names fix.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 7250 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-06-09 19:06:27 +0300
message:
  (DV) Data validation bug fixed + RP param names fix.
modified:
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.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-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js	2012-06-07 17:30:15 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js	2012-06-09 15:52:46 +0000
@@ -191,8 +191,8 @@
 		last12Months: 12,
 		last4Quarters: 4,
 		last2SixMonths: 2,
-		lastMonth: 1,
-		lastQuarter: 1
+		reportingMonth: 1,
+		reportingQuarter: 1
 	},
     chart: {
         style: {
@@ -1891,8 +1891,8 @@
 				}
 				return true;
 			},
-			value: function() {
-				if (!DV.value.values.length) {
+			value: function(r) {
+				if (!r.v) {
 					DV.util.mask.hideMask();
 					DV.util.notification.error(DV.i18n.et_no_data, DV.i18n.em_no_data);
 					return false;
@@ -1933,10 +1933,12 @@
                 disableCaching: false,
                 success: function(r) {
 					r = Ext.JSON.decode(r.responseText);
+                    
+                    if (!DV.state.validation.value(r)) {
+						return;
+					}
+					
                     DV.value.values = DV.util.value.jsonfy(r.v);
-                    if (!DV.state.validation.value()) {
-						return;
-					}
 					
 					DV.c.data.names = r.d;
 					DV.c.period.names = r.p;
@@ -3032,7 +3034,7 @@
 															},
 															{
 																xtype: 'checkbox',
-																paramName: 'lastMonth',
+																paramName: 'reportingMonth',
 																boxLabel: DV.i18n.last_month
 															},
 															{
@@ -3065,7 +3067,7 @@
 															},
 															{
 																xtype: 'checkbox',
-																paramName: 'lastQuarter',
+																paramName: 'reportingQuarter',
 																boxLabel: DV.i18n.last_quarter
 															},
 															{