=== 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-22 11:55:28 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-09-22 16:33:27 +0000 @@ -442,6 +442,7 @@ $scope.editingEventInGrid = false; $scope.currentElement.updated = false; $scope.currentEvent = {}; + $scope.currentElement = {}; $scope.currentEventOriginialValue = angular.copy($scope.currentEvent); }; @@ -973,15 +974,25 @@ $scope.saveDatavalue = function(){ $scope.executeRules(); }; - /*$scope.getInputNotifcationClass = function(id, custom, event){ - var style = ""; - if($scope.currentElement.id && $scope.currentElement.id === id){ - style = $scope.currentElement.updated ? 'update-success' : 'update-error'; + + $scope.getInputNotifcationClass = function(id, custom){ + if($scope.currentElement.id && $scope.currentElement.id === id){ + if($scope.currentElement.updated){ + if(custom){ + return 'input-success'; + } + return 'form-control input-success'; + } + else{ + if(custom){ + return 'input-error'; + } + return 'form-control input-error'; + } + } + if(custom){ + return ''; } - return style + ' form-control'; - };*/ - - $scope.getInputNotifcationClass = function(id, custom){ - return '; '; + return 'form-control'; }; }); \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-09-14 14:10:12 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-09-22 16:33:27 +0000 @@ -382,7 +382,6 @@ var pushDirectAddressedVariable = function(variableWithCurls) { var variableName = $filter('trimvariablequalifiers')(variableWithCurls); -; var variableNameParts = variableName.split('.'); var newVariableObject; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2015-09-21 15:01:55 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css 2015-09-22 16:33:27 +0000 @@ -53,11 +53,11 @@ } .input-error { - background-color: #fffe8c; + background-color: #ff8a8a !important; } -.update-success { - background-color: #b9ffb9; +.input-success { + background-color: #b9ffb9 !important; } .red { === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html 2015-09-18 09:14:54 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html 2015-09-22 16:33:27 +0000 @@ -166,13 +166,15 @@ d2-option-validator on-select="updateEventDataValue(dhis2Event,eventGridColumn.id)" on-remove="validateOptionOnRemove(eventGridColumn.compulsory)" - input-field-id={{eventGridColumn.id}} - style="width:100%;" - class={{getInputNotifcationClass(eventGridColumn.id,false)}}> - {{$select.selected.name || $select.selected}} - + input-field-id={{eventGridColumn.id}} + style="width:100%;"> + + {{$select.selected.name || $select.selected}} + + @@ -185,6 +187,7 @@ ng-required={{eventGridColumn.compulsory}} ng-model="currentEvent[eventGridColumn.id]" ng-change="updateEventDataValue(dhis2Event, eventGridColumn.id)" + ng-class="getInputNotifcationClass(eventGridColumn.id,false)" value=""> {{'no_value' | translate}}
@@ -210,9 +212,7 @@ ng-required={{eventGridColumn.compulsory}} input-field-id={{eventGridColumn.id}} name="foo" - class="form-control" - ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]" - ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"/> + ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
+ ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
+ ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
+ ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
+ ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>
@@ -284,7 +274,7 @@ ng-required={{eventGridColumn.compulsory}} ng-blur="updateEventDataValue(dhis2Event, eventGridColumn.id)" name="foo" - class="form-control"/> + ng-class="getInputNotifcationClass(eventGridColumn.id,false)"/>