dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42957
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21872: event-capture: show comment column only when comment exists
------------------------------------------------------------
revno: 21872
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-02-03 13:47:55 +0100
message:
event-capture: show comment column only when comment exists
modified:
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/views/eventList.html
--
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 2016-02-03 11:03:52 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2016-02-03 12:47:55 +0000
@@ -316,8 +316,8 @@
if( angular.isObject( data.events ) ) {
angular.forEach(data.events,function(event){
-
- if(event.notes && !$scope.noteExists){
+
+ if(event.notes && event.notes.length > 0 && !$scope.noteExists){
$scope.noteExists = true;
}
=== 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-12-01 14:01:37 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html 2016-02-03 12:47:55 +0000
@@ -395,7 +395,7 @@
</td>
<!-- visible when comment exisits -->
<td ng-repeat="eventGridColumn in eventGridColumns | filter: {show: true}" ng-if="eventGridColumn.id === 'comment'">
- <a href ng-click="showNotes(dhis2Event)" title="{{'show_comments'| translate}}" ng-if="dhis2Event.notes"><i class="fa fa-info-circle"></i></a>
+ <a href ng-click="showNotes(dhis2Event)" title="{{'show_comments'| translate}}" ng-if="dhis2Event.notes.length > 0"><i class="fa fa-info-circle"></i></a>
</td>
<!-- visible when comment exisits -->
</tr>