← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13894: GIS, minor style fixes.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13894 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-30 12:33:48 +0100
message:
  GIS, minor style fixes.
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/scripts/core.js
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.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-29 12:34:16 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2014-01-30 10:22:45 +0000
@@ -661,7 +661,7 @@
 			layer = gis.layer.event;
 			layer.menu = GIS.app.LayerMenu(layer, 'gis-toolbar-btn-menu-first');
 			layer.widget = GIS.app.LayerWidgetEvent(layer);
-			layer.window = GIS.app.WidgetWindow(layer, gis.conf.layout.widget.window_width + 150, 3);
+			layer.window = GIS.app.WidgetWindow(layer, gis.conf.layout.widget.window_width + 150, 1);
 			layer.window.widget = layer.widget;
 			GIS.core.createSelectHandlers(gis, layer);
 
@@ -943,6 +943,11 @@
 			}
 		});
 
+        var operatorCmpWidth = 70,
+            valueCmpWidth = 304,
+            buttonCmpWidth = 20,
+            nameCmpWidth = 400;
+
         Ext.define('Ext.ux.panel.DataElementIntegerContainer', {
 			extend: 'Ext.container.Container',
 			alias: 'widget.dataelementintegerpanel',
@@ -964,7 +969,7 @@
                     displayField: 'name',
                     queryMode: 'local',
                     editable: false,
-                    width: 70,
+                    width: operatorCmpWidth,
                     value: 'EQ',
                     store: {
                         fields: ['id', 'name'],
@@ -980,13 +985,13 @@
                 });
 
                 this.valueCmp = Ext.create('Ext.form.field.Number', {
-                    width: 300,
+                    width: valueCmpWidth,
                     value: 0
                 });
 
                 this.addCmp = Ext.create('Ext.button.Button', {
                     text: '+',
-                    width: 20,
+                    width: buttonCmpWidth,
                     handler: function() {
 						container.duplicateDataElement();
 					}
@@ -994,7 +999,7 @@
 
                 this.removeCmp = Ext.create('Ext.button.Button', {
                     text: 'x',
-                    width: 20,
+                    width: buttonCmpWidth,
                     handler: function() {
                         container.removeDataElement();
                     }
@@ -1002,7 +1007,7 @@
 
                 this.nameCmp = Ext.create('Ext.form.Label', {
                     text: this.dataElement.name,
-                    width: 360,
+                    width: nameCmpWidth,
                     style: 'padding:2px'
                 });
 
@@ -1039,7 +1044,7 @@
                     displayField: 'name',
                     queryMode: 'local',
                     editable: false,
-                    width: 70,
+                    width: operatorCmpWidth,
                     value: 'LIKE',
                     store: {
                         fields: ['id', 'name'],
@@ -1051,17 +1056,17 @@
                 });
 
                 this.valueCmp = Ext.create('Ext.form.field.Text', {
-                    width: 300
+                    width: valueCmpWidth
                 });
 
                 this.addCmp = Ext.create('Ext.button.Button', {
                     text: '+',
-                    width: 20
+                    width: buttonCmpWidth
                 });
 
                 this.removeCmp = Ext.create('Ext.button.Button', {
                     text: 'x',
-                    width: 20,
+                    width: buttonCmpWidth,
                     handler: function() {
                         container.removeDataElement();
                     }
@@ -1069,7 +1074,7 @@
 
                 this.nameCmp = Ext.create('Ext.form.Label', {
                     text: this.dataElement.name,
-                    width: 360,
+                    width: nameCmpWidth,
                     style: 'padding:2px'
                 });
 
@@ -1106,7 +1111,7 @@
                     displayField: 'name',
                     queryMode: 'local',
                     editable: false,
-                    width: 70,
+                    width: operatorCmpWidth,
                     value: 'EQ',
                     store: {
                         fields: ['id', 'name'],
@@ -1122,18 +1127,18 @@
                 });
 
                 this.valueCmp = Ext.create('Ext.form.field.Date', {
-					width: 300,
+					width: valueCmpWidth,
 					format: 'Y-m-d'
 				});
 
                 this.addCmp = Ext.create('Ext.button.Button', {
                     text: '+',
-                    width: 20
+                    width: buttonCmpWidth
                 });
 
                 this.removeCmp = Ext.create('Ext.button.Button', {
                     text: 'x',
-                    width: 20,
+                    width: buttonCmpWidth,
                     handler: function() {
                         container.removeDataElement();
                     }
@@ -1141,7 +1146,7 @@
 
                 this.nameCmp = Ext.create('Ext.form.Label', {
                     text: this.dataElement.name,
-                    width: 360,
+                    width: nameCmpWidth,
                     style: 'padding:2px'
                 });
 
@@ -1177,7 +1182,7 @@
                     displayField: 'name',
                     queryMode: 'local',
                     editable: false,
-                    width: 70,
+                    width: operatorCmpWidth + valueCmpWidth,
                     value: 'false',
                     store: {
                         fields: ['id', 'name'],
@@ -1190,12 +1195,12 @@
 
                 this.addCmp = Ext.create('Ext.button.Button', {
                     text: '+',
-                    width: 20
+                    width: buttonCmpWidth
                 });
 
                 this.removeCmp = Ext.create('Ext.button.Button', {
                     text: 'x',
-                    width: 20,
+                    width: buttonCmpWidth,
                     handler: function() {
                         container.removeDataElement();
                     }
@@ -1203,7 +1208,7 @@
 
                 this.nameCmp = Ext.create('Ext.form.Label', {
                     text: this.dataElement.name,
-                    width: 360,
+                    width: nameCmpWidth,
                     style: 'padding:2px'
                 });
 
@@ -1242,7 +1247,7 @@
 
                 this.nameCmp = Ext.create('Ext.form.Label', {
                     text: this.dataElement.name,
-                    width: 360,
+                    width: nameCmpWidth,
                     style: 'padding:2px 2px 2px 1px'
                 });
 
@@ -1251,7 +1256,7 @@
                     displayField: 'name',
                     queryMode: 'local',
                     editable: false,
-                    width: 70,
+                    width: operatorCmpWidth,
                     value: 'IN',
                     store: {
                         fields: ['id', 'name'],
@@ -1383,7 +1388,7 @@
                 });
 
                 this.valueCmp = Ext.create('Ext.form.field.Text', {
-					width: 220,
+					width: 224,
 					addOptionValue: function(option) {
 						var value = this.getValue();
 
@@ -1406,13 +1411,13 @@
 
                 this.addCmp = Ext.create('Ext.button.Button', {
                     text: '+',
-                    width: 20,
+                    width: buttonCmpWidth,
                     style: 'font-weight:bold'
                 });
 
                 this.removeCmp = Ext.create('Ext.button.Button', {
                     text: 'x',
-                    width: 20,
+                    width: buttonCmpWidth,
                     handler: function() {
                         container.removeDataElement();
                     }
@@ -3955,7 +3960,7 @@
             baseWidth = 442,
             toolWidth = 36,
 
-            accBaseWidth = baseWidth - 6;
+            accBaseWidth = baseWidth - 2;
 
 		// stores
 
@@ -4220,7 +4225,7 @@
         dataElementSelected = Ext.create('Ext.panel.Panel', {
 			width: accBaseWidth,
             height: 204,
-            bodyStyle: 'padding:2px 5px 5px; overflow-y: scroll',
+            bodyStyle: 'padding:2px 0 5px 3px; overflow-y: scroll',
             tbar: {
                 height: 27,
                 items: {

=== 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-31 16:46:50 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2014-01-30 10:22:45 +0000
@@ -1042,7 +1042,7 @@
 
                     // events
                     for (var i = 0, row, obj; i < rows.length; i++) {
-                        row = rows[i];						
+                        row = rows[i];
                         obj = {};
 
                         for (var j = 0; j < row.length; j++) {
@@ -1758,7 +1758,7 @@
 
 		loadData = function(view, features) {
 			var success;
-			
+
 			view = view || layer.core.view;
 			features = features || layer.core.featureStore.features;
 
@@ -2729,7 +2729,6 @@
 		gis.olmap.addLayers(layers);
 
 		GIS.core.instances.push(gis);
-e = gis.layer.event;
 
 		return gis;
 	};

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js	2014-01-23 19:55:42 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js	2014-01-29 16:12:38 +0000
@@ -1778,6 +1778,13 @@
                         axis.maximum = maximum;
                     }
 
+                    //if (store.getMaximum() < 10) {
+                        //alert(store.rangeFields.length);
+                        //axis.majorTickSteps = 12;
+                    //}
+
+                    //axis.majorTickSteps = 6;
+
                     if (xLayout.rangeAxisTitle) {
                         axis.title = xLayout.rangeAxisTitle;
                     }