← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13446: gis, event layer menu fixes

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13446 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-12-27 14:52:28 +0100
message:
  gis, event layer menu fixes
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/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	2013-12-25 23:03:08 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2013-12-27 13:44:39 +0000
@@ -1490,24 +1490,26 @@
 			items.push(item);
 		}
 
-		item = {
-			text: GIS.i18n.search,
-			iconCls: 'gis-menu-item-icon-search',
-			handler: function() {
-				if (layer.searchWindow) {
-					if (layer.searchWindow.isVisible()) {
-						return;
-					}
-					else {
-						layer.searchWindow.destroy();
-					}
-				}
+        if (!(layer.id === gis.layer.event.id)) {
+            item = {
+                text: GIS.i18n.search,
+                iconCls: 'gis-menu-item-icon-search',
+                handler: function() {
+                    if (layer.searchWindow) {
+                        if (layer.searchWindow.isVisible()) {
+                            return;
+                        }
+                        else {
+                            layer.searchWindow.destroy();
+                        }
+                    }
 
-				layer.searchWindow = GIS.app.SearchWindow(layer);
-				layer.searchWindow.show();
-			}
-		};
-		items.push(item);
+                    layer.searchWindow = GIS.app.SearchWindow(layer);
+                    layer.searchWindow.show();
+                }
+            };
+            items.push(item);
+        }
 
 		items.push({
 			xtype: 'menuseparator',
@@ -4840,7 +4842,7 @@
             program.clearValue();
             stage.clearValue();
 
-            dataElementAvailable.removeAll();
+            dataElementsByStageStore.removeAll();
             dataElementSelected.removeAll();
 
             startDate.reset();