dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31307
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15935: tracker capture - some adjustments to tei search menus
------------------------------------------------------------
revno: 15935
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2014-07-02 13:34:41 +0200
message:
tracker capture - some adjustments to tei search menus
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/index.html
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/directives.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css
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/search.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/index.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/index.html 2014-06-19 15:27:17 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/index.html 2014-07-02 11:34:41 +0000
@@ -7,7 +7,7 @@
<meta name="keywords" content="DHIS 2">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
+
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js"></script>
=== 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-06-30 15:43:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-07-02 11:34:41 +0000
@@ -25,7 +25,8 @@
$scope.ouModes = [
{name: 'SELECTED', id: 1},
{name: 'CHILDREN', id: 2},
- {name: 'DESCENDANTS', id: 3}
+ {name: 'DESCENDANTS', id: 3},
+ {name: 'ACCESSIBLE', id: 4}
];
$scope.ouMode = $scope.ouModes[0];
@@ -69,14 +70,11 @@
$scope.loadPrograms($scope.selectedOrgUnit);
AttributesFactory.getWithoutProgram().then(function(atts){
- setTimeout(function () {
- $scope.$apply(function () {
- $scope.attributes = atts;
- $scope.attributes = $scope.generateAttributeFilters($scope.attributes);
- $scope.gridColumns = $scope.generateGridColumns($scope.attributes);
- $scope.search($scope.searchMode.listAll);
- });
- }, 100);
+
+ $scope.attributes = atts;
+ $scope.attributes = $scope.generateAttributeFilters($scope.attributes);
+ $scope.gridColumns = $scope.generateGridColumns($scope.attributes);
+ $scope.search($scope.searchMode.listAll);
});
}
});
@@ -115,6 +113,7 @@
};
$scope.getProgramAttributes = function(program, doSearch){
+
$scope.trackedEntityList = null;
$scope.selectedProgram = program;
@@ -152,7 +151,7 @@
$scope.selectedSearchMode = mode;
$scope.emptySearchText = false;
$scope.emptySearchAttribute = false;
- $scope.showSearchDiv = false;
+ //$scope.showSearchDiv = false;
$scope.showRegistrationDiv = false;
$scope.showTrackedEntityDiv = false;
$scope.trackedEntityList = null;
@@ -279,7 +278,7 @@
$scope.trackedEntityList = null;
};
- $scope.showSearch = function(){
+ $scope.showHideSearch = function(){
$scope.showSearchDiv = !$scope.showSearchDiv;
};
@@ -290,13 +289,11 @@
};
$scope.hideSearch = function(){
- $scope.showSearchDiv = false;
- $rootScope.showAdvancedSearchDiv = false;
- };
-
- $scope.closeSearch = function(){
- $scope.showSearchDiv = !$scope.showSearchDiv;
- };
+ //$scope.showSearchDiv = false;
+ //$rootScope.showAdvancedSearchDiv = false;
+ };
+
+
$scope.showHideColumns = function(){
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js 2014-06-30 15:43:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js 2014-07-02 11:34:41 +0000
@@ -283,33 +283,5 @@
}
});
};
-})
-
-.directive('searchDropDownWidth', function() {
-
- return {
- restrict: 'A',
- link: function(scope, element, attrs){
- $("#searchDropDown").width($("#searchDropDownParent").width());
- $('#searchDropDown').on('click', "[data-stop-propagation]", function(e) {
- e.stopPropagation();
- });
- }
- };
-})
-
-.directive('selectDropDownWidth', function() {
-
- return {
- restrict: 'A',
- link: function(scope, element, attrs){
- $("#selectDropDown").width($("#selectDropDownParent").width());
- $("#selectDropDown").css('margin-right: 15x;');
- $(".select-drop-down-button").on('click', function(e) {
- e.stopPropagation();
- $("#selectDropDown").dropdown('toggle');
- });
- }
- };
});
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-06-30 15:43:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-07-02 11:34:41 +0000
@@ -125,12 +125,27 @@
});
//dhis2.availability.startAvailabilityCheck();
+
+ var selectParentWidth = $("#selectDropDownParent").width();
+ $("#selectDropDown").width(selectParentWidth);
+ $(".select-drop-down-button").on('click', function(e) {
+ e.stopPropagation();
+ $("#selectDropDown").dropdown('toggle');
+ });
+
+ var searchParentWidth = $("#searchDropDownParent").width();
+ $("#searchDropDown").width(searchParentWidth);
+ $('#searchDropDown').on('click', "[data-stop-propagation]", function(e) {
+ e.stopPropagation();
+ });
+
});
$(window).resize(function() {
- $("#selectDropDown").width($("#selectDropDownParent").width());
- $("#selectDropDown").css('margin-right: 15x;');
- $("#searchDropDown").width($("#searchDropDownParent").width());
+ var searchWidth = $("#searchDropDownParent").width();
+ var selectWidth = $("#selectDropDownParent").width();
+ $("#selectDropDown").width(selectWidth);
+ $("#searchDropDown").width(searchWidth);
});
function ajax_login()
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-06-30 15:43:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-07-02 11:34:41 +0000
@@ -576,7 +576,9 @@
.search-container{
margin: 5px;
- padding: 5px;
+ padding: 5px;
+ max-height: 50% !important;
+ overflow-y: scroll;
}
.registration-container{
@@ -742,7 +744,8 @@
padding: 6px 8px;
font-size: 14px;
}
-input[type=number], input[type=text], input[type=password], textarea {
+
+input[type=number], input[type=text], input[type=password], textarea, select {
border: 1px solid #aaa;
padding: 6px 8px;
font-size: 14px;
@@ -913,9 +916,7 @@
}
.dropdown-menu {
- margin-top: -5px;
- margin-left: 0;
- margin-right: 0;
+ margin: -5px 0 0 0;
}
.btn-link {
@@ -957,4 +958,10 @@
font-weight: bold;
background-color: #f6f7f8;
border-color: #d1d1d1;
+}
+
+
+.dropdown-menu-right{
+ right: 0;
+ left: auto;
}
\ No newline at end of file
=== 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-06-30 15:43:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-07-02 11:34:41 +0000
@@ -43,7 +43,7 @@
<button type="button" class="select-drop-down-button form-control" >{{selectedProgram ? selectedProgram.name : 'please_select_a_program'| translate}}</button>
<div class="input-group-btn">
<button class="btn btn-default trim" type="button" title="{{'list_programs'| translate}}" data-toggle="dropdown"><i class="fa fa-caret-down"></i></button>
- <ul id="selectDropDown" select-drop-down-width class="dropdown-menu pull-right">
+ <ul id="selectDropDown" class="dropdown-menu dropdown-menu-right">
<li>
<a href ng-click="getProgramAttributes(null, true)">{{'please_select_a_program'| translate}}</a>
</li>
@@ -53,13 +53,13 @@
</ul>
</div>
</div>
+
<div id="searchDropDownParent" class="input-group col-md-5">
- <input type="text" placeholder="{{'type_your_search_criteria_here'| translate}}" ng-model="searchText" class="form-control expanded" ng-class="{true: 'invalid - input'} [!searchText && emptySearchText]" ng-focus="hideSearch()" ng-disabled="showRegistrationDiv || showSearchDiv">
+ <input type="text" placeholder="{{'type_your_search_criteria_here'| translate}}" ng-model="searchText" class="form-control expanded" ng-class="{true: 'invalid - input'} [!searchText && emptySearchText]" ng-focus="showHideSearch()" ng-disabled="showRegistrationDiv">
<div class="input-group-btn">
- <button class="btn btn-default without-border-radius trim" type="button" title="{{'advanced_search'| translate}}" data-toggle="dropdown" ng-click="showSearch()" ng-disabled="showRegistrationDiv"><i class="fa fa-caret-down"></i></button>
- <button ng-if="!showSearchDiv" 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 ng-if="showSearchDiv" class="btn btn-primary trim" type="button" title="{{'search'| translate}}" ng-disabled="showRegistrationDiv" ng-click="search(searchMode.attributeBased)"><i class="fa fa-search"></i></button>
- <div id="searchDropDown" search-drop-down-width class="dropdown-menu pull-right">
+ <button class="btn btn-default without-border-radius 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>
+ <div id="searchDropDown" class="dropdown-menu dropdown-menu-right">
<form ng-include="'views/search.html'">
</form>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-06-30 15:43:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-07-02 11:34:41 +0000
@@ -1,5 +1,4 @@
<div class="search-container">
-
<table data-stop-propagation="true" class="table-borderless table-striped">
<tr>
@@ -7,7 +6,8 @@
<td>
<label><input type="radio" ng-model="ouMode.name" name="selected" value="SELECTED"> {{'selected'| translate}}</label><br/>
<label><input type="radio" ng-model="ouMode.name" name="children" value="CHILDREN"> {{'immediate_children'| translate}}</label><br/>
- <label><input type="radio" ng-model="ouMode.name" name="descendants" value="DESCENDANTS"> {{'all_accessible'| translate}}</label>
+ <label><input type="radio" ng-model="ouMode.name" name="descendants" value="DESCENDANTS"> {{'all_children'| translate}}</label><br/>
+ <label><input type="radio" ng-model="ouMode.name" name="accessible" value="ACCESSIBLE"> {{'all_accessible'| translate}}</label>
</td>
</tr>
<tr ng-if="selectedProgram">
@@ -106,10 +106,8 @@
</button>
<button type="button"
class="btn btn-default small-horizonal-spacing"
- ng-click="closeSearch()">
+ ng-click="showHideSearch()">
{{'cancel'| translate}}
</button>
-
-
</div>
\ No newline at end of file