← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13548: PT, download url issue fixed

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13548 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-02 16:37:17 +0100
message:
  PT, download url issue fixed
modified:
  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/plugin.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-12-31 16:01:52 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2014-01-02 15:36:23 +0000
@@ -4638,6 +4638,10 @@
 			}
 		});
 
+		getParamString = function() {
+			return ns.core.web.analytics.getParamString(ns.core.service.layout.getExtendedLayout(ns.app.layout));
+		};
+
 		openTableLayoutTab = function(type, isNewTab) {
 			if (ns.core.init.contextPath && ns.app.paramString) {
 				var colDimNames = Ext.clone(ns.app.xLayout.columnDimensionNames),
@@ -4650,8 +4654,7 @@
 					rowNames = Ext.Array.clean([].concat(rowDimNames, (Ext.Array.contains(rowObjNames, dc) ? co : []))),
 					url = '';
 
-				url += ns.core.init.contextPath + '/api/analytics.' + type;
-				url += ns.core.web.analytics.getParamString(ns.app.xLayout);
+				url += ns.core.init.contextPath + '/api/analytics.' + type + getParamString();
 				url += '&tableLayout=true';
 				url += '&columns=' + columnNames.join(';');
 				url += '&rows=' + rowNames.join(';');
@@ -4705,7 +4708,7 @@
 						iconCls: 'ns-menu-item-datasource',
 						handler: function() {
 							if (ns.core.init.contextPath && ns.app.paramString) {
-								window.open(ns.core.init.contextPath + '/api/analytics.json' + ns.app.paramString, '_blank');
+								window.open(ns.core.init.contextPath + '/api/analytics.json' + getParamString(), '_blank');
 							}
 						}
 					},
@@ -4714,7 +4717,7 @@
 						iconCls: 'ns-menu-item-datasource',
 						handler: function() {
 							if (ns.core.init.contextPath && ns.app.paramString) {
-								window.open(ns.core.init.contextPath + '/api/analytics.xml' + ns.app.paramString, '_blank');
+								window.open(ns.core.init.contextPath + '/api/analytics.xml' + getParamString(), '_blank');
 							}
 						}
 					},
@@ -4723,7 +4726,7 @@
 						iconCls: 'ns-menu-item-datasource',
 						handler: function() {
 							if (ns.core.init.contextPath && ns.app.paramString) {
-								window.location.href = ns.core.init.contextPath + '/api/analytics.xls' + ns.app.paramString;
+								window.location.href = ns.core.init.contextPath + '/api/analytics.xls' + getParamString();
 							}
 						}
 					},
@@ -4732,7 +4735,7 @@
 						iconCls: 'ns-menu-item-datasource',
 						handler: function() {
 							if (ns.core.init.contextPath && ns.app.paramString) {
-								window.location.href = ns.core.init.contextPath + '/api/analytics.csv' + ns.app.paramString;
+								window.location.href = ns.core.init.contextPath + '/api/analytics.csv' + getParamString();
 							}
 						}
 					},
@@ -4741,7 +4744,7 @@
 						iconCls: 'ns-menu-item-datasource',
 						handler: function() {
 							if (ns.core.init.contextPath && ns.app.paramString) {
-								window.open(ns.core.init.contextPath + '/api/analytics.jrxml' + ns.app.paramString, '_blank');
+								window.open(ns.core.init.contextPath + '/api/analytics.jrxml' + getParamString(), '_blank');
 							}
 						}
 					}

=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js	2014-01-02 14:50:20 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js	2014-01-02 15:36:23 +0000
@@ -2596,7 +2596,6 @@
 
 	Ext.util.CSS.createStyleSheet(css);
 
-	// plugin
 	PT.plugin = {};
 
 	var init = {