dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30238
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15336: stylesheet - spacing between buttons
------------------------------------------------------------
revno: 15336
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2014-05-21 16:59:16 +0200
message:
stylesheet - spacing between buttons
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/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/profile.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/registration.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/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-05-20 15:56:10 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-05-21 14:59:16 +0000
@@ -77,6 +77,7 @@
"add_new": "Add New",
"register_new": "Register new",
"registration": "Registration",
+ "register": "Register",
"registration_error": "Error in registration",
"category": "Category",
"entity_type": "Entity type",
=== 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-05-21 10:05:20 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-05-21 14:59:16 +0000
@@ -19,7 +19,14 @@
//Selection
$scope.selectedOrgUnit = '';
$scope.selectedProgram = '';
- $scope.ouMode = 'SELECTED';
+ $scope.ouModes = [
+ {name: 'SELECTED', id: 1},
+ {name: 'CHILDREN', id: 2},
+ {name: 'DESCENDANTS', id: 3}
+ ];
+
+ $scope.ouMode = $scope.ouModes[0];
+
//Filtering
$scope.reverse = false;
@@ -150,7 +157,7 @@
//get events for the specified parameters
TEIService.search($scope.selectedOrgUnit.id,
- $scope.ouMode,
+ $scope.ouMode.name,
queryUrl,
programUrl,
attributeUrl.url).then(function(data){
@@ -166,6 +173,8 @@
//generate grid columns from teilist attributes
$scope.generateGridColumns = function(attributes){
var columns = angular.copy(attributes);
+ var defaultColumnSize = 5;
+ var index = 0;
//also add extra columns which are not part of attributes (orgunit for example)
columns.push({id: 'orgUnitName', name: 'Organisation unit', type: 'string'});
@@ -173,11 +182,16 @@
//generate grid column for the selected program/attributes
angular.forEach(columns, function(column){
- if(column.id === 'orgUnitName' && $scope.ouMode === 'SELECTED'){
+ if(column.id === 'orgUnitName' && $scope.ouMode.name === 'SELECTED'){
column.show = false;
}
else{
- column.show = true;
+ if(index < defaultColumnSize){
+ column.show = true;
+ }
+ else{
+ column.show = false;
+ }
}
column.showFilter = false;
@@ -185,6 +199,7 @@
if(column.type === 'date'){
$scope.filterText[column.id]= {start: '', end: ''};
}
+ index++;
});
return columns;
};
@@ -616,7 +631,13 @@
selectedProgramId: $scope.selectedProgram.id,
selectedEnrollment: $scope.selectedEnrollment});
});
- }
+ }
+
+ $rootScope.$broadcast('dataentry', {selectedEntity: $scope.selectedEntity,
+ selectedOrgUnit: $scope.selectedOrgUnit,
+ selectedProgramId: $scope.selectedProgram ? $scope.selectedProgram.id : null,
+ selectedEnrollment: $scope.selectedEnrollment ? $scope.selectedEnrollment : null});
+
};
$scope.showEnrollment = function(){
@@ -639,9 +660,7 @@
TranslationService) {
TranslationService.translate();
-
- $scope.selectedOrgUnit = storage.get('SELECTED_OU');
-
+
//listen for the selected items
$scope.$on('dataentry', function(event, args) {
@@ -655,10 +674,14 @@
$scope.dhis2Events = [];
$scope.selectedEntity = args.selectedEntity;
+ $scope.selectedOrgUnit = args.selectedOrgUnit;
$scope.selectedProgramId = args.selectedProgramId;
- $scope.selectedEnrollment = args.selectedEnrollment;
+ $scope.selectedEnrollment = args.selectedEnrollment;
- if($scope.selectedOrgUnit && $scope.selectedProgramId && $scope.selectedEntity ){
+ if($scope.selectedOrgUnit &&
+ $scope.selectedProgramId &&
+ $scope.selectedEntity &&
+ $scope.selectedEnrollment){
DHIS2EventFactory.getByEntity($scope.selectedEntity.trackedEntityInstance, $scope.selectedOrgUnit.id, $scope.selectedProgramId).then(function(data){
$scope.dhis2Events = data;
@@ -699,7 +722,7 @@
//check if a stage is repeatable
if(ps.repeatable){
$scope.allowEventCreation = true;
- if($scope.repeatableStages.indexOf(ps) == -1){
+ if($scope.repeatableStages.indexOf(ps) === -1){
$scope.repeatableStages.push(ps);
}
}
=== 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-05-20 15:56:10 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-05-21 14:59:16 +0000
@@ -573,6 +573,14 @@
margin-top: 20px;
}
+.small-horizonal-spacing{
+ margin-left: 5px;
+}
+
+.small-vertical-spacing{
+ margin-top: 5px;
+}
+
.search-container{
margin-top: 20px;
margin-bottom: 20px;
=== 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-05-20 10:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-05-21 14:59:16 +0000
@@ -11,10 +11,10 @@
<div class="page" id="mainPage" ng-show="selectedOrgUnit">
<h1>
<span ng-if='showSearchDiv || !showRegistrationDiv'>
- {{selectedProgram.trackedEntity.name}} {{'search'| translate}}
+ {{'search'| translate}} {{selectedProgram.trackedEntity.name}}
</span>
<span ng-if='showRegistrationDiv'>
- {{selectedProgram.trackedEntity.name}} {{'registration'| translate}}
+ {{'register'| translate}} {{selectedProgram.trackedEntity.name}}
</span>
<a href ng-click="getHelpContent()" title="{{'help'| translate}}"><i class="fa fa-question-circle"></i></a>
</h1>
@@ -27,26 +27,25 @@
<button class="btn btn-default" type="button" title="{{'advanced_search'| translate}}" ng-click="showSearch()" ng-disabled="showRegistrationDiv"><i class="fa fa-cog"></i></button>
</span>
</div>
- <div class="col-md-6">
- <div class="btn-group">
- <button type="button"
- class="btn btn-default"
- ng-disabled="showRegistrationDiv || showSearchDiv"
- ng-click="search(searchMode.freeText)">
- {{'search'| translate}}
- </button>
- <button type="button"
- class="btn btn-default"
- ng-disabled="showRegistrationDiv || showSearchDiv"
- ng-click="search(searchMode.listAll)">
- {{'list_all'| translate}}
- </button>
- </div>
+ <div class="col-md-6">
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-disabled="showRegistrationDiv || showSearchDiv"
+ ng-click="search(searchMode.freeText)">
+ {{'search'| translate}}
+ </button>
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-disabled="showRegistrationDiv || showSearchDiv"
+ ng-click="search(searchMode.listAll)">
+ {{'list_all'| translate}}
+ </button>
+
<span class="horizonal-spacing">
<button type="button"
- class="btn btn-default"
+ class="btn btn-default small-horizonal-spacing"
ng-click="showRegistration()">
- {{selectedProgram.trackedEntity.name }} {{'registration'| translate}}
+ {{selectedProgram.trackedEntity.name }} {{'register'| translate}}
</button>
</span>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/profile.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/profile.html 2014-05-20 15:56:10 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/profile.html 2014-05-21 14:59:16 +0000
@@ -49,18 +49,18 @@
</table>
<div class="widget-content-container" ng-if="editProfile">
- <div class="btn-group">
- <button type="button"
- class="btn btn-default"
- ng-click="save()">
- {{'save'| translate}}
- </button>
- <button type="button"
- class="btn btn-default"
- ng-click="cancel()">
- {{'cancel'| translate}}
- </button>
- </div>
+
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-click="save()">
+ {{'save'| translate}}
+ </button>
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-click="cancel()">
+ {{'cancel'| translate}}
+ </button>
+
</div>
</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/registration.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/registration.html 2014-05-20 08:20:18 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/registration.html 2014-05-21 14:59:16 +0000
@@ -70,7 +70,7 @@
<input type="text" class="form-control" ng-date ng-model="enrollment.incidentDate" />
</td>
</tr>
- <tr>
+ <tr ng-if="selectedProgram.displayIncidentDate">
<td>
{{selectedProgram.dateOfIncidentDescription}}
</td>
=== 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-05-16 11:32:21 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-05-21 14:59:16 +0000
@@ -3,11 +3,11 @@
<div class="search-container">
<table class="dhis2-list-table-striped dhis2-table-hover">
<tr>
- <td>{{'org_unit_mode'| translate}} - {{ouMode}}</td>
+ <td>{{'org_unit_mode'| translate}} - {{selectedOuMode.name}}</td>
<td>
- <input type="radio" ng-model="ouMode" value="SELECTED">{{'use_selected'| translate}}<br/>
- <input type="radio" ng-model="ouMode" value="CHILDREN">{{'use_immediate_children'| translate}}<br/>
- <input type="radio" ng-model="ouMode" value="DESCENDANTS">{{'use_all_children'| translate}}
+ <input type="radio" ng-model="ouMode.name" value="SELECTED">{{'use_selected'| translate}}<br/>
+ <input type="radio" ng-model="ouMode.name" value="CHILDREN">{{'use_immediate_children'| translate}}<br/>
+ <input type="radio" ng-model="ouMode.name" value="DESCENDANTS">{{'use_all_children'| translate}}
</td>
</tr>
<tr ng-repeat="attribute in attributes">
@@ -45,23 +45,23 @@
</table>
</div>
- <div class="btn-group">
- <button type="button"
- class="btn btn-default"
- ng-click="search(searchMode.attributeBased)">
- {{'search'| translate}}
- </button>
- <button type="button"
- class="btn btn-default"
- ng-click="search(searchMode.listAll)">
- {{'list_all'| translate}}
- </button>
- <button type="button"
- class="btn btn-default"
- ng-click="closeSearch()">
- {{'cancel'| translate}}
- </button>
- </div>
+
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-click="search(searchMode.attributeBased)">
+ {{'search'| translate}}
+ </button>
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-click="search(searchMode.listAll)">
+ {{'list_all'| translate}}
+ </button>
+ <button type="button"
+ class="btn btn-default small-horizonal-spacing"
+ ng-click="closeSearch()">
+ {{'cancel'| translate}}
+ </button>
+
<div class="row" ng-if="emptySearchAttribute">
<div class="col-md-12">
<div class="alert alert-danger">{{'search_input_required'| translate}}</div>