← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13350: (GIS) Event layer request url issues fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13350 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-12-20 15:44:19 +0100
message:
  (GIS) Event layer request url issues fixed.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.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-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-12-20 13:39:21 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-12-20 14:43:05 +0000
@@ -1223,11 +1223,17 @@
 			layout: 'column',
             bodyStyle: 'border:0 none',
             getRecord: function() {
+				var valueArray = this.valueCmp.getValue().split(';');
+
+				for (var i = 0; i < valueArray.length; i++) {
+					valueArray[i] = Ext.String.trim(valueArray[i]);
+				}
+				
                 return {
                     id: this.dataElement.id,
                     name: this.dataElement.name,
                     operator: this.operatorCmp.getValue(),
-                    value: this.valueCmp.getValue()
+                    value: valueArray.join(';')
                 };
             },
             initComponent: function() {
@@ -4958,7 +4964,7 @@
 
                 view.dataElements.push(panel.getRecord());
             }
-
+console.log(view);
             view.organisationUnits = treePanel.getDimension().items;
 
 			return view;

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-12-19 23:02:08 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-12-20 14:43:05 +0000
@@ -871,8 +871,12 @@
             paramString += '&startDate=' + view.startDate;
             paramString += '&endDate=' + view.endDate;
 
-            // ou //todo
-            paramString += '&dimension=ou:' + view.organisationUnits[0].id;
+            // ou
+            if (Ext.isArray(view.organisationUnits)) {
+				for (var i = 0; i < view.organisationUnits.length; i++) {
+					paramString += '&dimension=ou:' + view.organisationUnits[i].id;
+				}
+			}
 
             // de
             for (var i = 0, element; i < view.dataElements.length; i++) {