← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3662: (GIS) Symbol layer actions added to title bar.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 3662 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-19 10:49:13 +0200
message:
  (GIS) Symbol layer actions added to title bar.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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/mapping/javascript/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-05-13 12:34:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-05-19 08:48:09 +0000
@@ -2451,6 +2451,22 @@
         featureSelection: false,
         legendDiv: 'symbollegend',
         defaults: {width: 130},
+        tools: [
+            {
+                id: 'refresh',
+                qtip: 'Refresh layer',
+                handler: function() {
+                    symbol.classify();
+                }
+            },
+            {
+                id: 'close',
+                qtip: 'Clear layer',
+                handler: function() {
+                    symbol.formValues.clearForm.call(symbol);
+                }
+            }
+        ],
         listeners: {
             'expand': function() {
                 G.vars.activePanel.setSymbol();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-05-12 12:36:10 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-05-19 08:48:09 +0000
@@ -1398,6 +1398,8 @@
             this.form.findField('classes').setValue(this.legend.classes);
             this.form.findField('bounds').reset();
             
+            document.getElementById(this.legendDiv).innerHTML = '';
+            
             this.layer.destroyFeatures();
             this.layer.setVisibility(false);
         }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js	2011-04-12 17:22:06 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js	2011-05-19 08:48:09 +0000
@@ -1481,6 +1481,8 @@
             this.form.findField('radiuslow').reset();
             this.form.findField('radiushigh').reset();
             
+            document.getElementById(this.legendDiv).innerHTML = '';
+            
             this.layer.destroyFeatures();
             this.layer.setVisibility(false);
         }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-05-13 13:11:41 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-05-19 08:48:09 +0000
@@ -607,8 +607,10 @@
 		},
         
         clearForm: function() {
-            var boundary = this.form.findField('boundary')
+            var boundary = this.form.findField('boundary');
             var level = this.form.findField('level');
+            var groupset = this.form.findField('groupset');
+            var panel = Ext.getCmp('groups_p');
             boundary.reset();
             level.reset();
             if (boundary.treePanel && level.levelComboBox) {
@@ -616,6 +618,14 @@
                 level.levelComboBox.clearValue();
             }
             
+            groupset.clearValue();
+            groupset.currentValue = null;
+            
+            panel.removeAll();
+            panel.doLayout();
+            
+            document.getElementById(this.legendDiv).innerHTML = '';            
+            
             this.layer.destroyFeatures();
             this.layer.setVisibility(false);
         }