← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13897: GIS, facility popup menu fixes.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13897 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-30 15:09:16 +0100
message:
  GIS, facility popup menu fixes.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/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/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2014-01-30 11:59:43 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2014-01-30 14:06:53 +0000
@@ -447,8 +447,10 @@
 			};
 
 			// Menu
-			var menuItems = [
-				Ext.create('Ext.menu.Item', {
+			var menuItems = [];
+
+            if (layer.id !== 'facility') {
+				menuItems.push(Ext.create('Ext.menu.Item', {
 					text: 'Float up',
 					iconCls: 'gis-menu-item-icon-float',
 					cls: 'gis-plugin',
@@ -456,8 +458,9 @@
 					handler: function() {
 						drill(att.grandParentId, att.grandParentParentGraph, parseInt(att.level) - 1);
 					}
-				}),
-				Ext.create('Ext.menu.Item', {
+				}));
+
+                menuItems.push(Ext.create('Ext.menu.Item', {
 					text: 'Drill down',
 					iconCls: 'gis-menu-item-icon-drill',
 					cls: 'gis-menu-item-first gis-plugin',
@@ -465,13 +468,16 @@
 					handler: function() {
 						drill(att.id, att.parentGraph, parseInt(att.level) + 1);
 					}
-				})
-			];
+				}));
+			}
 
 			if (isRelocate && isPoint) {
-				menuItems.push({
-					xtype: 'menuseparator'
-				});
+
+                if (layer.id !== 'facility') {
+                    menuItems.push({
+                        xtype: 'menuseparator'
+                    });
+                }
 
 				menuItems.push( Ext.create('Ext.menu.Item', {
 					text: GIS.i18n.relocate,