← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18412: R 18411 rollback

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18412 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-02-25 16:09:00 +0100
message:
  R 18411 rollback
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventreport.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/table.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.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-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/eventreport.js	2015-02-25 15:08:02 +0000
@@ -1153,9 +1153,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2191,7 +2191,7 @@
 					valueObjects = [],
 					totalColObjects = [],
 					uuidDimUuidsMap = {},
-					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.legends) && xLayout.legendSet.legends.length,
+					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.mapLegends) && xLayout.legendSet.mapLegends.length,
                     tdCount = 0,
 					htmlArray;
 
@@ -2204,7 +2204,7 @@
 
 				getTdHtml = function(config, metaDataId) {
 					var bgColor,
-						legends,
+						mapLegends,
 						colSpan,
 						rowSpan,
 						htmlValue,
@@ -2229,11 +2229,11 @@
 					// background color from legend set
 					if (isNumeric && xLayout.legendSet) {
 						var value = parseFloat(config.value);
-						legends = xLayout.legendSet.legends;
+						mapLegends = xLayout.legendSet.mapLegends;
 
-						for (var i = 0; i < legends.length; i++) {
-							if (Ext.Number.constrain(value, legends[i].startValue, legends[i].endValue) === value) {
-								bgColor = legends[i].color;
+						for (var i = 0; i < mapLegends.length; i++) {
+							if (Ext.Number.constrain(value, mapLegends[i].startValue, mapLegends[i].endValue) === value) {
+								bgColor = mapLegends[i].color;
 							}
 						}
 					}
@@ -3316,9 +3316,9 @@
 
         // legend sets
         requests.push({
-            url: init.contextPath + '/api/legendSets.json?fields=id,name,legends[id,name,startValue,endValue,color]&paging=false',
+            url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
             success: function(r) {
-                init.legendSets = Ext.decode(r.responseText).legendSets || [];
+                init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
                 fn();
             }
         });

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js	2015-02-25 15:08:02 +0000
@@ -876,7 +876,7 @@
                 var d = a.getLayer();
                 if (this.map.getLayer(d.id) != null) {
                     this._removing = true;
-                    this.removelayer(a);
+                    this.removeMapLayer(a);
                     delete this._removing
                 }
             }
@@ -892,11 +892,11 @@
                 }
             }
         },
-        removelayer: function(a) {
+        removeMapLayer: function(a) {
             this.map.removeLayer(a.getLayer())
         },
         onReplace: function(c, a, b) {
-            this.removelayer(a)
+            this.removeMapLayer(a)
         },
         getByLayer: function(b) {
             var a = this.findBy(function(c) {
@@ -2445,7 +2445,7 @@
         return window;
     };
 
-    GIS.core.loader = function(gis) {
+    GIS.core.MapLoader = function(gis) {
         var getMap,
             setMap,
             afterLoad,
@@ -3842,7 +3842,7 @@
                     config = {};
 
                 success = function(r) {
-                    legends = r.responseText ? Ext.decode(r.responseText).legends : r.legends;
+                    legends = r.responseText ? Ext.decode(r.responseText).mapLegends : r.mapLegends;
 
                     Ext.Array.sort(legends, function(a, b) {
                         return a.startValue - b.startValue;
@@ -3871,7 +3871,7 @@
                     console.log(r);
                 };
 
-                config.url = gis.init.contextPath + '/api/legendSets/' + view.legendSet.id + '.' + type + '?fields=' + gis.conf.url.legendSetFields.join(',');
+                config.url = gis.init.contextPath + '/api/mapLegendSets/' + view.legendSet.id + '.' + type + '?fields=' + gis.conf.url.mapLegendSetFields.join(',');
                 config.disableCaching = false;
                 config.scope = this;
                 config.success = success;
@@ -4321,7 +4321,7 @@
                 'mapViews[' + conf.url.analysisFields.join(',') + ']'
             ];
 
-            conf.url.legendFields = [
+            conf.url.mapLegendFields = [
                 '*',
                 '!created',
                 '!lastUpdated',
@@ -4331,8 +4331,8 @@
                 '!userGroupAccesses'
             ];
 
-            conf.url.legendSetFields = [
-                'id,name,legends[' + conf.url.legendFields.join(',') + ']'
+            conf.url.mapLegendSetFields = [
+                'id,name,mapLegends[' + conf.url.mapLegendFields.join(',') + ']'
             ];
         }());
 
@@ -7339,7 +7339,7 @@
                 msg: 'Loading'
             });
 
-            GIS.core.loader(gis).load();
+            GIS.core.MapLoader(gis).load();
         }();
     };
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/table.js	2015-02-25 15:08:02 +0000
@@ -1039,7 +1039,7 @@
 
 				if (layout.legendSet) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2088,7 +2088,7 @@
 					valueObjects = [],
 					totalColObjects = [],
 					uuidDimUuidsMap = {},
-					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.legends) && xLayout.legendSet.legends.length,
+					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.mapLegends) && xLayout.legendSet.mapLegends.length,
                     tdCount = 0,
                     htmlArray;
 
@@ -2101,7 +2101,7 @@
 
 				getTdHtml = function(config, metaDataId) {
 					var bgColor,
-						legends,
+						mapLegends,
 						colSpan,
 						rowSpan,
 						htmlValue,
@@ -2151,11 +2151,11 @@
 					// background color from legend set
 					if (isValue && xLayout.legendSet) {
 						var value = parseFloat(config.value);
-						legends = xLayout.legendSet.legends;
+						mapLegends = xLayout.legendSet.mapLegends;
 
-						for (var i = 0; i < legends.length; i++) {
-							if (Ext.Number.constrain(value, legends[i].startValue, legends[i].endValue) === value) {
-								bgColor = legends[i].color;
+						for (var i = 0; i < mapLegends.length; i++) {
+							if (Ext.Number.constrain(value, mapLegends[i].startValue, mapLegends[i].endValue) === value) {
+								bgColor = mapLegends[i].color;
 							}
 						}
 					}
@@ -3013,9 +3013,9 @@
 
         // legend sets
         requests.push({
-            url: init.contextPath + '/api/legendSets.json?fields=id,name,legends[id,name,startValue,endValue,color]&paging=false',
+            url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
             success: function(r) {
-                init.legendSets = Ext.decode(r.responseText).legendSets || [];
+                init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
                 fn();
             }
         });

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js	2015-02-25 15:08:02 +0000
@@ -1643,9 +1643,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2119,17 +2119,17 @@
 			};
 
             // legend set
-            service.legend = {};
+            service.mapLegend = {};
 
-            service.legend.getColorByValue = function(legendSet, value) {
+            service.mapLegend.getColorByValue = function(legendSet, value) {
                 var color;
 
                 if (!(legendSet && value)) {
                     return;
                 }
 
-                for (var i = 0, legend; i < legendSet.legends.length; i++) {
-                    legend = legendSet.legends[i];
+                for (var i = 0, legend; i < legendSet.mapLegends.length; i++) {
+                    legend = legendSet.mapLegends[i];
 
                     if (value >= parseFloat(legend.startValue) && value < parseFloat(legend.endValue)) {
                         return legend.color;
@@ -3667,7 +3667,7 @@
 
                     // series, legendset
                     if (legendSet) {
-                        valueColor = service.legend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
+                        valueColor = service.mapLegend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
                     }
 
                     series = {
@@ -4135,7 +4135,7 @@
                 // legend set
                 if (xLayout.type === 'gauge' && Ext.Array.contains(xLayout.axisObjectNames, ind) && xLayout.objectNameIdsMap[ind].length) {
                     Ext.Ajax.request({
-                        url: ns.core.init.contextPath + '/api/indicators/' + xLayout.objectNameIdsMap[ind][0] + '.json?fields=legendSet[legends[id,name,startValue,endValue,color]]',
+                        url: ns.core.init.contextPath + '/api/indicators/' + xLayout.objectNameIdsMap[ind][0] + '.json?fields=legendSet[mapLegends[id,name,startValue,endValue,color]]',
                         disableCaching: false,
                         success: function(r) {
                             legendSet = Ext.decode(r.responseText).legendSet;

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventchart.js	2015-02-25 15:08:02 +0000
@@ -1727,9 +1727,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -4107,7 +4107,7 @@
 
                     // series, legendset
                     if (legendSet) {
-                        valueColor = service.legend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
+                        valueColor = service.mapLegend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
                     }
 
                     series = {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventreport.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventreport.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/eventreport.js	2015-02-25 15:08:02 +0000
@@ -1153,9 +1153,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2191,7 +2191,7 @@
 					valueObjects = [],
 					totalColObjects = [],
 					uuidDimUuidsMap = {},
-					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.legends) && xLayout.legendSet.legends.length,
+					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.mapLegends) && xLayout.legendSet.mapLegends.length,
                     tdCount = 0,
 					htmlArray;
 
@@ -2204,7 +2204,7 @@
 
 				getTdHtml = function(config, metaDataId) {
 					var bgColor,
-						legends,
+						mapLegends,
 						colSpan,
 						rowSpan,
 						htmlValue,
@@ -2229,11 +2229,11 @@
 					// background color from legend set
 					if (isNumeric && xLayout.legendSet) {
 						var value = parseFloat(config.value);
-						legends = xLayout.legendSet.legends;
+						mapLegends = xLayout.legendSet.mapLegends;
 
-						for (var i = 0; i < legends.length; i++) {
-							if (Ext.Number.constrain(value, legends[i].startValue, legends[i].endValue) === value) {
-								bgColor = legends[i].color;
+						for (var i = 0; i < mapLegends.length; i++) {
+							if (Ext.Number.constrain(value, mapLegends[i].startValue, mapLegends[i].endValue) === value) {
+								bgColor = mapLegends[i].color;
 							}
 						}
 					}
@@ -3316,9 +3316,9 @@
 
         // legend sets
         requests.push({
-            url: init.contextPath + '/api/legendSets.json?fields=id,name,legends[id,name,startValue,endValue,color]&paging=false',
+            url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
             success: function(r) {
-                init.legendSets = Ext.decode(r.responseText).legendSets || [];
+                init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
                 fn();
             }
         });

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js	2015-02-25 15:08:02 +0000
@@ -876,7 +876,7 @@
                 var d = a.getLayer();
                 if (this.map.getLayer(d.id) != null) {
                     this._removing = true;
-                    this.removelayer(a);
+                    this.removeMapLayer(a);
                     delete this._removing
                 }
             }
@@ -892,11 +892,11 @@
                 }
             }
         },
-        removelayer: function(a) {
+        removeMapLayer: function(a) {
             this.map.removeLayer(a.getLayer())
         },
         onReplace: function(c, a, b) {
-            this.removelayer(a)
+            this.removeMapLayer(a)
         },
         getByLayer: function(b) {
             var a = this.findBy(function(c) {
@@ -2445,7 +2445,7 @@
         return window;
     };
 
-    GIS.core.loader = function(gis) {
+    GIS.core.MapLoader = function(gis) {
         var getMap,
             setMap,
             afterLoad,
@@ -3842,7 +3842,7 @@
                     config = {};
 
                 success = function(r) {
-                    legends = r.responseText ? Ext.decode(r.responseText).legends : r.legends;
+                    legends = r.responseText ? Ext.decode(r.responseText).mapLegends : r.mapLegends;
 
                     Ext.Array.sort(legends, function(a, b) {
                         return a.startValue - b.startValue;
@@ -3871,7 +3871,7 @@
                     console.log(r);
                 };
 
-                config.url = gis.init.contextPath + '/api/legendSets/' + view.legendSet.id + '.' + type + '?fields=' + gis.conf.url.legendSetFields.join(',');
+                config.url = gis.init.contextPath + '/api/mapLegendSets/' + view.legendSet.id + '.' + type + '?fields=' + gis.conf.url.mapLegendSetFields.join(',');
                 config.disableCaching = false;
                 config.scope = this;
                 config.success = success;
@@ -4321,7 +4321,7 @@
                 'mapViews[' + conf.url.analysisFields.join(',') + ']'
             ];
 
-            conf.url.legendFields = [
+            conf.url.mapLegendFields = [
                 '*',
                 '!created',
                 '!lastUpdated',
@@ -4331,8 +4331,8 @@
                 '!userGroupAccesses'
             ];
 
-            conf.url.legendSetFields = [
-                'id,name,legends[' + conf.url.legendFields.join(',') + ']'
+            conf.url.mapLegendSetFields = [
+                'id,name,mapLegends[' + conf.url.mapLegendFields.join(',') + ']'
             ];
         }());
 
@@ -7339,7 +7339,7 @@
                 msg: 'Loading'
             });
 
-            GIS.core.loader(gis).load();
+            GIS.core.MapLoader(gis).load();
         }();
     };
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/table.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/table.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/table.js	2015-02-25 15:08:02 +0000
@@ -1039,7 +1039,7 @@
 
 				if (layout.legendSet) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2088,7 +2088,7 @@
 					valueObjects = [],
 					totalColObjects = [],
 					uuidDimUuidsMap = {},
-					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.legends) && xLayout.legendSet.legends.length,
+					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.mapLegends) && xLayout.legendSet.mapLegends.length,
                     tdCount = 0,
                     htmlArray;
 
@@ -2101,7 +2101,7 @@
 
 				getTdHtml = function(config, metaDataId) {
 					var bgColor,
-						legends,
+						mapLegends,
 						colSpan,
 						rowSpan,
 						htmlValue,
@@ -2151,11 +2151,11 @@
 					// background color from legend set
 					if (isValue && xLayout.legendSet) {
 						var value = parseFloat(config.value);
-						legends = xLayout.legendSet.legends;
+						mapLegends = xLayout.legendSet.mapLegends;
 
-						for (var i = 0; i < legends.length; i++) {
-							if (Ext.Number.constrain(value, legends[i].startValue, legends[i].endValue) === value) {
-								bgColor = legends[i].color;
+						for (var i = 0; i < mapLegends.length; i++) {
+							if (Ext.Number.constrain(value, mapLegends[i].startValue, mapLegends[i].endValue) === value) {
+								bgColor = mapLegends[i].color;
 							}
 						}
 					}
@@ -3013,9 +3013,9 @@
 
         // legend sets
         requests.push({
-            url: init.contextPath + '/api/legendSets.json?fields=id,name,legends[id,name,startValue,endValue,color]&paging=false',
+            url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
             success: function(r) {
-                init.legendSets = Ext.decode(r.responseText).legendSets || [];
+                init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
                 fn();
             }
         });

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js	2015-02-25 15:08:02 +0000
@@ -1643,9 +1643,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2119,17 +2119,17 @@
 			};
 
             // legend set
-            service.legend = {};
+            service.mapLegend = {};
 
-            service.legend.getColorByValue = function(legendSet, value) {
+            service.mapLegend.getColorByValue = function(legendSet, value) {
                 var color;
 
                 if (!(legendSet && value)) {
                     return;
                 }
 
-                for (var i = 0, legend; i < legendSet.legends.length; i++) {
-                    legend = legendSet.legends[i];
+                for (var i = 0, legend; i < legendSet.mapLegends.length; i++) {
+                    legend = legendSet.mapLegends[i];
 
                     if (value >= parseFloat(legend.startValue) && value < parseFloat(legend.endValue)) {
                         return legend.color;
@@ -3660,7 +3660,7 @@
 
                     // series, legendset
                     if (legendSet) {
-                        valueColor = service.legend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
+                        valueColor = service.mapLegend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
                     }
 
                     series = {
@@ -4132,7 +4132,7 @@
                 // legend set
                 if (xLayout.type === 'gauge' && Ext.Array.contains(xLayout.axisObjectNames, ind) && xLayout.objectNameIdsMap[ind].length) {
                     Ext.Ajax.request({
-                        url: ns.core.init.contextPath + '/api/indicators/' + xLayout.objectNameIdsMap[ind][0] + '.json?fields=legendSet[legends[id,name,startValue,endValue,color]]',
+                        url: ns.core.init.contextPath + '/api/indicators/' + xLayout.objectNameIdsMap[ind][0] + '.json?fields=legendSet[mapLegends[id,name,startValue,endValue,color]]',
                         disableCaching: false,
                         success: function(r) {
                             legendSet = Ext.decode(r.responseText).legendSet;

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js	2015-02-25 15:08:02 +0000
@@ -1727,9 +1727,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -4100,7 +4100,7 @@
 
                     // series, legendset
                     if (legendSet) {
-                        valueColor = service.legend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
+                        valueColor = service.mapLegend.getColorByValue(legendSet, store.getRange()[0].data[failSafeColumnIds[0]]) || valueColor;
                     }
 
                     series = {

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js	2015-02-25 15:08:02 +0000
@@ -1153,9 +1153,9 @@
 				// legend set
 				xLayout.legendSet = layout.legendSet ? init.idLegendSetMap[layout.legendSet.id] : null;
 
-				if (layout.legendSet && layout.legendSet.legends) {
+				if (layout.legendSet && layout.legendSet.mapLegends) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2184,7 +2184,7 @@
 					valueObjects = [],
 					totalColObjects = [],
 					uuidDimUuidsMap = {},
-					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.legends) && xLayout.legendSet.legends.length,
+					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.mapLegends) && xLayout.legendSet.mapLegends.length,
                     tdCount = 0,
 					htmlArray;
 
@@ -2197,7 +2197,7 @@
 
 				getTdHtml = function(config, metaDataId) {
 					var bgColor,
-						legends,
+						mapLegends,
 						colSpan,
 						rowSpan,
 						htmlValue,
@@ -2222,11 +2222,11 @@
 					// background color from legend set
 					if (isNumeric && xLayout.legendSet) {
 						var value = parseFloat(config.value);
-						legends = xLayout.legendSet.legends;
+						mapLegends = xLayout.legendSet.mapLegends;
 
-						for (var i = 0; i < legends.length; i++) {
-							if (Ext.Number.constrain(value, legends[i].startValue, legends[i].endValue) === value) {
-								bgColor = legends[i].color;
+						for (var i = 0; i < mapLegends.length; i++) {
+							if (Ext.Number.constrain(value, mapLegends[i].startValue, mapLegends[i].endValue) === value) {
+								bgColor = mapLegends[i].color;
 							}
 						}
 					}
@@ -3309,9 +3309,9 @@
 
         // legend sets
         requests.push({
-            url: init.contextPath + '/api/legendSets.json?fields=id,name,legends[id,name,startValue,endValue,color]&paging=false',
+            url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
             success: function(r) {
-                init.legendSets = Ext.decode(r.responseText).legendSets || [];
+                init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
                 fn();
             }
         });

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js	2015-02-25 15:08:02 +0000
@@ -876,7 +876,7 @@
                 var d = a.getLayer();
                 if (this.map.getLayer(d.id) != null) {
                     this._removing = true;
-                    this.removelayer(a);
+                    this.removeMapLayer(a);
                     delete this._removing
                 }
             }
@@ -892,11 +892,11 @@
                 }
             }
         },
-        removelayer: function(a) {
+        removeMapLayer: function(a) {
             this.map.removeLayer(a.getLayer())
         },
         onReplace: function(c, a, b) {
-            this.removelayer(a)
+            this.removeMapLayer(a)
         },
         getByLayer: function(b) {
             var a = this.findBy(function(c) {
@@ -2445,7 +2445,7 @@
         return window;
     };
 
-    GIS.core.loader = function(gis) {
+    GIS.core.MapLoader = function(gis) {
         var getMap,
             setMap,
             afterLoad,
@@ -3852,7 +3852,7 @@
                     config = {};
 
                 success = function(r) {
-                    legends = r.responseText ? Ext.decode(r.responseText).legends : r.legends;
+                    legends = r.responseText ? Ext.decode(r.responseText).mapLegends : r.mapLegends;
 
                     Ext.Array.sort(legends, function(a, b) {
                         return a.startValue - b.startValue;
@@ -3881,7 +3881,7 @@
                     console.log(r);
                 };
 
-                config.url = gis.init.contextPath + '/api/legendSets/' + view.legendSet.id + '.' + type + '?fields=' + gis.conf.url.legendSetFields.join(',');
+                config.url = gis.init.contextPath + '/api/mapLegendSets/' + view.legendSet.id + '.' + type + '?fields=' + gis.conf.url.mapLegendSetFields.join(',');
                 config.disableCaching = false;
                 config.scope = this;
                 config.success = success;
@@ -4331,7 +4331,7 @@
                 'mapViews[' + conf.url.analysisFields.join(',') + ']'
             ];
 
-            conf.url.legendFields = [
+            conf.url.mapLegendFields = [
                 '*',
                 '!created',
                 '!lastUpdated',
@@ -4341,8 +4341,8 @@
                 '!userGroupAccesses'
             ];
 
-            conf.url.legendSetFields = [
-                'id,name,legends[' + conf.url.legendFields.join(',') + ']'
+            conf.url.mapLegendSetFields = [
+                'id,name,mapLegends[' + conf.url.mapLegendFields.join(',') + ']'
             ];
         }());
 
@@ -7368,7 +7368,7 @@
                 });
             }
 
-            GIS.core.loader(gis).load();
+            GIS.core.MapLoader(gis).load();
         }();
     };
 

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js	2015-02-25 14:58:54 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js	2015-02-25 15:08:02 +0000
@@ -1039,7 +1039,7 @@
 
 				if (layout.legendSet) {
 					xLayout.legendSet = init.idLegendSetMap[layout.legendSet.id];
-					support.prototype.array.sort(xLayout.legendSet.legends, 'ASC', 'startValue');
+					support.prototype.array.sort(xLayout.legendSet.mapLegends, 'ASC', 'startValue');
 				}
 
 				// unique dimension names
@@ -2081,7 +2081,7 @@
 					valueObjects = [],
 					totalColObjects = [],
 					uuidDimUuidsMap = {},
-					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.legends) && xLayout.legendSet.legends.length,
+					isLegendSet = Ext.isObject(xLayout.legendSet) && Ext.isArray(xLayout.legendSet.mapLegends) && xLayout.legendSet.mapLegends.length,
                     tdCount = 0,
                     htmlArray;
 
@@ -2094,7 +2094,7 @@
 
 				getTdHtml = function(config, metaDataId) {
 					var bgColor,
-						legends,
+						mapLegends,
 						colSpan,
 						rowSpan,
 						htmlValue,
@@ -2144,11 +2144,11 @@
 					// background color from legend set
 					if (isValue && xLayout.legendSet) {
 						var value = parseFloat(config.value);
-						legends = xLayout.legendSet.legends;
+						mapLegends = xLayout.legendSet.mapLegends;
 
-						for (var i = 0; i < legends.length; i++) {
-							if (Ext.Number.constrain(value, legends[i].startValue, legends[i].endValue) === value) {
-								bgColor = legends[i].color;
+						for (var i = 0; i < mapLegends.length; i++) {
+							if (Ext.Number.constrain(value, mapLegends[i].startValue, mapLegends[i].endValue) === value) {
+								bgColor = mapLegends[i].color;
 							}
 						}
 					}
@@ -3006,9 +3006,9 @@
 
         // legend sets
         requests.push({
-            url: init.contextPath + '/api/legendSets.json?fields=id,name,legends[id,name,startValue,endValue,color]&paging=false',
+            url: init.contextPath + '/api/mapLegendSets.json?fields=id,name,mapLegends[id,name,startValue,endValue,color]&paging=false',
             success: function(r) {
-                init.legendSets = Ext.decode(r.responseText).legendSets || [];
+                init.legendSets = Ext.decode(r.responseText).mapLegendSets || [];
                 fn();
             }
         });