------------------------------------------------------------ revno: 19441 committer: Abyot Asalefew Gizaw <aby...@gmail.com> branch nick: dhis2 timestamp: Thu 2015-06-18 09:38:15 +0200 message: minor modified: 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-event-capture/scripts/controllers.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-06-17 22:58:05 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-06-18 07:38:15 +0000 @@ -440,7 +440,14 @@ $scope.eventUID = dhis2.util.uid(); $scope.currentEvent['uid'] = $scope.eventUID; } - $scope.currentEventOriginialValue = angular.copy($scope.currentEvent); + $scope.currentEventOriginialValue = angular.copy($scope.currentEvent); + + if($scope.eventRegistration){ + //Blank out rule effects, as there is no rules in effect before the first + //time the rules is run on a new page. + $rootScope.ruleeffects[$scope.currentEvent.event] = {}; + $scope.executeRules(); + } }; $scope.showEditEventInGrid = function(){ @@ -466,11 +473,12 @@ }); $scope.currentEventOriginialValue = angular.copy($scope.currentEvent); - //Blank out rule effects, as there is no rules in effect before the first - //time the rules is run on a new page. - $rootScope.ruleeffects[$scope.currentEvent.event] = {}; - - $scope.executeRules(); + if($scope.editingEventInFull){ + //Blank out rule effects, as there is no rules in effect before the first + //time the rules is run on a new page. + $rootScope.ruleeffects[$scope.currentEvent.event] = {}; + $scope.executeRules(); + } }; $scope.switchDataEntryForm = function(){
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp