dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31261
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15916: tracker-capture - dasboard widgets back to default color
------------------------------------------------------------
revno: 15916
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Mon 2014-06-30 17:43:13 +0200
message:
tracker-capture - dasboard widgets back to default color
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected.html
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/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
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/tei.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/components/dataentry/dataentry.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-06-30 11:46:04 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-06-30 15:43:13 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-primary" ng-controller="DataEntryController">
+<div class="panel panel-default" ng-controller="DataEntryController">
<div class="panel-heading">
<span ng-show="!showEventCreationDiv">{{dataentryWidget.title| translate}}</span>
<span ng-show="showEventCreationDiv">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html 2014-06-30 05:56:38 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html 2014-06-30 15:43:13 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-primary" ng-controller="EnrollmentController">
+<div class="panel panel-default" ng-controller="EnrollmentController">
<div class="panel-heading">
{{enrollmentWidget.title| translate}}
<span class="pull-right">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html 2014-06-30 05:56:38 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html 2014-06-30 15:43:13 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-primary" ng-controller="NotesController">
+<div class="panel panel-default" ng-controller="NotesController">
<div class="panel-heading">
{{notesWidget.title| translate}}
<span class="nav-pills" ng-show="selectedEnrollment">
@@ -48,10 +48,10 @@
</div>
<div ng-show="!selectedEnrollment">
- <div class="alert alert-warning">{{'not_yet_enrolled_note'| translate}}</div>
+ <div class="alert alert-warning vertical-spacing">{{'not_yet_enrolled_note'| translate}}</div>
</div>
<div ng-show="selectedEnrollment && !selectedEnrollment.notes">
- <div class="alert alert-info">{{'empty_notes'| translate}}</div>
+ <div class="alert alert-info vertical-spacing">{{'empty_notes'| translate}}</div>
</div>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html 2014-06-30 05:56:38 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html 2014-06-30 15:43:13 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-primary" ng-controller="ProfileController">
+<div class="panel panel-default" ng-controller="ProfileController">
<div class="panel-heading">
{{trackedEntity.name|| 'entity' | translate}} {{profileWidget.title| translate}}
<span class="nav-pills" ng-show="selectedTei.attributes.length">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html 2014-06-30 05:56:38 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html 2014-06-30 15:43:13 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-primary" ng-controller="RelationshipController">
+<div class="panel panel-default" ng-controller="RelationshipController">
<div class="panel-heading">
{{relationshipWidget.title| translate}}
<span class="pull-right">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected.html 2014-06-30 05:56:38 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected.html 2014-06-30 15:43:13 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-primary" ng-controller="SelectedInfoController">
+<div class="panel panel-default" ng-controller="SelectedInfoController">
<div class="panel-heading">
{{selectedWidget.title| translate}}
<span class="pull-right">
=== 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-06-30 11:40:12 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-06-30 15:43:13 +0000
@@ -74,6 +74,7 @@
"selected": "Selected",
"immediate_children": "Immediate children",
"all_children": "All children",
+ "all_accessible": "All accessible",
"data_element": "Data element",
"value": "Value",
"provided_elsewhere": "Provided elsewhere",
=== 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 13:56:21 +0000
+++ 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
@@ -74,7 +74,7 @@
$scope.attributes = atts;
$scope.attributes = $scope.generateAttributeFilters($scope.attributes);
$scope.gridColumns = $scope.generateGridColumns($scope.attributes);
- $scope.prepareForsearch($scope.searchMode.listAll);
+ $scope.search($scope.searchMode.listAll);
});
}, 100);
});
@@ -146,15 +146,17 @@
}
};
- $scope.prepareForsearch = function(mode){
+ $scope.search = function(mode){
$scope.teiFetched = false;
$scope.selectedSearchMode = mode;
$scope.emptySearchText = false;
$scope.emptySearchAttribute = false;
$scope.showSearchDiv = false;
- $scope.showRegistrationDiv = false;
+ $scope.showRegistrationDiv = false;
+ $scope.showTrackedEntityDiv = false;
$scope.trackedEntityList = null;
+ $scope.teiCount = null;
$scope.queryUrl = null;
$scope.programUrl = null;
@@ -166,32 +168,33 @@
//check search mode
if( $scope.selectedSearchMode === $scope.searchMode.freeText ){
+
if(!$scope.searchText){
$scope.emptySearchText = true;
+ $scope.teiFetched = false;
+ $scope.teiCount = null;
return;
}
-
- $scope.showTrackedEntityDiv = true;
+
$scope.queryUrl = 'query=' + $scope.searchText;
}
- else if( $scope.selectedSearchMode === $scope.searchMode.attributeBased ){
- $scope.showTrackedEntityDiv = true;
+
+ if( $scope.selectedSearchMode === $scope.searchMode.attributeBased ){
+
$scope.attributeUrl = EntityQueryFactory.getQueryForAttributes($scope.attributes, $scope.enrollment);
if(!$scope.attributeUrl.hasValue && !$scope.selectedProgram){
$scope.emptySearchAttribute = true;
- $scope.showSearchDiv = true;
+ $scope.teiFetched = false;
+ $scope.teiCount = null;
return;
}
}
- else if( $scope.selectedSearchMode === $scope.searchMode.listAll ){
- $scope.showTrackedEntityDiv = true;
- }
-
- $scope.search();
+
+ $scope.doSearch();
};
- $scope.search = function(){
+ $scope.doSearch = function(){
//get events for the specified parameters
TEIService.search($scope.selectedOrgUnit.id,
@@ -217,7 +220,8 @@
//process tei grid
$scope.trackedEntityList = TEIGridService.format(data);
- $scope.teiFetched = true;
+ $scope.showTrackedEntityDiv = true;
+ $scope.teiFetched = true;
});
};
@@ -275,6 +279,10 @@
$scope.trackedEntityList = null;
};
+ $scope.showSearch = function(){
+ $scope.showSearchDiv = !$scope.showSearchDiv;
+ };
+
$scope.showRegistration = function(){
$scope.showRegistrationDiv = !$scope.showRegistrationDiv;
$scope.showTrackedEntityDiv = false;
=== 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 13:16:30 +0000
+++ 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
@@ -270,5 +270,46 @@
},
templateUrl: 'views/clientside-pagination.html'
};
+})
+
+.directive('d2Enter', function () {
+ return function (scope, element, attrs) {
+ element.bind("keydown keypress", function (event) {
+ if(event.which === 13) {
+ scope.$apply(function (){
+ scope.$eval(attrs.d2Enter);
+ });
+ event.preventDefault();
+ }
+ });
+ };
+})
+
+.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 13:16:30 +0000
+++ 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
@@ -125,25 +125,11 @@
});
//dhis2.availability.startAvailabilityCheck();
-
- //drop down menu for advanced search
- $("#searchDropDown").width($("#searchDropDownParent").width());
- $('#searchDropDown').on('click', "[data-stop-propagation]", function(e) {
- e.stopPropagation();
- });
-
- //drop down menu for program selection
- $("#selectDropDown").width($("#selectDropDownParent").width());
- $("#selectDropDown").css('margin-right: 15x;');
- $(".select-drop-down-button").on('click', function(e) {
- e.stopPropagation();
- $("#selectDropDown").dropdown('toggle');
- });
-
});
$(window).resize(function() {
$("#selectDropDown").width($("#selectDropDownParent").width());
+ $("#selectDropDown").css('margin-right: 15x;');
$("#searchDropDown").width($("#searchDropDownParent").width());
});
=== 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 11:46:04 +0000
+++ 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
@@ -946,4 +946,15 @@
.note-entry-button {
width: 30%;
+}
+
+.without-border-radius{
+ border-radius: 0;
+}
+
+.dashboard-widget{
+ color: #555;
+ font-weight: bold;
+ background-color: #f6f7f8;
+ border-color: #d1d1d1;
}
\ 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 13:56:21 +0000
+++ 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
@@ -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" class="dropdown-menu pull-right">
+ <ul id="selectDropDown" select-drop-down-width class="dropdown-menu pull-right">
<li>
<a href ng-click="getProgramAttributes(null, true)">{{'please_select_a_program'| translate}}</a>
</li>
@@ -54,11 +54,12 @@
</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">
+ <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">
<div class="input-group-btn">
- <button class="btn btn-default trim" type="button" title="{{'advanced_search'| translate}}" data-toggle="dropdown" 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 pull-right">
+ <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">
<form ng-include="'views/search.html'">
</form>
</div>
@@ -82,7 +83,7 @@
<!--- Error display for search begins -->
<div class="row" ng-if="emptySearchAttribute || !searchText && emptySearchText">
- <div class="col-md-8">
+ <div class="col-md-8 vertical-spacing">
<div class="alert alert-danger">{{'search_input_required'| translate}}</div>
</div>
</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 10:54:21 +0000
+++ 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
@@ -7,7 +7,7 @@
<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_children'| translate}}</label>
+ <label><input type="radio" ng-model="ouMode.name" name="descendants" value="DESCENDANTS"> {{'all_accessible'| translate}}</label>
</td>
</tr>
<tr ng-if="selectedProgram">
@@ -109,5 +109,7 @@
ng-click="closeSearch()">
{{'cancel'| translate}}
</button>
+
+
</div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/tei.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/tei.html 2014-06-30 13:56:21 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/tei.html 2014-06-30 15:43:13 +0000
@@ -1,11 +1,11 @@
<div ng-switch="teiCount">
<div ng-switch-when="undefined">
- <div class="alert alert-warning">
+ <div class="alert alert-warning vertical-spacing col-md-8">
{{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}
</div>
</div>
<div ng-switch-when="0">
- <div class="alert alert-warning">
+ <div class="alert alert-warning vertical-spacing col-md-8">
{{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}
</div>
</div>