dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31239
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15902: tracker capture - used bootstrap primary color for tei dashboard widgets, also now profile widget...
------------------------------------------------------------
revno: 15902
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Mon 2014-06-30 07:56:38 +0200
message:
tracker capture - used bootstrap primary color for tei dashboard widgets, also now profile widget respects selected program
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html
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-controller.js
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-controller.js
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-controller.js
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/scripts/controllers.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.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
--
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/dashboard/dashboard-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js 2014-06-27 15:42:43 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js 2014-06-30 05:56:38 +0000
@@ -17,7 +17,7 @@
//dashboard items
$rootScope.dashboardWidgets = {bigger: [], smaller: []};
- $rootScope.enrollmentWidget = {title: 'enrollment', view: "components/enrollment/enrollment.html", show: true, expand: true, expand: true};
+ $rootScope.enrollmentWidget = {title: 'enrollment', view: "components/enrollment/enrollment.html", show: true, expand: true};
$rootScope.dataentryWidget = {title: 'dataentry', view: "components/dataentry/dataentry.html", show: true, expand: true};
$rootScope.selectedWidget = {title: 'current_selections', view: "components/selected/selected.html", show: false, expand: true};
$rootScope.profileWidget = {title: 'profile', view: "components/profile/profile.html", show: true, expand: true};
@@ -32,24 +32,24 @@
$rootScope.dashboardWidgets.smaller.push($rootScope.notesWidget);
//selections
- $scope.selectedEntityId = null;
+ $scope.selectedTeiId = null;
$scope.selectedProgramId = null;
- $scope.selectedEntityId = ($location.search()).selectedEntityId;
- $scope.selectedProgramId = ($location.search()).selectedProgramId;
+ $scope.selectedTeiId = ($location.search()).tei;
+ $scope.selectedProgramId = ($location.search()).programId;
$scope.selectedOrgUnit = storage.get('SELECTED_OU');
- $scope.selectedProgram = null;
+ $scope.selectedProgram;
$scope.programs = [];
- $scope.selectedEntity;
+ $scope.selectedTei;
- if( $scope.selectedEntityId ){
+ if( $scope.selectedTeiId ){
//Fetch the selected entity
- TEIService.get($scope.selectedEntityId).then(function(data){
- $scope.selectedEntity = data;
+ TEIService.get($scope.selectedTeiId).then(function(data){
+ $scope.selectedTei = data;
//get the entity type
- TEService.get($scope.selectedEntity.trackedEntity).then(function(te){
+ TEService.get($scope.selectedTei.trackedEntity).then(function(te){
$scope.trackedEntity = te;
ProgramFactory.getAll().then(function(programs){
@@ -57,7 +57,7 @@
//get programs valid for the selected ou and tei
angular.forEach(programs, function(program){
if(program.organisationUnits.hasOwnProperty($scope.selectedOrgUnit.id) &&
- program.trackedEntity.id === $scope.selectedEntity.trackedEntity){
+ program.trackedEntity.id === $scope.selectedTei.trackedEntity){
$scope.programs.push(program);
}
@@ -65,18 +65,24 @@
$scope.selectedProgram = program;
}
});
-
+
//broadcast selected items for dashboard controllers
- $scope.broadCastProgram();
+ CurrentSelection.set({tei: $scope.selectedTei, te: $scope.trackedEntity, pr: $scope.selectedProgram, enrollment: null});
+ $scope.broadCastSelections();
});
});
});
- }
+ }
- $scope.broadCastProgram = function(){
- CurrentSelection.set({tei: $scope.selectedEntity, te: $scope.trackedEntity, pr: $scope.selectedProgram, enrollment: null});
+ $scope.broadCastSelections = function(){
+
+ var selections = CurrentSelection.get();
+ $scope.selectedTei = selections.tei;
+ $scope.trackedEntity = selections.te;
+ $scope.selectedEnrollment = selections.enrollment;
+ CurrentSelection.set({tei: $scope.selectedTei, te: $scope.trackedEntity, pr: $scope.selectedProgram, enrollment: null});
$timeout(function() {
- $rootScope.$broadcast('selectedEntity', {programExists: $scope.programs.length > 0});
+ $rootScope.$broadcast('selectedItems', {programExists: $scope.programs.length > 0});
}, 100);
};
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html 2014-06-19 15:27:17 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard.html 2014-06-30 05:56:38 +0000
@@ -6,7 +6,7 @@
<select ng-model="selectedProgram"
class="form-control-program"
ng-options="program as program.name for program in programs | orderBy: 'name'"
- ng-change="broadCastProgram()">
+ ng-change="broadCastSelections()">
<option value="">{{'please_select_a_program'| translate}}</option>
</select>
=== 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-27 15:42:43 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-06-30 05:56:38 +0000
@@ -1,4 +1,4 @@
-<div class="panel panel-info" ng-controller="DataEntryController">
+<div class="panel panel-primary" ng-controller="DataEntryController">
<div class="panel-heading">
{{dataentryWidget.title| translate}}
<span class="nav-pills" ng-show="selectedEnrollment && allowEventCreation">
@@ -6,10 +6,10 @@
</span>
<span class="pull-right">
<a class="small-horizonal-spacing" href ng-click="expandCollapse(dataentryWidget)">
- <span ng-show="dataentryWidget.expand" class='black'><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!dataentryWidget.expand" class='black'><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="dataentryWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!dataentryWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(dataentryWidget)" title="{{'remove'| translate}}"><span class='black'><i class="fa fa-times-circle"></i></span></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(dataentryWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
</span>
</div>
@@ -92,7 +92,7 @@
</thead>
<tr class="col-md-12" ng-repeat="prStDe in currentStage.programStageDataElements">
<td class="col-md-5">
- {{prStDe.dataElement.name}} - {{prStDe.dataElement.type}}
+ {{prStDe.dataElement.name}}
</td>
<td class="col-md-5">
<ng-form name="dataEntryInnerForm">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js 2014-06-27 15:42:43 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js 2014-06-30 05:56:38 +0000
@@ -15,7 +15,7 @@
//listen for the selected items
- $scope.$on('selectedEntity', function(event, args) {
+ $scope.$on('selectedItems', function(event, args) {
//programs for enrollment
$scope.enrollments = [];
$scope.showEnrollmentDiv = false;
@@ -25,14 +25,15 @@
$scope.newEnrollment = {};
var selections = CurrentSelection.get();
- $scope.selectedEntity = selections.tei;
+ $scope.selectedTei = angular.copy(selections.tei);
+ $scope.selectedEntity = selections.te;
$scope.selectedProgram = selections.pr;
$scope.programExists = args.programExists;
$scope.selectedOrgUnit = storage.get('SELECTED_OU');
if($scope.selectedProgram){
- EnrollmentService.getByEntityAndProgram($scope.selectedEntity.trackedEntityInstance, $scope.selectedProgram.id).then(function(data){
+ EnrollmentService.getByEntityAndProgram($scope.selectedTei.trackedEntityInstance, $scope.selectedProgram.id).then(function(data){
$scope.enrollments = data.enrollmentList;
$scope.loadEvents();
});
@@ -61,9 +62,9 @@
$scope.attributesForEnrollment = [];
for(var i=0; i<atts.length; i++){
var exists = false;
- for(var j=0; j<$scope.selectedEntity.attributes.length && !exists; j++){
- if(atts[i].id === $scope.selectedEntity.attributes[j].attribute){
- exists = true;
+ for(var j=0; j<$scope.selectedTei.attributes.length && !exists; j++){
+ if(atts[i].id === $scope.selectedTei.attributes[j].attribute){
+ exists = true;
}
}
if(!exists){
@@ -84,26 +85,15 @@
$scope.programStages.push(stage);
});
});
-
- $scope.broadCastSelections();
- }
- else{
- $scope.broadCastSelections();
- }
+ }
+
+ $scope.broadCastSelections();
};
$scope.showEnrollment = function(){
$scope.showEnrollmentDiv = !$scope.showEnrollmentDiv;
- };
-
- $scope.broadCastSelections = function(){
- CurrentSelection.set({tei: $scope.selectedEntity, pr: $scope.selectedProgram, enrollment: $scope.selectedEnrollment});
- $timeout(function() {
- $rootScope.$broadcast('dashboard', {});
- $rootScope.$broadcast('notesController', {});
- }, 100);
- };
-
+ };
+
$scope.showScheduling = function(){
$scope.showSchedulingDiv = !$scope.showSchedulingDiv;
};
@@ -117,11 +107,11 @@
}
//form is valid, continue with enrollment
- var tei = angular.copy($scope.selectedEntity);
+ var tei = angular.copy($scope.selectedTei);
tei.attributes = [];
//existing attributes
- angular.forEach($scope.selectedEntity.attributes, function(attribute){
+ angular.forEach($scope.selectedTei.attributes, function(attribute){
if(!angular.isUndefined(attribute.value)){
tei.attributes.push({attribute: attribute.attribute, value: attribute.value});
}
@@ -145,7 +135,7 @@
if(updateResponse.status === 'SUCCESS'){
- //registration is successful and continue for enrollment
+ //registration is successful, continue for enrollment
EnrollmentService.enroll(enrollment).then(function(enrollmentResponse){
if(enrollmentResponse.status !== 'SUCCESS'){
//enrollment has failed
@@ -163,15 +153,16 @@
if(attribute.type === 'number' && !isNaN(parseInt(attribute.value))){
attribute.value = parseInt(attribute.value);
}
- $scope.selectedEntity.attributes.push({attribute: attribute.id, value: attribute.value, type: attribute.valueType, displayName: attribute.name});
+ $scope.selectedTei.attributes.push({attribute: attribute.id, value: attribute.value, type: attribute.valueType, displayName: attribute.name});
}
});
enrollment.enrollment = enrollmentResponse.reference;
- CurrentSelection.set({tei: $scope.selectedEntity, pr: $scope.selectedProgram, enrollment: enrollment});
- $timeout(function() {
- $rootScope.$broadcast('dashboard', {});
- }, 100);
+ $scope.selectedEnrollment = enrollment;
+
+ $scope.broadCastSelections();
+
+ $scope.outerForm.submitted = false;
});
}
else{
@@ -186,6 +177,14 @@
});
};
+ $scope.broadCastSelections = function(){
+ CurrentSelection.set({tei: $scope.selectedTei, te: $scope.selectedEntity, pr: $scope.selectedProgram, enrollment: $scope.selectedEnrollment});
+ $timeout(function() {
+ $rootScope.$broadcast('dashboard', {});
+ $rootScope.$broadcast('notesController', {});
+ }, 100);
+ };
+
$scope.cancelEnrollment = function(){
$scope.selectedProgram = '';
};
=== 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-27 15:42:43 +0000
+++ 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
@@ -1,12 +1,12 @@
-<div class="panel panel-info" ng-controller="EnrollmentController">
+<div class="panel panel-primary" ng-controller="EnrollmentController">
<div class="panel-heading">
{{enrollmentWidget.title| translate}}
<span class="pull-right">
<a class="small-horizonal-spacing" href ng-click="expandCollapse(enrollmentWidget)">
- <span ng-show="enrollmentWidget.expand" class='black'><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!enrollmentWidget.expand" class='black'><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="enrollmentWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!enrollmentWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(enrollmentWidget)" title="{{'remove'| translate}}"><span class='black'><i class="fa fa-times-circle"></i></span></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(enrollmentWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
</span>
</div>
<div ng-show="enrollmentWidget.expand" class="panel-body dashboard-widget-container">
=== 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-27 14:49:34 +0000
+++ 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
@@ -1,4 +1,4 @@
-<div class="panel panel-info" ng-controller="NotesController">
+<div class="panel panel-primary" ng-controller="NotesController">
<div class="panel-heading">
{{notesWidget.title| translate}}
<span class="nav-pills" ng-show="selectedEnrollment">
@@ -6,10 +6,10 @@
</span>
<span class="pull-right">
<a class="small-horizonal-spacing" href ng-click="expandCollapse(notesWidget)">
- <span ng-show="notesWidget.expand" class='black'><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!notesWidget.expand" class='black'><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="notesWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!notesWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(notesWidget)" title="{{'remove'| translate}}"><span class='black'><i class="fa fa-times-circle"></i></span></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(notesWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
</span>
</div>
<div ng-show="notesWidget.expand" class="panel-body dashboard-widget-container">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js 2014-06-27 15:42:43 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js 2014-06-30 05:56:38 +0000
@@ -4,6 +4,7 @@
orderByFilter,
CurrentSelection,
TEIService,
+ DialogService,
AttributesFactory,
TranslationService) {
@@ -20,70 +21,69 @@
});
//listen for the selected entity
- $scope.$on('selectedEntity', function(event, args) {
+ $scope.$on('dashboard', function(event, args) {
var selections = CurrentSelection.get();
- $scope.selectedTei = selections.tei;
+ $scope.selectedTei = angular.copy(selections.tei);
$scope.trackedEntity = selections.te;
$scope.selectedProgram = selections.pr;
$scope.selectedEnrollment = selections.enrollment;
+
$scope.processTeiAttributes();
});
//display only those attributes that belong the selected program
//if no program, display attributesInNoProgram
$scope.processTeiAttributes = function(){
-
- angular.forEach($scope.selectedTei.attributes, function(att){
- if(att.type === 'number' && !isNaN(parseInt(att.value))){
- att.value = parseInt(att.value);
- }
- });
-
+
if($scope.selectedProgram && $scope.selectedEnrollment){
- //show only those attributes in selected program
- AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){
-
- $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes);
-
- });
- }
- else{
- //show attributes in no program
- AttributesFactory.getWithoutProgram().then(function(atts){
-
- $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes);
-
+ //show attribute for selected program and enrollment
+ AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){
+ $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, true);
+ });
+ }
+ if($scope.selectedProgram && !$scope.selectedEnrollment){
+ //show attributes for selected program
+ AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){
+ $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, false);
+ });
+ }
+ if(!$scope.selectedProgram && !$scope.selectedEnrollment){
+ //show attributes in no program
+ AttributesFactory.getWithoutProgram().then(function(atts){
+ $scope.selectedTei.attributes = $scope.showRequiredAttributes(atts,$scope.selectedTei.attributes, false);
});
- }
-
- $scope.selectedTei.attributes = orderByFilter($scope.selectedTei.attributes, '-order');
- $scope.selectedTei.attributes.reverse();
+ }
};
- $scope.showRequiredAttributes = function(requiredAttributes, availableAttributes){
-
- var teiAttributes = availableAttributes;
+ $scope.showRequiredAttributes = function(requiredAttributes, teiAttributes, fromEnrollment){
+
//first reset teiAttributes
for(var j=0; j<teiAttributes.length; j++){
teiAttributes[j].show = false;
+ if(teiAttributes[j].type === 'number' && !isNaN(parseInt(teiAttributes[j].value))){
+ teiAttributes[j].value = parseInt(teiAttributes[j].value);
+ }
}
//identify which ones to show
for(var i=0; i<requiredAttributes.length; i++){
var processed = false;
for(var j=0; j<teiAttributes.length && !processed; j++){
- if(requiredAttributes[i].id === teiAttributes[j].attribute){
+ if(requiredAttributes[i].id === teiAttributes[j].attribute){
processed = true;
teiAttributes[j].show = true;
teiAttributes[j].order = i;
}
}
- if(!processed){//attribute was empty, so a chance to put some value
+ if(!processed && fromEnrollment){//attribute was empty, so a chance to put some value
teiAttributes.push({show: true, order: i, attribute: requiredAttributes[i].id, displayName: requiredAttributes[i].name, type: requiredAttributes[i].valueType, value: ''});
}
}
+ teiAttributes = orderByFilter(teiAttributes, '-order');
+ teiAttributes.reverse();
+
return teiAttributes;
};
@@ -113,9 +113,11 @@
};
DialogService.showDialog({}, dialogOptions);
return;
- }
- });
- $scope.editProfile = !$scope.editProfile;
+ }
+
+ $scope.editProfile = !$scope.editProfile;
+ CurrentSelection.set({tei: $scope.selectedTei, te: $scope.trackedEntity, pr: $scope.selectedProgram, enrollment: $scope.selectedEnrollment});
+ });
};
$scope.cancel = function(){
=== 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-27 14:49:34 +0000
+++ 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
@@ -1,4 +1,4 @@
-<div class="panel panel-info" ng-controller="ProfileController">
+<div class="panel panel-primary" ng-controller="ProfileController">
<div class="panel-heading">
{{trackedEntity.name|| 'entity' | translate}} {{profileWidget.title| translate}}
<span class="nav-pills" ng-show="selectedTei.attributes.length">
@@ -6,10 +6,10 @@
</span>
<span class="pull-right">
<a class="small-horizonal-spacing" href ng-click="expandCollapse(profileWidget)">
- <span ng-show="profileWidget.expand" class='black'><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!profileWidget.expand" class='black'><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="profileWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!profileWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(profileWidget)" title="{{'remove'| translate}}"><span class='black'><i class="fa fa-times-circle"></i></span></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(profileWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
</span>
</div>
<div ng-show="profileWidget.expand" class="widget-content-container">
=== 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-27 14:49:34 +0000
+++ 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
@@ -1,12 +1,12 @@
-<div class="panel panel-info" ng-controller="RelationshipController">
+<div class="panel panel-primary" ng-controller="RelationshipController">
<div class="panel-heading">
{{relationshipWidget.title| translate}}
<span class="pull-right">
<a class="small-horizonal-spacing" href ng-click="expandCollapse(relationshipWidget)">
- <span ng-show="relationshipWidget.expand" class='black'><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!relationshipWidget.expand" class='black'><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="relationshipWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!relationshipWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(relationshipWidget)" title="{{'remove'| translate}}"><span class='black'><i class="fa fa-times-circle"></i></span></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(relationshipWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
</span>
</div>
<div ng-show="relationshipWidget.expand" class="panel-body dashboard-element-container">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected-controller.js 2014-06-06 13:35:06 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/selected/selected-controller.js 2014-06-30 05:56:38 +0000
@@ -7,7 +7,7 @@
TranslationService.translate();
//listen for the selected items
- $scope.$on('selectedEntity', function(event, args) {
+ $scope.$on('selectedItems', function(event, args) {
var selections = CurrentSelection.get();
$scope.selectedEntity = selections.tei;
=== 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-27 14:49:34 +0000
+++ 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
@@ -1,12 +1,12 @@
-<div class="panel panel-info" ng-controller="SelectedInfoController">
+<div class="panel panel-primary" ng-controller="SelectedInfoController">
<div class="panel-heading">
{{selectedWidget.title| translate}}
<span class="pull-right">
<a class="small-horizonal-spacing" href ng-click="expandCollapse(selectedWidget)">
- <span ng-show="selectedWidget.expand" class='black'><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
- <span ng-show="!selectedWidget.expand" class='black'><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
+ <span ng-show="selectedWidget.expand"><i class="fa fa-chevron-up" title="{{'collapse'| translate}}"></i></span>
+ <span ng-show="!selectedWidget.expand"><i class="fa fa-chevron-down" title="{{'expand'| translate}}"></i></span>
</a>
- <a class="small-horizonal-spacing" href ng-click="removeWidget(selectedWidget)" title="{{'remove'| translate}}"><span class='black'><i class="fa fa-times-circle"></i></span></a>
+ <a class="small-horizonal-spacing" href ng-click="removeWidget(selectedWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>
</span>
</div>
<div ng-show="selectedWidget.expand" class="panel-body dashboard-element-container">
=== 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-27 13:33:07 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-06-30 05:56:38 +0000
@@ -281,8 +281,8 @@
};
$scope.showDashboard = function(currentEntity){
- $location.path('/dashboard').search({selectedEntityId: currentEntity.id,
- selectedProgramId: $scope.selectedProgram ? $scope.selectedProgram.id: null});
+ $location.path('/dashboard').search({tei: currentEntity.id,
+ program: $scope.selectedProgram ? $scope.selectedProgram.id: null});
};
$scope.getHelpContent = function(){
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-06-27 13:33:07 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-06-30 05:56:38 +0000
@@ -478,18 +478,7 @@
query.hasValue = true;
q += 'LT:' + attribute.endValue + ':';
}
- }
-
- /*if(attribute.startDate && attribute.startDate !== ''){
- query.hasValue = true;
- q += 'GE:' + attribute.startDate + ':';
- }
-
- if(attribute.endDate && attribute.endDate !== ''){
- query.hasValue = true;
- q += 'LE:' + attribute.endDate + ':';
- }*/
-
+ }
if(query.url){
if(q){
q = q.substr(0,q.length-1);
@@ -534,32 +523,8 @@
query.url = 'filter=' + attribute.id + ':LIKE:' + attribute.value;
}
}
-
}
-
- /*if(attribute.filters){
- var q = '';
- angular.forEach(attribute.filters, function(filter){
- if(filter.value !== ''){
- q += filter.operator + ':' + filter.value + ':';
- }
- });
- q = q.substr(0,q.length-1);
-
- if(query.url){
- if(q){
- query.url = query.url + '&filter=' + attribute.id + ':' + q;
- }
- }
- else{
- if(q){
- query.url = 'filter=' + attribute.id + ':' + q;
- }
- }
- }*/
- }
-
-
+ }
});
if(enrollment){
@@ -579,17 +544,7 @@
query.hasValue = true;
q += '&programEndDate=' + enrollment.programEndDate;
}
- }
-
- /*if(enrollment.programStartDate && enrollment.programStartDate !== ''){
- query.hasValue = true;
- q += '&programStartDate=' + enrollment.programStartDate;
- }
- if(enrollment.programEndDate && enrollment.programEndDate !== ''){
- query.hasValue = true;
- q += '&programEndDate=' + enrollment.programEndDate;
- }*/
-
+ }
if(q){
if(query.url){
query.url = query.url + q;
=== 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-20 14:23:28 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-06-30 05:56:38 +0000
@@ -134,6 +134,7 @@
//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');
=== 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-27 14:49:34 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-06-30 05:56:38 +0000
@@ -920,6 +920,8 @@
.dropdown-menu {
margin-top: -5px;
+ margin-left: 0;
+ margin-right: 0;
}
.btn-link {
@@ -929,4 +931,12 @@
label{
font-weight:normal !important
+}
+
+a {
+ color: inherit;
+}
+
+a:hover {
+ color: inherit;
}
\ No newline at end of file