dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40107
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20305: event-capture: apply program action only when ineffect
------------------------------------------------------------
revno: 20305
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-23 10:17:21 +0200
message:
event-capture: apply program action only when ineffect
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/services.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.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-cache-cleaner/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/services.js 2014-12-15 14:00:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-cache-cleaner/scripts/services.js 2015-09-23 08:17:21 +0000
@@ -1,3 +1,5 @@
+/* global angular */
+
'use strict';
/* Services */
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-09-23 08:06:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-09-23 08:17:21 +0000
@@ -922,12 +922,12 @@
$log.warn("ProgramRuleAction " + effect.id + " is of type HIDEFIELD, bot does not have a dataelement defined");
}
}
- if(effect.action === "HIDESECTION") {
+ if(effect.action === "HIDESECTION" && effect.ineffect) {
if(effect.programStageSection){
$scope.hiddenSections[effect.programStageSection] = effect.programStageSection;
}
}
- if(effect.action === "SHOWERROR" && effect.dataElement.id){
+ if(effect.action === "SHOWERROR" && effect.ineffect && effect.dataElement.id){
var dialogOptions = {
headerText: 'validation_error',
bodyText: effect.content
@@ -936,7 +936,7 @@
$scope.currentEvent[effect.dataElement.id] = $scope.currentEventOriginialValue[effect.dataElement.id];
}
- if(effect.action === "SHOWWARNING"){
+ if(effect.action === "SHOWWARNING" && effect.ineffect){
$scope.warningMessages.push(effect.content);
}
}