dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38838
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19734: GIS improved validation.
------------------------------------------------------------
revno: 19734
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-08-06 17:33:17 +0200
message:
GIS improved validation.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.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-mapping/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2015-08-06 13:27:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2015-08-06 15:33:17 +0000
@@ -3571,6 +3571,11 @@
console.log('Organisation unit dimension is invalid', config.rows);
return;
}
+
+ if (!config.filters) {
+ console.log('Please select a valid period', config.filters);
+ return;
+ }
if (Ext.Array.contains([gis.layer.thematic1.id, gis.layer.thematic2.id, gis.layer.thematic3.id, gis.layer.thematic4.id], config.layer)) {
if (!config.columns) {
@@ -3594,9 +3599,11 @@
for (var j = 0; j < dim.items.length; j++) {
if (dim.items[j].id === 'USER_ORGUNIT') {
isOu = true;
- } else if (dim.items[j].id === 'USER_ORGUNIT_CHILDREN') {
+ }
+ else if (dim.items[j].id === 'USER_ORGUNIT_CHILDREN') {
isOuc = true;
- } else if (dim.items[j].id === 'USER_ORGUNIT_GRANDCHILDREN') {
+ }
+ else if (dim.items[j].id === 'USER_ORGUNIT_GRANDCHILDREN') {
isOugc = true;
}
}
=== 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-08-06 13:27:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js 2015-08-06 15:33:17 +0000
@@ -7337,7 +7337,7 @@
};
initialize = function() {
- var el = Ext.get(config.el);
+ var el = Ext.get(config.el);
if (!validateConfig()) {
return;