dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39780
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20167: tracker-capture: minized filter usage, it helps in improving performance
------------------------------------------------------------
revno: 20167
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-09-15 15:51:19 +0200
message:
tracker-capture: minized filter usage, it helps in improving performance
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/search-ou-tree.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.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-tracker-capture/components/relationship/search.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html 2015-09-14 15:51:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html 2015-09-15 13:51:19 +0000
@@ -2,7 +2,7 @@
<div class="advanced-search-container">
<table data-stop-propagation="true" class="table-borderless table-striped">
<tr>
- <td>{{'org_unit'| translate}}</td>
+ <td>{{orgUnitLabel}}</td>
<td>
<label><input type="radio" ng-model="selectedOuMode.name" name="selected" value="SELECTED"> {{'SELECTED'| translate}}</label><br/>
<label><input type="radio" ng-model="selectedOuMode.name" name="children" value="CHILDREN"> {{'CHILDREN'| translate}}</label><br/>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html 2015-04-27 08:24:30 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html 2015-09-15 13:51:19 +0000
@@ -38,7 +38,7 @@
<div class="col-sm-8 col-md-6">
<table class="table-borderless table-striped">
<tr>
- <td>{{'org_unit'| translate}}</td>
+ <td>{{orgUnitLabel}}</td>
<td>
<input type="text" class="form-control" selected-org-unit ng-model="selectedOrgUnit.name" value="{{selectedOrgUnit.name || 'please_select'| translate}}" ng-disabled="true">
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html 2015-09-11 15:16:03 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html 2015-09-15 13:51:19 +0000
@@ -66,7 +66,7 @@
<span class="bold">{{'name'| translate}}:</span> {{dhis2Event.name}}
</div>
<div class="col-sm-3">
- <span class="bold">{{'org_unit'| translate}}:</span> {{dhis2Event.orgUnitName}}
+ <span class="bold">{{orgUnitLabel}}:</span> {{dhis2Event.orgUnitName}}
</div>
<div class="col-sm-3">
<span class="bold">{{dhis2Event.eventDate ? 'event_date' : 'due_date'| translate}}:</span> {{dhis2Event.eventDate ? dhis2Event.eventDate : dhis2Event.dueDate}}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html 2015-04-21 07:42:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html 2015-09-15 13:51:19 +0000
@@ -2,7 +2,7 @@
<div class="col-sm-8 col-md-6">
<table class="table table-borderless table-striped">
<tr>
- <td>{{'org_unit'| translate}}</td>
+ <td>{{orgUnitLabel}}</td>
<td>
<input type="text" class="form-control" value="{{selectedOrgUnit.name|| 'please_select'| translate}}" ng-disabled="true">
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html 2015-04-27 08:24:30 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html 2015-09-15 13:51:19 +0000
@@ -38,7 +38,7 @@
<div class="col-sm-8 col-md-6">
<table class="table-borderless table-striped">
<tr>
- <td>{{'org_unit'| translate}}</td>
+ <td>{{orgUnitLabel}}</td>
<td>
<input type="text" class="form-control" selected-org-unit ng-model="selectedOrgUnit.name" value="{{selectedOrgUnit.name || 'please_select'| translate}}" ng-disabled="true">
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2015-09-14 16:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2015-09-15 13:51:19 +0000
@@ -13,6 +13,7 @@
$location,
$filter,
$timeout,
+ $translate,
Paginator,
SessionStorageService,
MetaDataFactory,
@@ -76,6 +77,27 @@
CurrentSelection.setOptionSets($scope.optionSets);
});
}
+
+ //Labels
+ $scope.orgUnitLabel = $translate.instant('org_unit');
+ $scope.listAllLabel = $translate.instant('list_all');
+ $scope.registerLabel = $translate.instant('register');
+ $scope.searchOusLabel = $translate.instant('locate_organisation_unit_by_name');
+ $scope.printLabel = $translate.instant('print');
+ $scope.searchLabel = $translate.instant('search');
+ $scope.findLabel = $translate.instant('find');
+ $scope.advancedSearchLabel = $translate.instant('advanced_search');
+ $scope.allEnrollmentsLabel = $translate.instant('all_enrollment');
+ $scope.completedEnrollmentsLabel = $translate.instant('completed_enrollment');
+ $scope.activeEnrollmentsLabel = $translate.instant('active_enrollment');
+ $scope.cancelledEnrollmentsLabel = $translate.instant('cancelled_enrollment');
+ $scope.searchCriteriaLabel = $translate.instant('type_your_search_criteria_here');
+ $scope.programSelectLabel = $translate.instant('please_select_a_program');
+ $scope.settingsLabel = $translate.instant('settings');
+ $scope.showHideLabel = $translate.instant('show_hide_columns');
+ $scope.listProgramsLabel = $translate.instant('list_programs');
+ $scope.settingsLabel = $translate.instant('settings');
+
$scope.loadPrograms($scope.selectedOrgUnit);
}
});
@@ -259,6 +281,7 @@
//process tei grid
$scope.trackedEntityList = TEIGridService.format(data,false, $scope.optionSets, null);
$scope.showTrackedEntityDiv = true;
+ $scope.showSearchDiv = false;
$scope.teiFetched = true;
$scope.doSearch = true;
@@ -363,7 +386,6 @@
};
$scope.getHelpContent = function(){
- console.log('I will get help content');
};
//Get orgunits for the logged in user
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html 2015-06-15 15:29:59 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html 2015-09-15 13:51:19 +0000
@@ -42,14 +42,8 @@
<td>
<div ng-if="attribute.optionSetValue">
<select multiple ui-select2 ng-model="attribute.value" data-placeholder="{{'please_select'| translate}}" style="width:100%;">
- <option ng-repeat="option in optionSets[attribute.optionSet.id].options| filter:$viewValue | limitTo:100" value="{{option.code}}">{{option.name}}</option>
+ <option ng-repeat="option in optionSets[attribute.optionSet.id].options | filter:$viewValue | limitTo:100" value="{{option.code}}">{{option.name}}</option>
</select>
- <!--<ui-select multiple close-on-select="false" ng-model="attribute.value" theme="bootstrap" style="width:100%;">
- <ui-select-match style="width:100%;" placeholder="{{'please_select' | translate}}">{{$select.selected.name || $select.selected}}</ui-select-match>
- <ui-select-choices repeat="option in optionSets[attribute.optionSet.id].options | filter: $select.search | limitTo:100">
- <span ng-bind-html="option.name | highlight: $select.search"></span>
- </ui-select-choices>
- </ui-select>-->
</div>
<div ng-if="!attribute.optionSetValue" ng-switch="attribute.valueType">
<div ng-switch-when="number">
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html 2015-08-19 07:40:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html 2015-09-15 13:51:19 +0000
@@ -31,8 +31,8 @@
<div class="left-bar-menu" ng-controller="LeftBarMenuController">
<ul class="nav nav-pills nav-stacked">
- <li><a href ng-click="showHome()">{{'registration_and_data_entry'| translate}}</a></li>
- <li><a href ng-click="showReportTypes()">{{'reports'| translate}}</a></li>
+ <li><a href ng-click="showHome()">{{'registration_and_data_entry' | translate}}</a></li>
+ <li><a href ng-click="showReportTypes()">{{'reports' | translate}}</a></li>
</ul>
</div>
@@ -61,12 +61,12 @@
<div class="row top-bar">
<div class="col-sm-12">
<span ng-if='!showRegistrationDiv'>
- {{selectedProgram.trackedEntity.name}} {{'search'| translate}}
+ {{selectedProgram.trackedEntity.name}} {{searchLabel}}
<span class="btn-group horizonal-spacing" ng-show="selectedProgram">
- <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'ALL'" title="{{'all_enrollment'| translate}}" ng-click='filterByEnrollmentStatus("ALL")'><i class="fa fa-list mouse-pointer"></i></label>
- <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'ACTIVE'" title="{{'active_enrollment'| translate}}" ng-click='filterByEnrollmentStatus("ACTIVE")'><i class="fa fa-circle-o mouse-pointer"></i></label>
- <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'COMPLETED'" title="{{'completed_enrollment'| translate}}" ng-click='filterByEnrollmentStatus("COMPLETED")'><i class="fa fa-check mouse-pointer"></i></label>
- <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'CANCELLED'" title="{{'cancelled_enrollment'| translate}}" ng-click='filterByEnrollmentStatus("CANCELLED")'><i class="fa fa-times mouse-pointer"></i></label>
+ <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'ALL'" title="{{allEnrollmentsLabel}}" ng-click='filterByEnrollmentStatus("ALL")'><i class="fa fa-list mouse-pointer"></i></label>
+ <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'ACTIVE'" title="{{activeEnrollmentsLabel}}" ng-click='filterByEnrollmentStatus("ACTIVE")'><i class="fa fa-circle-o mouse-pointer"></i></label>
+ <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'COMPLETED'" title="{{completedEnrollmentsLabel}}" ng-click='filterByEnrollmentStatus("COMPLETED")'><i class="fa fa-check mouse-pointer"></i></label>
+ <label class="btn btn-default" ng-model="enrollmentStatus" btn-radio="'CANCELLED'" title="{{cancelledEnrollmentsLabel}}" ng-click='filterByEnrollmentStatus("CANCELLED")'><i class="fa fa-times mouse-pointer"></i></label>
</span>
<span class="small-horizonal-spacing" ng-if="pager.total">
({{'total'| translate}}: {{pager.total}})
@@ -78,10 +78,10 @@
<div class="pull-right hideInPrint">
<div class="btn-group" dropdown is-open="status.isopen">
<button type="button" class="btn btn-default dropdown-toggle" dropdown-toggle ng-disabled="trackedEntityList.rows.length <= 0">
- <i class="fa fa-cog" title="{{'settings'| translate}}"></i>
+ <i class="fa fa-cog" title="{{settingsLabel}}"></i>
</button>
<ul class="dropdown-menu pull-right" role="menu">
- <li ng-show="trackedEntityList.rows.length > 0"><a href ng-click="showHideColumns()">{{'show_hide_columns'| translate}}</a></li>
+ <li ng-show="trackedEntityList.rows.length > 0"><a href ng-click="showHideColumns()">{{showHideLabel}}</a></li>
</ul>
</div>
</div>
@@ -96,7 +96,7 @@
<!--- search and registration menu begins -->
<div class="row vertical-spacing not-for-screen">
<div class="col-md-4">
- <h4>{{'org_unit'| translate}}</h4>
+ <h4>{{orgUnitLabel}}</h4>
</div>
<div class="col-md-4">
<input type="text" class="form-control" ng-disabled='true' value="{{selectedOrgUnit.name}}">
@@ -109,10 +109,10 @@
<button type="button" class="select-dropdown-button form-control" ng-show="programs.length > 0">{{selectedProgram ? selectedProgram.name : 'please_select_a_program'| translate}}</button>
<button type="button" class="select-dropdown-button form-control" ng-show="programs.length < 1" ng-disabled="true">{{programs.length > 0 ? 'please_select_a_program' : 'no_program_exists'| translate}}</button>
<div class="input-group-btn program-drop-down">
- <button class="btn btn-default select-dropdown-caret" type="button" title="{{'list_programs'| translate}}" data-toggle="dropdown" ng-disabled="programs.length < 1"><i class="fa fa-caret-down"></i></button>
+ <button class="btn btn-default select-dropdown-caret" type="button" title="{{listProgramsLabel}}" data-toggle="dropdown" ng-disabled="programs.length < 1"><i class="fa fa-caret-down"></i></button>
<ul id="selectDropDown" class="dropdown-menu dropdown-menu-right">
<li>
- <a href ng-click="getProgramAttributes(null)">{{'please_select_a_program'| translate}}</a>
+ <a href ng-click="getProgramAttributes(null)">{{programSelectLabel}}</a>
</li>
<li ng-repeat="program in programs| orderBy: 'name'">
<a href ng-click="getProgramAttributes(program)">{{program.name}}</a>
@@ -125,13 +125,13 @@
<!-- simple/advanced search begins -->
<div id="searchDropDownParent" class="input-group col-md-4 hideInPrint">
- <input type="text" placeholder="{{'type_your_search_criteria_here'| translate}}" ng-model="searchText" class="form-control expanded" d2-enter="search(searchMode.freeText)" ng-class="{true: 'invalid - input'} [!searchText && emptySearchText]" ng-focus="showHideSearch()" ng-disabled="showRegistrationDiv">
+ <input type="text" placeholder="{{searchCriteriaLabel}}" ng-model="searchText" class="form-control expanded" d2-enter="search(searchMode.freeText)" ng-class="{true: 'invalid - input'} [!searchText && emptySearchText]" ng-focus="showHideSearch()" ng-disabled="showRegistrationDiv">
<div class="input-group-btn">
- <button class="btn btn-default search-dropdown-button trim" type="button" title="{{'advanced_search'| translate}}" data-toggle="dropdown" ng-click="showHideSearch()" ng-disabled="showRegistrationDiv"><i class="fa fa-caret-down"></i></button>
- <button class="btn btn-primary trim" type="button" title="{{'search'| translate}}" ng-disabled="showRegistrationDiv" ng-click="search(searchMode.freeText)"><i class="fa fa-search"></i></button>
+ <button class="btn btn-default search-dropdown-button trim" type="button" title="{{advancedSearchLabel}}" data-toggle="dropdown" ng-click="showHideSearch()" ng-disabled="showRegistrationDiv"><i class="fa fa-caret-down"></i></button>
+ <button class="btn btn-primary trim" type="button" title="{{searchLabel}}" ng-disabled="showRegistrationDiv" ng-click="search(searchMode.freeText)"><i class="fa fa-search"></i></button>
<div id="searchDropDown" class="dropdown-menu dropdown-menu-right">
<form name="searchForm">
- <div ng-include="'views/advanced-search.html'"></div>
+ <div ng-if="showSearchDiv" ng-include="'views/advanced-search.html'"></div>
</form>
</div>
</div>
@@ -144,18 +144,18 @@
class="btn btn-success"
ng-disabled="showRegistrationDiv"
ng-click="search(searchMode.listAll)">
- {{'list_all'| translate}}
+ {{listAllLabel}}
</button>
<button type="button"
class="btn btn-primary"
ng-click="showRegistration()">
- {{'register'| translate}}
+ {{registerLabel}}
</button>
<button type="button"
class="btn btn-info"
ng-if="teiCount > 0"
onclick="javascript:window.print()">
- {{'print'| translate}}
+ {{printLabel}}
</button>
</div>
<!--search/registration buttons end-->
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/search-ou-tree.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/search-ou-tree.html 2015-04-15 09:04:32 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/search-ou-tree.html 2015-09-15 13:51:19 +0000
@@ -2,7 +2,7 @@
<accordion>
<accordion-group is-open="searchOuTree.open">
<accordion-heading>
- {{'org_unit'| translate}} <i class="pull-right" ng-class="{'fa fa-chevron-up vertical-center': searchOuTree.open, 'fa fa-chevron-down vertical-center': !searchOuTree.open}"></i>
+ {{orgUnitLabel}} <i class="pull-right" ng-class="{'fa fa-chevron-up vertical-center': searchOuTree.open, 'fa fa-chevron-down vertical-center': !searchOuTree.open}"></i>
</accordion-heading>
<div class="org-unit-tree row" data-stop-propagation="true">
<script type="text/ng-template" id="orgUnitTree.html">
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html 2015-09-14 16:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/tei.html 2015-09-15 13:51:19 +0000
@@ -20,7 +20,7 @@
<!-- sort icon begins -->
<span ng-hide="gridColumn.showFilter" class="bold pointer" title="{{'sort'| translate}}">
<span ng-class="{true: 'red'} [sortColumn.id === gridColumn.id]"><i class="fa fa-sort"></i></span>
- {{gridColumn.name | translate}}
+ {{gridColumn.name}}
</span>
<!-- sort icon ends -->
</th>
=== 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 2015-08-25 14:54:19 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js 2015-09-15 13:51:19 +0000
@@ -12,10 +12,10 @@
return {
restrict: 'E',
template: '<div style="margin-top:20px">\n\
- <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{ \'locate_organisation_unit_by_name\' | translate}}">\n\
+ <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{ searchOusLabel}}">\n\
<span id="searchSpan" style="width:100%;display:none;">\n\
<input type="text" id="searchField" name="key"/>\n\
- <input type="button" value="{{\'find\' | translate}}" onclick="selection.findByName()"/>\n\
+ <input type="button" value="{{findLabel}}" onclick="selection.findByName()"/>\n\
</span>\n\
</div>',
link: function (scope, element, attrs) {