=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/index.html' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/index.html 2012-11-04 18:50:13 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/index.html 2012-11-05 09:02:05 +0000 @@ -10,9 +10,7 @@ - -
- +
@@ -29,12 +27,9 @@ var GIS = {}; window.google = null; document.body.oncontextmenu = function(){return false;}; - document.getElementById('slow').innerHTML = "SLOW CONNECTION?"; - === 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-04 17:28:17 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2012-11-05 09:24:07 +0000 @@ -1738,7 +1738,7 @@ ], listeners: { show: function() { - this.setPosition(this.getPosition()[0], 100); + this.setPosition(mapWindow.x + 14, mapWindow.y + 67); } } }); @@ -2024,6 +2024,7 @@ { xtype: 'panel', layout: 'hbox', + width: 422, cls: 'gis-container-inner', items: [ addButton, @@ -2069,7 +2070,7 @@ }; setMap = function(map) { - var views = map.mapViews, + var views = Ext.isDefined(map.mapViews) ? map.mapViews : [], view, center, lonLat; === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Boundary.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Boundary.js 2012-11-04 18:50:13 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Boundary.js 2012-11-05 09:24:07 +0000 @@ -452,6 +452,7 @@ getView: function() { var level = this.cmp.level, parent = this.cmp.parent.getSelectionModel().getSelection(), + store = GIS.store.organisationUnitLevels, view; parent = parent.length ? parent : [{raw: GIS.init.rootNodes[0]}]; @@ -460,7 +461,7 @@ organisationUnitLevel: { id: level.getValue(), name: level.getRawValue(), - level: GIS.store.organisationUnitLevels.getById(level.getValue()).data.level + level: store.data.items.length && level.getValue() ? store.getById(level.getValue()).data.level : null }, parentOrganisationUnit: { id: parent[0].raw.id, === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Facility.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Facility.js 2012-11-04 18:50:13 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Facility.js 2012-11-05 09:24:07 +0000 @@ -717,6 +717,7 @@ getView: function() { var level = this.cmp.level, parent = this.cmp.parent.getSelectionModel().getSelection(), + store = GIS.store.organisationUnitLevels, view; parent = parent.length ? parent : [{raw: GIS.init.rootNodes[0]}]; @@ -729,7 +730,7 @@ organisationUnitLevel: { id: level.getValue(), name: level.getRawValue(), - level: GIS.store.organisationUnitLevels.getById(level.getValue()).data.level + level: store.data.items.length && level.getValue() ? store.getById(level.getValue()).data.level : null }, parentOrganisationUnit: { id: parent[0].raw.id, === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Thematic1.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Thematic1.js 2012-11-04 18:50:13 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Thematic1.js 2012-11-05 09:24:07 +0000 @@ -1387,6 +1387,7 @@ getView: function() { var level = this.cmp.level, parent = this.cmp.parent.getSelectionModel().getSelection(), + store = GIS.store.organisationUnitLevels, view; parent = parent.length ? parent : [{raw: GIS.init.rootNodes[0]}]; @@ -1427,7 +1428,7 @@ organisationUnitLevel: { id: level.getValue(), name: level.getRawValue(), - level: GIS.store.organisationUnitLevels.getById(level.getValue()).data.level + level: store.data.items.length && level.getValue() ? store.getById(level.getValue()).data.level : null }, parentOrganisationUnit: { id: parent[0].raw.id, === modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Thematic2.js' --- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Thematic2.js 2012-11-04 18:50:13 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/mapfish/widgets/geostat/Thematic2.js 2012-11-05 09:24:07 +0000 @@ -201,39 +201,6 @@ }) }, - setUrl: function(url) { - this.url = url; - this.coreComp.setUrl(this.url); - }, - - requestSuccess: function(request) { - var doc = request.responseXML, - format = new OpenLayers.Format.GeoJSON(); - - if (!doc || !doc.documentElement) { - doc = request.responseText; - } - - if (doc.length) { - doc = GIS.util.geojson.decode(doc, this); - } - else { - alert('No valid coordinates found'); //todo //i18n - } - - this.layer.removeFeatures(this.layer.features); - this.layer.addFeatures(format.read(doc)); - this.layer.features = GIS.util.vector.getTransformedFeatureArray(this.layer.features); - this.features = this.layer.features.slice(0); - - this.loadData(); - }, - - requestFailure: function(request) { - GIS.logg.push(request.status, request.statusText); - console.log(request.status, request.statusText); - }, - getColors: function(low, high) { var startColor = new mapfish.ColorRgb(); startColor.setFromHex(low || this.cmp.colorLow.getValue()); @@ -1420,6 +1387,7 @@ getView: function() { var level = this.cmp.level, parent = this.cmp.parent.getSelectionModel().getSelection(), + store = GIS.store.organisationUnitLevels, view; parent = parent.length ? parent : [{raw: GIS.init.rootNodes[0]}]; @@ -1460,7 +1428,7 @@ organisationUnitLevel: { id: level.getValue(), name: level.getRawValue(), - level: GIS.store.organisationUnitLevels.getById(level.getValue()).data.level + level: store.data.items.length && level.getValue() ? store.getById(level.getValue()).data.level : null }, parentOrganisationUnit: { id: parent[0].raw.id, @@ -1652,6 +1620,11 @@ if (!features.length) { alert('No valid coordinates found'); //todo //i18n + GIS.mask.hide(); + + this.config = { + extended: {} + }; return; } @@ -1810,7 +1783,7 @@ this.store.features.loadFeatures(this.layer.features); // Update filter window - if (this.cmp.filterWindow && this.cmp.filterWindow.isVisible()) { + if (this.cmp.filterWindow && this.cmp.filterWindow.isVisible()) { this.cmp.filterWindow.filter(); }