=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js 2015-07-13 07:37:11 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/app.js 2015-08-25 14:54:19 +0000 @@ -17,7 +17,6 @@ 'd2Services', 'd2Controllers', 'ui.select', - 'infinite-scroll', 'angularLocalStorage', 'pascalprecht.translate', 'd2HeaderBar']) === 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-07-17 07:28:57 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-08-25 14:54:19 +0000 @@ -11,6 +11,7 @@ $scope, $modal, $timeout, + $translate, $anchorScroll, orderByFilter, SessionStorageService, @@ -73,6 +74,15 @@ $scope.$watch('selectedOrgUnit', function() { if(angular.isObject($scope.selectedOrgUnit)){ + + $scope.pleaseSelectLabel = $translate.instant('please_select'); + $scope.registeringUnitLabel = $translate.instant('registering_unit'); + $scope.eventCaptureLabel = $translate.instant('event_capture'); + $scope.programLabel = $translate.instant('program'); + $scope.searchLabel = $translate.instant('search'); + $scope.yesLabel = $translate.instant('yes'); + $scope.noLabel = $translate.instant('no'); + SessionStorageService.set('SELECTED_OU', $scope.selectedOrgUnit); $scope.userAuthority = AuthorityService.getUserAuthorities(SessionStorageService.get('USER_ROLES')); @@ -258,7 +268,8 @@ //converting int string value to number for proper sorting. if($scope.prStDes[dataValue.dataElement].dataElement.type === 'int'){ if( dhis2.validation.isNumber(val) ){ - val = new Number(val); + //val = new Number(val); + val = parseFloat(val, 10); } } if($scope.prStDes[dataValue.dataElement].dataElement.optionSetValue){ @@ -272,6 +283,11 @@ if($scope.prStDes[dataValue.dataElement].dataElement.type === 'date'){ val = DateUtils.formatFromApiToUser(val); } + + if($scope.prStDes[dataValue.dataElement].dataElement.type === 'bool'){ + val = val === 'true' ? $scope.yesLabel : $scope.noLabel; + } + if( $scope.prStDes[dataValue.dataElement].dataElement.type === 'trueOnly'){ if(val === 'true'){ val = true; @@ -301,8 +317,7 @@ if(!$scope.sortHeader.id){ $scope.sortEventGrid({name: $scope.selectedProgramStage.reportDateDescription ? $scope.selectedProgramStage.reportDateDescription : 'incident_date', id: 'event_date', type: 'date', compulsory: false, showFilter: false, show: true}); } - } - + } $scope.eventFetched = true; }); @@ -421,7 +436,8 @@ } }; - $scope.showEventList = function(){ + $scope.showEventList = function(dhis2Event){ + ContextMenuSelectedItem.setSelectedItem(dhis2Event); $scope.eventRegistration = false; $scope.editingEventInFull = false; $scope.editingEventInGrid = false; @@ -682,7 +698,6 @@ }; $scope.updateEventDataValue = function(currentEvent, dataElement){ - $scope.updateSuccess = false; //get current element === 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-08-07 16:01:27 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2015-08-25 14:54:19 +0000 @@ -123,6 +123,10 @@ if( program.userRoles.hasOwnProperty( userRoles[i].id ) ){ hasRole = true; } + + if(!hasRole && userRoles[i].authorities && userRoles[i].authorities.indexOf('ALL') !== -1){ + hasRole = true; + } } return hasRole; }; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2015-08-24 10:27:24 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2015-08-25 14:54:19 +0000 @@ -151,7 +151,7 @@ input-field-id={{eventGridColumn.id}} ng-change="saveDatavalue()" class="form-control"> - + @@ -370,7 +370,7 @@ input-field-id={{de.dataElement.id}} ng-change="saveDatavalue()" class="form-control"> - + === 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-08-07 16:54:38 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html 2015-08-25 14:54:19 +0000 @@ -38,10 +38,7 @@ - - - - +
- + @@ -55,10 +52,10 @@ - + - + @@ -94,19 +91,17 @@
+
- +
+ ng-click="showEventList(dhis2Event)" + ng-show="currentEvent.event !== dhis2Event.event && eventGridColumn.id !== 'comment'"> - {{'no'| translate}} - {{'yes'| translate}} + {{noLabel}} + {{yesLabel}} @@ -116,14 +111,14 @@   - +
+ ng-if="(currentEvent.event == dhis2Event.event) && eventGridColumn.id !== 'comment'">
+ class="form-control"/>
@@ -219,9 +216,9 @@ style="width:98%;" ng-class="{true: 'update-success'} [currentElement.updated == true && currentElement.id == eventGridColumn.id]" ng-class="{true: 'update-error'} [!currentElement.updated == true && currentElement.id == eventGridColumn.id]"> - - - + + +
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html 2015-06-22 08:45:36 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html 2015-08-25 14:54:19 +0000 @@ -22,17 +22,17 @@

- {{'event_capture'| translate}} + {{eventCaptureLabel}}

- - + + - +
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/selections.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/selections.html 2014-06-13 06:12:21 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/selections.html 2015-08-25 14:54:19 +0000 @@ -1,7 +1,7 @@ - + @@ -13,7 +13,7 @@ ng-options="program as program.name for program in programs | orderBy: 'name'" ng-change="loadEvents()" ng-disabled="eventRegistration || editingEventInFull || editingEventInGrid"> - +
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2015-06-02 12:23:22 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2015-08-25 14:54:19 +0000 @@ -506,10 +506,7 @@ link: function (scope, element, attrs) { var contextMenu = $("#contextMenu"); - element.click(function (e) { - var selectedItem = $.parseJSON(attrs.selectedItem); - ContextMenuSelectedItem.setSelectedItem(selectedItem); - + element.click(function (e) { var menuHeight = contextMenu.height(); var menuWidth = contextMenu.width(); var winHeight = $(window).height();