← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13419: Reverted r 13417

 

------------------------------------------------------------
revno: 13419
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-12-24 16:22:04 +0100
message:
  Reverted r 13417
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/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-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-23 21:01:24 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-12-24 15:22:04 +0000
@@ -746,7 +746,7 @@
 			listeners: {
 				show: function() {
 					var x = gis.viewport.eastRegion.getPosition()[0] - this.getWidth() - 3,
-						y = gis.viewport.centerRegion.getPosition()[1] + 58;
+						y = gis.viewport.centerRegion.getPosition()[1] + 26;
 					this.setPosition(x, y);
 				},
 				destroy: function() {

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2013-12-24 14:40:33 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2013-12-24 15:22:04 +0000
@@ -1344,40 +1344,23 @@
 			support.svg = support.svg || {};
 
 			support.svg.submitForm = function(type) {
-                var svg = Ext.query('svg');
-                
-                if (!(Ext.isArray(svg) && svg.length)) {
+				var svg = Ext.query('svg'),
+					form = Ext.query('#exportForm')[0];
+
+				if (!(Ext.isArray(svg) && svg.length)) {
 					alert('Browser does not support SVG');
 					return;
 				}
 
-                svg = Ext.get(svg[0]).parent().dom.innerHTML;
-
-                Ext.Ajax.request({
-                    url: ns.core.init.contextPath + '/api/svg.' + type,
-                    method: 'POST',
-                    headers: {'Content-Type': 'application/xml'},
-                    params: Ext.encode(svg)
-                });
-                
-				//var svg = Ext.query('svg'),
-					//form = Ext.query('#exportForm')[0];
-
-				//if (!(Ext.isArray(svg) && svg.length)) {
-					//alert('Browser does not support SVG');
-					//return;
-				//}
-
-				//svg = Ext.get(svg[0]);
-				//svg = svg.parent().dom.innerHTML;
-
-				//Ext.query('#svgField')[0].value = svg;
-				//Ext.query('#typeField')[0].value = type;
-				//Ext.query('#nameField')[0].value = 'test';
-
-				//form.action = ns.core.init.contextPath + '/api/svg.' + type;
-                //form.method = 'post';
-				//form.submit();
+				svg = Ext.get(svg[0]);
+				svg = svg.parent().dom.innerHTML;
+
+				Ext.query('#svgField')[0].value = svg;
+				Ext.query('#typeField')[0].value = type;
+				Ext.query('#nameField')[0].value = 'test';
+
+				form.action = '../exportImage.action';
+				form.submit();
 			};
 		}());