=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html 2016-01-13 17:09:07 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html 2016-01-15 13:38:46 +0000
@@ -46,24 +46,24 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
@@ -72,12 +72,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -110,9 +110,9 @@
-
-
-
+
+
+
=== 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 2016-01-13 16:58:28 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2016-01-15 13:38:46 +0000
@@ -381,50 +381,61 @@
}
};
})
+
.directive('d2Audit', function () {
- return {
- restrict: 'E',
- template: '',
- scope:{
- dataElementId: '@dataelementId',
- dataElementName: '@dataelementName',
- currentEvent:'@',
- type:'@',
- selectedTeiId:'@'
- },
- controller:function($scope, $modal) {
- if (!$scope.dataElementId) {
- return;
- }
-
- $scope.showAuditHistory = function() {
-
- $modal.open({
- templateUrl: "../dhis-web-commons/angular-forms/audit-history.html",
- controller: "AuditHistoryController",
- resolve: {
- dataElementId: function () {
- return $scope.dataElementId;
- },
- dataElementName: function () {
- return $scope.dataElementName;
- },
- dataType: function() {
- return $scope.type;
- },
- currentEvent: function() {
- return $scope.currentEvent;
- },
- selectedTeiId: function() {
- return $scope.selectedTeiId;
+ return {
+ restrict: 'E',
+ template: '',
+ scope:{
+ dataElementId: '@dataelementId',
+ dataElementName: '@dataelementName',
+ currentEvent:'@',
+ type:'@',
+ selectedTeiId:'@'
+ },
+ controller:function($scope, $modal) {
+ if (!$scope.dataElementId) {
+ return;
+ }
+
+ $scope.showAuditIcon = function() {
+ if ($scope.currentEvent && $scope.currentEvent !== 'SINGLE_EVENT') {
+ return true;
+ }
+ return false;
+ }
+
+ $scope.showAuditHistory = function() {
+
+ $modal.open({
+ templateUrl: "../dhis-web-commons/angular-forms/audit-history.html",
+ controller: "AuditHistoryController",
+ resolve: {
+ dataElementId: function () {
+ return $scope.dataElementId;
+ },
+ dataElementName: function () {
+ return $scope.dataElementName;
+ },
+ dataType: function() {
+ return $scope.type;
+ },
+ currentEvent: function() {
+ if($scope.currentEvent === "SINGLE_EVENT") {
+ alert("Single Event !!!");
+ }
+ return $scope.currentEvent;
+ },
+ selectedTeiId: function() {
+ return $scope.selectedTeiId;
+ }
}
- }
- })
+ })
+
+ }
}
-
- }
- };
-});
+ };
+ });