dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33164
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16904: legend for event status
------------------------------------------------------------
revno: 16904
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 13:13:12 +0200
message:
legend for event status
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css
--
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-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2014-09-18 14:53:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2014-10-01 11:13:12 +0000
@@ -32,7 +32,17 @@
//note
$scope.note = '';
-
+
+ //event color legend
+ $scope.eventColors = [
+ {color: 'alert-success', description: 'completed'},
+ {color: 'alert-info', description: 'executed'},
+ {color: 'alert-warning', description: 'ontime'},
+ {color: 'alert-danger', description: 'overdue'},
+ {color: 'alert-default', description: 'skipped'}
+ ];
+ $scope.showEventColors = false;
+
//listen for the selected items
$scope.$on('dashboardWidgets', function(event, args) {
$scope.showDataEntryDiv = false;
@@ -641,4 +651,8 @@
});
});
};
+
+ $scope.toggleLegend = function(){
+ $scope.showEventColors = !$scope.showEventColors;
+ };
});
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-10-01 09:56:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-10-01 11:13:12 +0000
@@ -6,15 +6,26 @@
</span>
<span class="pull-right">
+ <a href ng-click="toggleLegend()" title="{{'event_color_legend'| translate}}"><i class="fa fa-info-circle vertical-center"></i></a>
<a class="small-horizonal-spacing" href ng-click="expandCollapse(dataentryWidget)">
- <span ng-show="dataentryWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!dataentryWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="dataentryWidget.expand"><i class="fa fa-chevron-up vertical-center" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!dataentryWidget.expand"><i class="fa fa-chevron-down vertical-center" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(dataentryWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(dataentryWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle vertical-center"></i></a>
</span>
</div>
<div ng-show="dataentryWidget.expand" class="panel-body dashboard-widget-container">
+ <div ng-if="showEventColors">
+ <table class="table table-bordered" style="width: 100%;">
+ <tr>
+ <td ng-class="eventColor.color" ng-repeat="eventColor in eventColors">
+ {{eventColor.description | translate}}
+ </td>
+ </tr>
+ </table>
+ </div>
+
<div ng-if="dhis2Events && !showEventCreationDiv">
<table class="table-borderless">
<tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-10-01 09:56:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-10-01 11:13:12 +0000
@@ -129,6 +129,12 @@
"overdue_events": "Overdue Events",
"overdue_events_description": "Generate a report of overdue events for a selected program and organisation unit. The report displays list of tracked entity instances and their events that are not conducted on scheduled due dates.",
"upcoming_event": "Upcoming event",
+ "event_color_legend": "What do the colors mean?",
+ "completed": "COMPLETED",
+ "executed": "EXECUTED",
+ "ontime": "ONTIME",
+ "overdue": "OVERDUE",
+ "skipped": "SKIPPED",
"report": "Report",
"_report": "report",
"visit_schedule": "Visit Schedule",
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-09-18 14:53:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-10-01 11:13:12 +0000
@@ -1221,7 +1221,7 @@
name: programStage.name,
reportDateDescription: programStage.reportDateDescription,
status: 'SCHEDULED'};
- dummyEvent.statusColor = 'alert alert-info';//'stage-on-time';
+ dummyEvent.statusColor = 'alert alert-warning';//'stage-on-time';
if(moment(today).isAfter(dummyEvent.dueDate)){
dummyEvent.statusColor = 'alert alert-danger';//'stage-overdue';
}
@@ -1239,13 +1239,18 @@
return 'alert alert-success';//'stage-completed';
}
else if(dhis2Event.status === 'SKIPPED'){
- return 'alert alert-warning'; //'stage-skipped';
+ return 'alert alert-default'; //'stage-skipped';
}
else{
- if(moment(eventDate).isAfter(dhis2Event.dueDate)){
- return 'alert alert-danger';//'stage-overdue';
- }
- return 'alert alert-info';//'stage-on-time';
+ if(dhis2Event.eventDate){
+ return 'alert alert-info'; //'stage-executed';
+ }
+ else{
+ if(moment(eventDate).isAfter(dhis2Event.dueDate)){
+ return 'alert alert-danger';//'stage-overdue';
+ }
+ return 'alert alert-warning';//'stage-on-time';
+ }
}
},
getEventDueDate: function(programStage, enrollment){
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-09-11 12:35:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-10-01 11:13:12 +0000
@@ -92,7 +92,8 @@
}
.vertical-center {
- vertical-align: middle;
+ //vertical-align: middle;
+ line-height: inherit;
}
.empty-stage-container {
@@ -173,6 +174,12 @@
background-color: #b9ffb9;
}
+.alert-default {
+ color: #55514d;
+ background-color: #D5CBC1;
+ border-color: #aaa29a;
+}
+
.red {
color: red;
}