dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32301
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16482: EV gui behaviour fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16482 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-08-22 15:47:50 +0200
message:
EV gui behaviour fix.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/app/scripts/app.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-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/app/scripts/app.js 2014-08-19 09:20:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/app/scripts/app.js 2014-08-22 13:47:10 +0000
@@ -3021,7 +3021,7 @@
stage.clearValue();
dataElementsByStageStore.removeAll();
- dataElementSelected.removeAll();
+ dataElementSelected.removeAllDataElements(true);
load = function(stages) {
stage.enable();
@@ -3030,9 +3030,6 @@
stagesByProgramStore.removeAll();
stagesByProgramStore.loadData(stages);
- ns.app.aggregateLayoutWindow.resetData();
- //ns.app.queryLayoutWindow.resetData();
-
stageId = (layout ? layout.programStage.id : null) || (stages.length === 1 ? stages[0].id : null);
if (stageId) {
@@ -3108,8 +3105,7 @@
onStageSelect = function(stageId, layout) {
if (!layout) {
- dataElementSelected.removeAll();
- ns.app.aggregateLayoutWindow.resetData();
+ dataElementSelected.removeAllDataElements(true);
}
loadDataElements(stageId, layout);
@@ -3265,12 +3261,12 @@
return hasDataElement;
},
- removeAllDataElements: function() {
+ removeAllDataElements: function(reset) {
var items = this.items.items,
len = items.length;
for (var i = 0; i < len; i++) {
- items[0].removeDataElement();
+ items[0].removeDataElement(reset);
}
}
});
@@ -3308,12 +3304,14 @@
dataElement: element
}));
- ux.removeDataElement = function() {
+ ux.removeDataElement = function(reset) {
dataElementSelected.remove(ux);
if (!dataElementSelected.hasDataElement(element.id)) {
- dataElementsByStageStore.add(element);
- dataElementsByStageStore.sort();
+ if (!reset) {
+ dataElementsByStageStore.add(element);
+ dataElementsByStageStore.sort();
+ }
ns.app.aggregateLayoutWindow.removeDimension(element.id);
}