dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35149
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18044: event-capture - make default sorting column visible to users in event grid
------------------------------------------------------------
revno: 18044
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-01-19 09:58:03 +0100
message:
event-capture - make default sorting column visible to users in event grid
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
--
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 2015-01-18 23:24:46 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2015-01-19 08:58:03 +0000
@@ -256,7 +256,7 @@
val = DateUtils.formatFromApiToUser(val);
}
if( $scope.prStDes[dataValue.dataElement].dataElement.type === 'trueOnly'){
- if(val == 'true'){
+ if(val === 'true'){
val = true;
}
else{
@@ -280,6 +280,10 @@
if($scope.noteExists && !GridColumnService.columnExists($scope.eventGridColumns, 'comment')){
$scope.eventGridColumns.push({name: 'comment', id: 'comment', type: 'string', compulsory: false, showFilter: false, show: true});
}
+
+ 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;
});