← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13571: GIS, plugin config.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13571 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-01-03 19:55:23 +0100
message:
  GIS, plugin config.
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/styles/style.css
  dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.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/app.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2014-01-03 11:40:12 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2014-01-03 18:54:29 +0000
@@ -8020,13 +8020,24 @@
 			handler: function() {
 				var textArea,
 					window,
-					text = 'DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig())) + ');';
+					text = '';
+
+				text += '<html>\n<head>\n';
+				text += '<link rel="stylesheet" href="http://dhis2-cdn.org/v214/ext/resources/css/ext-plugin-gray.css"; />\n';
+				text += '<script src="http://dhis2-cdn.org/v214/ext/ext-all.js";></script>\n';
+				text += '<script src="http://dhis2-cdn.org/v214/plugin/table.js";></script>\n';
+				text += '</head>\n\n<body>\n';
+				text += '<div id="table1"></div>\n\n';
+				text += '<script>\n\n';
+				text += 'DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig()), null, 2) + ');\n\n';
+				text += '</script>\n\n';
+				text += '</body>\n</html>';
 
 				textArea = Ext.create('Ext.form.field.TextArea', {
-					width: 400,
-					height: 200,
+					width: 700,
+					height: 400,
 					readOnly: true,
-					cls: 'gis-textarea monospaced',
+					cls: 'ns-textarea monospaced',
 					value: text
 				});
 
@@ -8040,13 +8051,6 @@
 					bbar: [
 						'->',
 						{
-							text: 'Format',
-							handler: function() {
-								textArea.setValue('DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig()), null, 2) + ');');
-
-							}
-						},
-						{
 							text: 'Select',
 							handler: function() {
 								textArea.selectText();
@@ -8062,6 +8066,53 @@
 
 				window.show();
 			}
+
+
+			
+				//var textArea,
+					//window,
+					//text = 'DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig())) + ');';
+
+				//textArea = Ext.create('Ext.form.field.TextArea', {
+					//width: 400,
+					//height: 200,
+					//readOnly: true,
+					//cls: 'gis-textarea monospaced',
+					//value: text
+				//});
+
+				//window = Ext.create('Ext.window.Window', {
+					//title: 'Plugin configuration',
+					//layout: 'fit',
+					//modal: true,
+					//resizable: false,
+					//items: textArea,
+					//destroyOnBlur: true,
+					//bbar: [
+						//'->',
+						//{
+							//text: 'Format',
+							//handler: function() {
+								//textArea.setValue('DHIS.getMap(' + JSON.stringify(gis.util.map.map2plugin(gis.util.layout.getPluginConfig()), null, 2) + ');');
+
+							//}
+						//},
+						//{
+							//text: 'Select',
+							//handler: function() {
+								//textArea.selectText();
+							//}
+						//}
+					//],
+					//listeners: {
+						//show: function(w) {
+							//this.setPosition(215, 33);
+						//}
+					//}
+				//});
+
+				//window.show();
+			//}
 		});
 
 		shareButton = Ext.create('Ext.button.Button', {

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css	2013-12-30 21:38:10 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css	2014-01-03 18:54:29 +0000
@@ -1078,3 +1078,18 @@
 .gis-accordion .gis-combo .x-form-item-label {
 	padding: 4px 0 0;
 }
+
+
+/*----------------------------------------------------------------------------
+ * NS Textarea
+ *--------------------------------------------------------------------------*/
+
+.ns-textarea .x-form-field {
+	font-size: 11px;
+}
+
+.ns-textarea.monospaced textarea {
+	font-family: monospace, consolas, courier new !important;
+	padding: 4px;
+	border: 0 none;
+}

=== 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	2014-01-03 18:02:38 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js	2014-01-03 18:54:47 +0000
@@ -4807,7 +4807,7 @@
 				text += '</head>\n\n<body>\n';
 				text += '<div id="table1"></div>\n\n';
 				text += '<script>\n\n';
-				text += 'DHIS.getTable(' + JSON.stringify(ns.core.service.layout.layout2plugin(ns.app.layout, 'table1'), null, 2) + ');\n';
+				text += 'DHIS.getTable(' + JSON.stringify(ns.core.service.layout.layout2plugin(ns.app.layout, 'table1'), null, 2) + ');\n\n';
 				text += '</script>\n\n';
 				text += '</body>\n</html>';
 

=== 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	2014-01-03 18:01:48 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2014-01-03 18:54:29 +0000
@@ -4485,7 +4485,7 @@
 				text += '</head>\n\n<body>\n';
 				text += '<div id="chart1"></div>\n\n';
 				text += '<script>\n\n';
-				text += 'DHIS.getChart(' + JSON.stringify(ns.core.service.layout.layout2plugin(ns.app.layout, 'chart1'), null, 2) + ');\n';
+				text += 'DHIS.getChart(' + JSON.stringify(ns.core.service.layout.layout2plugin(ns.app.layout, 'chart1'), null, 2) + ');\n\n';
 				text += '</script>\n\n';
 				text += '</body>\n</html>';