dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32079
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16395: tracker capture - minor cleanup
------------------------------------------------------------
revno: 16395
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-13 10:49:13 +0200
message:
tracker capture - minor cleanup
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-07-25 10:52:23 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-08-13 08:49:13 +0000
@@ -37,6 +37,7 @@
"type_here_for_simple_search": "Type your criteria here for simple search",
"type_your_search_criteria_here": "Type your search criteria here",
"search_input_required": "Please specify a search criteria",
+ "in_progress": "In progress",
"registered_entities": "Registered entities",
"empty_entity_list": "There are no registered entities",
"empty": "Empty",
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-08-12 14:48:01 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-08-13 08:49:13 +0000
@@ -357,111 +357,6 @@
};
})
-//Controller for the search function
-//own controller is required because of the ng-include for the search
-.controller('SearchController',
- function($scope,
- Paginator,
- TEIGridService,
- TEIService,
- EntityQueryFactory,
- TranslationService) {
-
- TranslationService.translate();
-
- $scope.search = function(mode){
-
- $scope.teiFetched = false;
- $scope.selectedSearchMode = mode;
- $scope.emptySearchText = false;
- $scope.emptySearchAttribute = false;
- //$scope.showSearchDiv = false;
- $scope.showRegistrationDiv = false;
- $scope.showReportDiv = false;
- $scope.showTrackedEntityDiv = false;
- $scope.trackedEntityList = null;
- $scope.teiCount = null;
-
- $scope.queryUrl = null;
- $scope.programUrl = null;
- $scope.attributeUrl = {url: null, hasValue: false};
-
- if($scope.selectedProgram){
- $scope.programUrl = 'program=' + $scope.selectedProgram.id;
- }
-
- //check search mode
- if( $scope.selectedSearchMode === $scope.searchMode.freeText ){
-
- if(!$scope.searchText){
- $scope.emptySearchText = true;
- $scope.teiFetched = false;
- $scope.teiCount = null;
- return;
- }
-
- $scope.queryUrl = 'query=' + $scope.searchText;
-
- $scope.attributes = EntityQueryFactory.resetAttributesQuery($scope.attributes, $scope.enrollment);
- }
-
- if( $scope.selectedSearchMode === $scope.searchMode.attributeBased ){
-
- $scope.searchText = '';
-
- $scope.attributeUrl = EntityQueryFactory.getAttributesQuery($scope.attributes, $scope.enrollment);
-
- if(!$scope.attributeUrl.hasValue && !$scope.selectedProgram){
- $scope.emptySearchAttribute = true;
- $scope.teiFetched = false;
- $scope.teiCount = null;
- return;
- }
- }
-
- if( $scope.selectedSearchMode === $scope.searchMode.listAll ){
- $scope.searchText = '';
-
- $scope.attributes = EntityQueryFactory.resetAttributesQuery($scope.attributes, $scope.enrollment);
- }
-
- $scope.fetchTeis();
- };
-
- $scope.fetchTeis = function(){
-
- //get events for the specified parameters
- TEIService.search($scope.selectedOrgUnit.id,
- $scope.selectedOuMode.name,
- $scope.queryUrl,
- $scope.programUrl,
- $scope.attributeUrl.url,
- $scope.pager,
- true).then(function(data){
- //$scope.trackedEntityList = data;
- if(data.rows){
- $scope.teiCount = data.rows.length;
- }
-
- if( data.metaData.pager ){
- $scope.pager = data.metaData.pager;
- $scope.pager.toolBarDisplay = 5;
-
- Paginator.setPage($scope.pager.page);
- Paginator.setPageCount($scope.pager.pageCount);
- Paginator.setPageSize($scope.pager.pageSize);
- Paginator.setItemCount($scope.pager.total);
- }
-
- //process tei grid
- $scope.trackedEntityList = TEIGridService.format(data);
- $scope.showTrackedEntityDiv = true;
- $scope.teiFetched = true;
- $scope.doSearch = true;
- });
- };
-})
-
//Controller for column show/hide
.controller('ColumnDisplayController',
function($scope,
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-08-12 14:55:44 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-08-13 08:49:13 +0000
@@ -228,7 +228,7 @@
<!-- report div ends -->
<!-- entity grid begins -->
- <img class="col-md-12" src="../images/ajax-loader-bar.gif" ng-if="!teiFetched && searchText && !emptySearchTex"/>
+ <img src="../images/ajax-loader-bar.gif" alt="{{'in_progress' | translate}}" ng-if="!teiFetched && searchText && !emptySearchTex"/>
<div class="row" ng-if="showTrackedEntityDiv">
<div class="col-md-12" ng-include="'views/tei.html'"></div>
</div>