← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4429: Layer window close button added.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 4429 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-08-24 17:43:16 +0200
message:
  Layer window close button added.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js
  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/Centroid.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/global.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-08-21 15:48:07 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-08-24 15:42:02 +0000
@@ -582,7 +582,6 @@
             this.cmp.mapValueType.setValue(this.valueType.value);
             
             this.setMapView();
-            this.window.cmp.reset.enable();
         }
     }
 };

=== 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-08-24 14:59:28 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-08-24 15:42:02 +0000
@@ -2286,20 +2286,11 @@
             ' ',
             {
                 xtype: 'button',
-                text: 'Reset',
+                text: 'Close',
                 iconCls: 'icon-cancel',
-                disabled: true,
                 scope: choropleth,
                 handler: function() {
-                    this.formValues.clearForm.call(this, false);
-                    this.window.cmp.reset.disable();
-                },
-                listeners: {
-                    'render': {
-                        fn: function(b) {
-                            b.scope.window.cmp.reset = b;
-                        }
-                    }
+                    this.window.hide();
                 }
             }
         ],
@@ -2385,20 +2376,11 @@
             ' ',
             {
                 xtype: 'button',
-                text: 'Reset',
+                text: 'Close',
                 iconCls: 'icon-cancel',
-                disabled: true,
                 scope: point,
                 handler: function() {
-                    this.formValues.clearForm.call(this, false);
-                    this.window.cmp.reset.disable();
-                },
-                listeners: {
-                    'render': {
-                        fn: function(b) {
-                            b.scope.window.cmp.reset = b;
-                        }
-                    }
+                    this.window.hide();
                 }
             }
         ],
@@ -2483,20 +2465,11 @@
             ' ',
             {
                 xtype: 'button',
-                text: 'Reset',
+                text: 'Close',
                 iconCls: 'icon-cancel',
-                disabled: true,
                 scope: symbol,
                 handler: function() {
-                    this.formValues.clearForm.call(this, false);
-                    this.window.cmp.reset.disable();
-                },
-                listeners: {
-                    'render': {
-                        fn: function(b) {
-                            b.scope.window.cmp.reset = b;
-                        }
-                    }
+                    this.window.hide();
                 }
             }
         ]
@@ -2573,20 +2546,11 @@
             ' ',
             {
                 xtype: 'button',
-                text: 'Reset',
+                text: 'Close',
                 iconCls: 'icon-cancel',
-                disabled: true,
                 scope: centroid,
                 handler: function() {
-                    this.formValues.clearForm.call(this, false);
-                    this.window.cmp.reset.disable();
-                },
-                listeners: {
-                    'render': {
-                        fn: function(b) {
-                            b.scope.window.cmp.reset = b;
-                        }
-                    }
+                    this.window.hide();
                 }
             }
         ]

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js	2011-08-24 14:59:28 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js	2011-08-24 15:42:02 +0000
@@ -284,8 +284,6 @@
                         this.valueType.value = cb.getValue();
                         this.prepareMapViewValueType();
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -310,8 +308,6 @@
                         this.cmp.indicator.clearValue();
                         this.stores.indicatorsByGroup.setBaseParam('indicatorGroupId', cb.getValue());
                         this.stores.indicatorsByGroup.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -365,8 +361,6 @@
                                 G.util.setLockPosition(cb);
                             }
                         });
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -391,8 +385,6 @@
                         this.cmp.dataElement.clearValue();
                         this.stores.dataElementsByGroup.setBaseParam('dataElementGroupId', cb.getValue());
                         this.stores.dataElementsByGroup.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -445,8 +437,6 @@
                                 G.util.setLockPosition(cb);
                             }
                         });
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -471,8 +461,6 @@
                         this.cmp.period.clearValue();
                         this.stores.periodsByType.setBaseParam('name', cb.getValue());
                         this.stores.periodsByType.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -499,8 +487,6 @@
                         
                         this.classify(false, cb.lockPosition);                        
                         G.util.setLockPosition(cb);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -518,8 +504,6 @@
                         this.updateValues = true;
                         this.cmp.endDate.setMinValue(date);
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -537,8 +521,6 @@
                         this.updateValues = true;
                         this.cmp.startDate.setMaxValue(date);
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -557,8 +539,7 @@
                 'select': {
                     scope: this,
                     fn: function() {
-                        this.applyPredefinedLegend();                        
-                        this.window.cmp.reset.enable();
+                        this.applyPredefinedLegend();
                     }
                 }
             }
@@ -581,9 +562,7 @@
                     scope: this,
                     fn: function() {
                         this.requireUpdate = true;
-                        this.formValidation.validateForm.call(this);    
-                                            
-                        this.window.cmp.reset.enable();
+                        this.formValidation.validateForm.call(this);
                     }
                 }
             }
@@ -623,8 +602,6 @@
                         tree.selectedNode = n;
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -1055,7 +1032,6 @@
             this.cmp.parent.reset();
             
             this.window.cmp.apply.disable();
-            this.window.cmp.reset.disable();
             
             if (clearLayer) {            
                 document.getElementById(this.legendDiv).innerHTML = '';                

=== 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-08-24 11:16:18 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-08-24 15:42:02 +0000
@@ -309,8 +309,6 @@
                         this.valueType.value = cb.getValue();
                         this.prepareMapViewValueType();
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -335,8 +333,6 @@
                         this.cmp.indicator.clearValue();
                         this.stores.indicatorsByGroup.setBaseParam('indicatorGroupId', cb.getValue());
                         this.stores.indicatorsByGroup.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -398,8 +394,6 @@
                                 }
                             }
                         });
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -424,8 +418,6 @@
                         this.cmp.dataElement.clearValue();
                         this.stores.dataElementsByGroup.setBaseParam('dataElementGroupId', cb.getValue());
                         this.stores.dataElementsByGroup.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -486,8 +478,6 @@
                                 }
                             }
                         });
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -512,8 +502,6 @@
                         this.cmp.period.clearValue();
                         this.stores.periodsByType.setBaseParam('name', cb.getValue());
                         this.stores.periodsByType.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -543,8 +531,6 @@
                         this.updateValues = true;
                         this.classify(false, cb.lockPosition);                        
                         G.util.setLockPosition(cb);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -563,8 +549,6 @@
                         this.updateValues = true;
                         this.cmp.endDate.setMinValue(date);
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -583,8 +567,6 @@
                         this.updateValues = true;
                         this.cmp.startDate.setMaxValue(date);
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -623,8 +605,6 @@
                             this.prepareMapViewLegend();                            
                             this.classify(false, true);
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -646,8 +626,6 @@
                     fn: function() {
                         this.cmp.mapview.clearValue();
                         this.applyPredefinedLegend();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -684,8 +662,6 @@
                             this.prepareMapViewLegend();
                             this.classify(false, true);
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -700,8 +676,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }  
             }
@@ -730,8 +704,6 @@
                             this.legend.classes = cb.getValue();
                             this.classify(false, true);
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -747,8 +719,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -764,8 +734,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -783,8 +751,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -802,8 +768,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -827,8 +791,6 @@
                     fn: function() {
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -868,8 +830,6 @@
                         tree.selectedNode = n;
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -1627,7 +1587,6 @@
             this.cmp.radiusHigh.reset();
             
             this.window.cmp.apply.disable();
-            this.window.cmp.reset.disable();
             
             if (clearLayer) {            
                 document.getElementById(this.legendDiv).innerHTML = '';                

=== 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-08-24 11:16:18 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js	2011-08-24 15:42:02 +0000
@@ -309,8 +309,6 @@
                         this.valueType.value = cb.getValue();
                         this.prepareMapViewValueType();
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -335,8 +333,6 @@
                         this.cmp.indicator.clearValue();
                         this.stores.indicatorsByGroup.setBaseParam('indicatorGroupId', cb.getValue());
                         this.stores.indicatorsByGroup.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -398,8 +394,6 @@
                                 }
                             }
                         });
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -424,8 +418,6 @@
                         this.cmp.dataElement.clearValue();
                         this.stores.dataElementsByGroup.setBaseParam('dataElementGroupId', cb.getValue());
                         this.stores.dataElementsByGroup.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -486,8 +478,6 @@
                                 }
                             }
                         });
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -512,8 +502,6 @@
                         this.cmp.period.clearValue();
                         this.stores.periodsByType.setBaseParam('name', cb.getValue());
                         this.stores.periodsByType.load();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -543,8 +531,6 @@
                         this.updateValues = true;
                         this.classify(false, cb.lockPosition);                        
                         G.util.setLockPosition(cb);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -563,8 +549,6 @@
                         this.updateValues = true;
                         this.cmp.endDate.setMinValue(date);
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -583,8 +567,6 @@
                         this.updateValues = true;
                         this.cmp.startDate.setMaxValue(date);
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -623,8 +605,6 @@
                             this.prepareMapViewLegend();                            
                             this.classify(false, true);
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -646,8 +626,6 @@
                     fn: function() {
                         this.cmp.mapview.clearValue();
                         this.applyPredefinedLegend();
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -684,8 +662,6 @@
                             this.prepareMapViewLegend();
                             this.classify(false, true);
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -700,8 +676,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }  
             }
@@ -730,8 +704,6 @@
                             this.legend.classes = cb.getValue();
                             this.classify(false, true);
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -747,8 +719,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -764,8 +734,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -783,8 +751,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -802,8 +768,6 @@
                     scope: this,
                     fn: function() {
                         this.classify(false, true);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -827,8 +791,6 @@
                     fn: function() {
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -868,8 +830,6 @@
                         tree.selectedNode = n;
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -1627,7 +1587,6 @@
             this.cmp.radiusHigh.reset();
             
             this.window.cmp.apply.disable();
-            this.window.cmp.reset.disable();
             
             if (clearLayer) {            
                 document.getElementById(this.legendDiv).innerHTML = '';                

=== 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-08-24 14:55:16 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2011-08-24 15:42:02 +0000
@@ -266,8 +266,6 @@
                             this.cmp.group.removeAll();
                             this.cmp.group.doLayout();
                         }
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -322,8 +320,6 @@
                     fn: function() {
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -363,8 +359,6 @@
                         tree.selectedNode = n;
                         this.requireUpdate = true;
                         this.formValidation.validateForm.call(this);
-                        
-                        this.window.cmp.reset.enable();
                     }
                 }
             }
@@ -700,7 +694,6 @@
             this.cmp.parent.reset();
             
             this.window.cmp.apply.disable();
-            this.window.cmp.reset.disable();
             
             if (clearLayer) {            
                 document.getElementById(this.legendDiv).innerHTML = '';