dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20973
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9813: (PT) Improved pivot settings validation.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 9813 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-02-15 12:13:44 +0100
message:
(PT) Improved pivot settings validation.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-02-14 15:43:30 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-02-15 11:12:39 +0000
@@ -516,6 +516,10 @@
modal: true,
resizable: false,
getSetup: getSetup,
+ dimensionStore: dimensionStore,
+ rowStore: rowStore,
+ colStore: colStore,
+ filterStore: filterStore,
items: {
layout: 'column',
bodyStyle: 'border:0 none',
@@ -1986,16 +1990,22 @@
};
validateSpecialCases = function(settings) {
+
// indicator as filter
if (settings.filter && pt.store.indicatorSelected.data.length) {
for (var i = 0; i < settings.filter.length; i++) {
if (settings.filter[i].name === 'dx') {
- alert('Indicators not accepted as filter');
+ alert('Indicators cannot be specified as filter');
return;
}
}
}
+ if (settings.filter && pt.viewport.settingsWindow.filterStore.getById('coc')) {
+ alert('Categories cannot be specified as filter');
+ return;
+ }
+
return true;
};
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-02-14 15:43:30 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-02-15 11:12:39 +0000
@@ -1248,12 +1248,12 @@
}
if (!Ext.Array.contains(names, 'dx')) {
- alert('No indicators, data elements or data sets selected');
+ alert('At least one indicator, data element or dataset must be specified as column, row or filter');
return;
}
if (!Ext.Array.contains(names, 'pe')) {
- alert('No periods selected');
+ alert('At least one period must be specified as column, row or filter');
return;
}