← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8988: (GIS) Minor fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 8988 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-11-13 12:56:17 +0100
message:
  (GIS) Minor fixed.
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/styles/style.css


--
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	2012-11-12 11:25:24 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js	2012-11-13 11:53:35 +0000
@@ -197,7 +197,7 @@
 		};
 		
 		GIS.init.security = {
-			isAdmin: init.security.isAdmin
+			isAdmin: false//init.security.isAdmin
 		};
 		
 		GIS.init.contextPath = init.contextPath;
@@ -1951,8 +1951,13 @@
 					items: [
 						{
 							iconCls: 'gis-grid-row-icon-edit',
-							getClass: function() {
-								return 'tooltip-map-edit';
+							getClass: function(value, metaData, record) {
+								var system = !record.data.user,
+									isAdmin = GIS.init.security.isAdmin;
+								
+								if (isAdmin || (!isAdmin && !system)) {
+									return 'tooltip-map-edit';
+								}
 							},
 							handler: function(grid, rowIndex, colIndex, col, event) {
 								var record = this.up('grid').store.getAt(rowIndex),
@@ -1969,8 +1974,13 @@
 						},
 						{
 							iconCls: 'gis-grid-row-icon-overwrite',
-							getClass: function() {
-								return 'tooltip-map-overwrite';
+							getClass: function(value, metaData, record) {
+								var system = !record.data.user,
+									isAdmin = GIS.init.security.isAdmin;
+								
+								if (isAdmin || (!isAdmin && !system)) {
+									return 'tooltip-map-overwrite';
+								}
 							},
 							handler: function(grid, rowIndex, colIndex, col, event) {
 								var record = this.up('grid').store.getAt(rowIndex),
@@ -2072,7 +2082,7 @@
 					],
 					renderer: function(value, metaData, record) {
 						if (!GIS.init.security.isAdmin && !record.data.user) {
-							metaData.tdCls += ' gis-grid-row-icon-disabled';
+							metaData.tdCls = 'gis-grid-row-icon-disabled';
 						}
 					}
 				}

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css	2012-11-12 14:46:04 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/styles/style.css	2012-11-13 11:53:35 +0000
@@ -455,7 +455,7 @@
 	margin-left: 4px;
 }
 .gis-grid-row-icon-disabled img.gis-grid-row-icon-edit,
-.gis-grid-row-icon-disabled img.gis-grid-row-icon-overwrite
+.gis-grid-row-icon-disabled img.gis-grid-row-icon-overwrite,
 .gis-grid-row-icon-disabled img.gis-grid-row-icon-delete {
 	opacity: 0;
 	filter:Alpha(opacity=0);
@@ -463,6 +463,9 @@
 .gis-grid-row-icon-disabled * {
 	cursor: default !important;
 }
+.gis-grid-row-icon-disabled img.gis-grid-row-icon-dashboard {
+	cursor: pointer !important;
+}
 
 .gis-grid .x-grid-cell-inner,
 .gis-grid .x-grid-cell-inner * {