← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1717: update missing java script in GIS mapping

 

------------------------------------------------------------
revno: 1717
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Wed 2010-03-31 11:47:29 +0100
message:
  update missing java script in GIS mapping
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGDocument.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.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/java/org/hisp/dhis/mapping/export/SVGDocument.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGDocument.java	2010-03-25 22:59:41 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGDocument.java	2010-03-31 10:47:29 +0000
@@ -65,13 +65,13 @@
 
     public StringBuffer getSVGForImage()
     {
-        String title_ = "<g id=\"title\" style=\"display: block; visibility: visible;\"><text id=\"title\" x=\"30\" y=\"15\" font-size=\"14\" font-weight=\"bold\"><tspan>"
+        String title_ = "<g id=\"title\" style=\"display: block; visibility: visible;\"><text id=\"title\" x=\"15\" y=\"15\" font-size=\"14\" font-weight=\"bold\"><tspan>"
             + this.title + "</tspan></text></g>";
 
-        String period_ = "<g id=\"period\" style=\"display: block; visibility: visible;\"><text id=\"period\" x=\"30\" y=\"30\" font-size=\"12\"><tspan>"
+        String period_ = "<g id=\"period\" style=\"display: block; visibility: visible;\"><text id=\"period\" x=\"15\" y=\"30\" font-size=\"12\"><tspan>"
             + this.period.getName() + "</tspan></text></g>";
 
-        String indicator_ = "<g id=\"indicator\" style=\"display: block; visibility: visible;\"><text id=\"indicator\" x=\"30\" y=\"45\" font-size=\"12\"><tspan>"
+        String indicator_ = "<g id=\"indicator\" style=\"display: block; visibility: visible;\"><text id=\"indicator\" x=\"15\" y=\"45\" font-size=\"12\"><tspan>"
             + this.indicator.getName() + "</tspan></text></g>";
 
         String svg_ = doctype + this.svg;
@@ -82,7 +82,7 @@
 
         if ( this.includeLegends )
         {
-            svg_ = svg_.replaceFirst( "</svg>", this.getLegendScript( 30, 70 ) + "</svg>" );
+            svg_ = svg_.replaceFirst( "</svg>", this.getLegendScript( 15, 70 ) + "</svg>" );
         }
 
         return new StringBuffer( svg_ );

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2010-03-25 18:55:29 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2010-03-31 10:47:29 +0000
@@ -77,6 +77,9 @@
 .x-btn .icon-pdf {
 	background-image:url(../../../images/pdf.png);
 }
+.x-btn .icon-export-map {
+	background-image:url(../../../images/export.png);
+}
 .aa_dark button  {
 	font-family:lucida sans unicode,arial;
 	font-weight:normal;

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-03-25 22:59:41 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-03-31 10:47:29 +0000
@@ -12,6 +12,7 @@
 var MASK;
 var LABELS;
 var COLORINTERPOLATION;
+var EXPORTVALUES;
 
 function getUrlParam(strParamName) {
     var output = '';
@@ -3623,6 +3624,8 @@
 			'-',
 			pdfButton,
 			'-',
+			exportMapButton,
+			'-',
 			favoritesButton,
 			'-',
             automaticMapLegendSetButton,
@@ -4005,6 +4008,9 @@
 			var layers = MAP.getLayersByName('Thematic map');
 			var features = layers[0].features;
 			var mapvalues = Ext.util.JSON.decode(r.responseText).mapvalues;
+			
+			EXPORTVALUES = getExportDataValueJSON( mapvalues );
+			
 			var mv = new Array();
 			var nameColumn = MAPDATA.nameColumn;
 			var options = {};