← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 602: (GIS) Div fixes.

 

------------------------------------------------------------
revno: 602
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Sun 2009-09-06 15:22:58 +0700
message:
  (GIS) Div fixes.
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/loader.gif
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/index.html
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/script/index.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Mapping.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.
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/loader.gif'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/loader.gif	1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/loader.gif	2009-09-06 08:22:58 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/index.html'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/index.html	2009-09-05 17:23:50 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/index.html	2009-09-06 08:22:58 +0000
@@ -47,9 +47,10 @@
         <script type="text/javascript" src="script/index.js"></script>
     
     <style>
-        .row-assigned {background-color: #72FF63;}
-        .row-not-assigned {background-color: #FFFFFF;}
-        .icon-exit {background-image: url(../images/exit.png);}
+        .row-assigned {background-color:#72FF63;}
+        .row-not-assigned {background-color:#FFFFFF;}
+        .icon-exit {background-image:url(../images/exit.png);}
+		.x-mask-loading2 div {padding:2px 11px 3px 32px; background:#fbfbfb url('../images/loader.gif') no-repeat 5px 2px; line-height:20px; font-weight:normal}
     </style>
 </head>
 
@@ -58,8 +59,8 @@
         <div class="loading-mask"></div>
         <div class="loading-container">
             <div class="loading-indicator" style="font-family:tahoma; font-size:11px">
-                <img src="../resources/ext/resources/images/default/shared/large-loading.gif" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;"/>
-                DHIS2 Geostat<br />
+                <img src="../images/loader.gif" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;"/>
+                DHIS 2 GIS<br />
                 <span id="loading-msg">Loading MapFish...</span>
             </div>
         </div>

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/script/index.js	2009-09-05 17:03:36 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/mapping/script/index.js	2009-09-06 08:22:58 +0000
@@ -159,8 +159,6 @@
 		]
 	});
 	this.myMap = map;
-
-    MASK = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait..."});
     
     MAPDATA = null;
     URL = null;
@@ -185,7 +183,9 @@
             alert( 'Status', 'Error while saving data' );
         }
     });
-    
+	
+	MASK = new Ext.LoadMask(Ext.getBody(), {msg: 'Loading...', msgCls: 'x-mask-loading2'});
+	
     function getUrlParam(strParamName) {
         var output = "";
         var strHref = window.location.href;
@@ -293,6 +293,7 @@
                 });
                 
                 treeLayer.events.register('loadstart', null, function() {
+					MASK.msg = 'Loading...';
                     MASK.show();
                 });
                 
@@ -1834,11 +1835,8 @@
         map: map,
         layer: choroplethLayer,
 		title: '<font style="font-family:tahoma; font-weight:normal; font-size:11px; color:' + MENU_TITLECOLOR_LIGHT + ';">Thematic map </font>',
-        //nameAttribute: 'NAME',
-        //indicators: [['value', 'Indicator']],
         url: INIT_URL,
         featureSelection: false,
-        loadMask: {msg: 'Loading shapefile...', msgCls: 'x-mask-loading'},
         legendDiv: 'choroplethLegend',
         defaults: {width: 130},
         listeners: {
@@ -1857,12 +1855,9 @@
         id: 'mapping',
         map: map,
         layer: choroplethLayer,
-        title: '<font style="font-family:tahoma; font-weight:normal; font-size:11px; color:' + MENU_TITLECOLOR_LIGHT + ';">Link organisation units to map</font>',
-        //nameAttribute: 'NAME',
-        //indicators: [['value', 'Indicator']],
+        title: '<font style="font-family:tahoma; font-weight:normal; font-size:11px; color:' + MENU_TITLECOLOR_LIGHT + ';">Assign organisation units to map</font>',
         url: INIT_URL,
         featureSelection: false,
-        loadMask: {msg: 'Loading shapefile...', msgCls: 'x-mask-loading'},
         legendDiv: 'choroplethLegend',
         defaults: {width: 130},
         listeners: {
@@ -2178,6 +2173,9 @@
         params: { mapLayerPath: URL, format: 'json' },
 
         success: function( responseObject ) {
+			MASK.msg = 'Applying colors...';
+			MASK.show();
+		
             MAPDATA = Ext.util.JSON.decode(responseObject.responseText).map[0];
             
             if (MAPSOURCE == 'database') {
@@ -2465,6 +2463,9 @@
 /*AUTO MAPPING*/
 
 function getAutoAssignOrganisationUnitData() {
+	MASK.msg = 'Loading data...';
+	MASK.show();
+
     var level = MAPDATA.organisationUnitLevel;
 
     Ext.Ajax.request({
@@ -2509,6 +2510,9 @@
             }
         }
     }
+	
+	MASK.msg = 'Linking ' + count_match + ' organisation units...';
+	MASK.show();
     
     Ext.Ajax.request({
         url: path + 'addOrUpdateMapOrganisationUnitRelations' + type,
@@ -2516,6 +2520,9 @@
         params: { mapLayerPath: mlp, relations: relations },
 
         success: function( responseObject ) {
+			MASK.msg = 'Applying organisation units relations...';
+			MASK.show();
+			
             Ext.messageBlack.msg('Assign organisation units', '' + msg_highlight_start + count_match + msg_highlight_end + ' organisation units assigned.<br><br>Database: ' + msg_highlight_start + count_orgunits/count_features + msg_highlight_end + '<br>Shapefile: ' + msg_highlight_start + count_features + msg_highlight_end);
             
             Ext.getCmp('grid_gp').getStore().reload();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Choropleth.js	2009-09-05 17:21:27 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Choropleth.js	2009-09-06 08:22:58 +0000
@@ -745,6 +745,7 @@
                 return;
         }
 
+		MASK.msg = 'Loading thematic map...';
         MASK.show();
 
         loadMapData('choropleth');

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Mapping.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Mapping.js	2009-09-05 10:12:07 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/resources/mapfish/widgets/geostat/Mapping.js	2009-09-06 08:22:58 +0000
@@ -411,6 +411,7 @@
                 return;
         }
         
+		MASK.msg = 'Loading map...';
         MASK.show();
         
         loadMapData('assignment');