← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11270: (PT) Download issue fixed + Validation bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11270 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-06-27 18:43:10 +0200
message:
  (PT) Download issue fixed + Validation bug fixed.
modified:
  dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-06-26 16:11:35 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2013-06-27 16:41:44 +0000
@@ -128,7 +128,7 @@
 				nameDimArrayMap[dimConf.dataElement.objectName],
 				nameDimArrayMap[dimConf.operand.objectName],
 				nameDimArrayMap[dimConf.dataSet.objectName]
-			));
+			));			
 
 			// Columns, rows, filters
 			for (var i = 0, nameArrays = [columnDimNames, rowDimNames, filterDimNames], axes = [config.columns, config.rows, config.filters], dimNames; i < nameArrays.length; i++) {
@@ -3799,8 +3799,8 @@
 					return;
 				}
 
-				dimensions = [].concat(layout.columns, layout.rows, layout.filters);
-
+				dimensions = Ext.Array.clean([].concat(layout.columns, layout.rows, layout.filters));
+				
 				for (var i = 0; i < dimensions.length; i++) {
 					objectNameDimensionMap[dimensions[i].dimension] = dimensions[i];
 				}
@@ -3965,7 +3965,7 @@
 
 			openTableLayoutTab = function(type, isNewTab) {
 				if (pt.baseUrl && pt.paramString) {
-					var url = pt.baseUrl + '/api/analytics.' + type + pt.util.pivot.getParamString(pt.xLayout);
+					var url = pt.baseUrl + '/api/analytics.' + type + pt.paramString;
 					url += '&tableLayout=true&columns=' + pt.xLayout.columnDimensionNames.join(';') + '&rows=' + pt.xLayout.rowDimensionNames.join(';');
 
 					window.open(url, isNewTab ? '_blank' : '_top');
@@ -4016,7 +4016,7 @@
 							iconCls: 'pt-menu-item-datasource',
 							handler: function() {
 								if (pt.baseUrl && pt.paramString) {
-									window.open(pt.baseUrl + '/api/analytics.json' + pt.util.pivot.getParamString(pt.xLayout, true), '_blank');
+									window.open(pt.baseUrl + '/api/analytics.json' + pt.paramString, '_blank');
 								}
 							}
 						},
@@ -4025,7 +4025,7 @@
 							iconCls: 'pt-menu-item-datasource',
 							handler: function() {
 								if (pt.baseUrl && pt.paramString) {
-									window.open(pt.baseUrl + '/api/analytics.xml' + pt.util.pivot.getParamString(pt.xLayout, true), '_blank');
+									window.open(pt.baseUrl + '/api/analytics.xml' + pt.paramString, '_blank');
 								}
 							}
 						},
@@ -4034,7 +4034,7 @@
 							iconCls: 'pt-menu-item-datasource',
 							handler: function() {
 								if (pt.baseUrl && pt.paramString) {
-									window.location.href = pt.baseUrl + '/api/analytics.xls' + pt.util.pivot.getParamString(pt.xLayout, true);
+									window.location.href = pt.baseUrl + '/api/analytics.xls' + pt.paramString;
 								}
 							}
 						},
@@ -4043,7 +4043,7 @@
 							iconCls: 'pt-menu-item-datasource',
 							handler: function() {
 								if (pt.baseUrl && pt.paramString) {
-									window.location.href = pt.baseUrl + '/api/analytics.csv' + pt.util.pivot.getParamString(pt.xLayout, true);
+									window.location.href = pt.baseUrl + '/api/analytics.csv' + pt.paramString;
 								}
 							}
 						},
@@ -4052,7 +4052,7 @@
 							iconCls: 'pt-menu-item-datasource',
 							handler: function() {
 								if (pt.baseUrl && pt.paramString) {
-									window.open(pt.baseUrl + '/api/analytics.jrxml' + pt.util.pivot.getParamString(pt.xLayout, true), '_blank');
+									window.open(pt.baseUrl + '/api/analytics.jrxml' + pt.paramString, '_blank');
 								}
 							}
 						}