dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31443
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16016: tracker capture - if exists use dataelement formName in data entry; reports, WIP
------------------------------------------------------------
revno: 16016
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Tue 2014-07-08 10:30:39 +0200
message:
tracker capture - if exists use dataelement formName in data entry; reports, WIP
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/registration/registration.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report.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/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
--
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-07-07 11:46:45 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-07-08 08:30:39 +0000
@@ -104,62 +104,62 @@
</thead>
<tr class="col-md-12" ng-repeat="prStDe in currentStage.programStageDataElements">
<td class="col-md-5">
- {{prStDe.dataElement.name}}
+ {{prStDe.dataElement.formName ? prStDe.dataElement.formName : prStDe.dataElement.name}}
</td>
<td class="col-md-5">
- <ng-form name="dataEntryInnerForm">
- <div ng-switch="prStDe.dataElement.type">
- <div ng-switch-when="int">
- <input type="number"
- ng-class='getClass(prStDe.dataElement.id)'
- ng-model="currentEvent[prStDe.dataElement.id]"
- ng-required={{prStDe.compulsory}}
- ng-blur="saveDatavalue(prStDe)"
- name="foo"/>
- <span ng-show="dataEntryOuterForm.submitted && dataEntryInnerForm.foo.$invalid" class="error">{{'number_required'| translate}}</span>
- </div>
- <div ng-switch-when="string">
- <input type="text"
- ng-class='getClass(prStDe.dataElement.id)'
- ng-model="currentEvent[prStDe.dataElement.id]"
- ng-required={{prStDe.compulsory}}
- typeahead="option for option in prStDe.dataElement.optionSet.options | filter:$viewValue | limitTo:20"
- typeahead-open-on-focus
- ng-blur="saveDatavalue(prStDe)"
- name="foo"/>
- </div>
- <div ng-switch-when="bool">
- <select ng-class='getClass(prStDe.dataElement.id)'
- ng-model="currentEvent[prStDe.dataElement.id]"
- ng-required={{prStDe.compulsory}}
- ng-change="saveDatavalue(prStDe)"
- name="foo">
- <option value="">{{'please_select'| translate}}</option>
- <option value="0">{{'no'| translate}}</option>
- <option value="1">{{'yes'| translate}}</option>
- </select>
+ <ng-form name="dataEntryInnerForm">
+ <div ng-switch="prStDe.dataElement.type">
+ <div ng-switch-when="int">
+ <input type="number"
+ ng-class='getClass(prStDe.dataElement.id)'
+ ng-model="currentEvent[prStDe.dataElement.id]"
+ ng-required={{prStDe.compulsory}}
+ ng-blur="saveDatavalue(prStDe)"
+ name="foo"/>
+ <span ng-show="dataEntryOuterForm.submitted && dataEntryInnerForm.foo.$invalid" class="error">{{'number_required'| translate}}</span>
+ </div>
+ <div ng-switch-when="string">
+ <input type="text"
+ ng-class='getClass(prStDe.dataElement.id)'
+ ng-model="currentEvent[prStDe.dataElement.id]"
+ ng-required={{prStDe.compulsory}}
+ typeahead="option for option in prStDe.dataElement.optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead-open-on-focus
+ ng-blur="saveDatavalue(prStDe)"
+ name="foo"/>
+ </div>
+ <div ng-switch-when="bool">
+ <select ng-class='getClass(prStDe.dataElement.id)'
+ ng-model="currentEvent[prStDe.dataElement.id]"
+ ng-required={{prStDe.compulsory}}
+ ng-change="saveDatavalue(prStDe)"
+ name="foo">
+ <option value="">{{'please_select'| translate}}</option>
+ <option value="0">{{'no'| translate}}</option>
+ <option value="1">{{'yes'| translate}}</option>
+ </select>
- </div>
- <div ng-switch-when="date">
- <input type="text"
- placeholder="yyyy-mm-dd"
- ng-date
- ng-class='getClass(prStDe.dataElement.id)'
- ng-model="currentEvent[prStDe.dataElement.id]"
- ng-required={{prStDe.compulsory}}
- blur-or-change="saveDatavalue(dhis2Event, eventGridColumn.id)"
- name="foo"/>
- </div>
- </div>
- </ng-form>
- </td>
- <td class="col-md-2" ng-if="allowProvidedElsewhereExists">
- <div class="align-center" ng-show="prStDe.allowProvidedElsewhere">
- <input type="checkbox"
- ng-model="currentEvent.providedElsewhere[prStDe.dataElement.id]"
- ng-change="saveDatavalueLocation(prStDe)"/>
- </div>
- </td>
+ </div>
+ <div ng-switch-when="date">
+ <input type="text"
+ placeholder="yyyy-mm-dd"
+ ng-date
+ ng-class='getClass(prStDe.dataElement.id)'
+ ng-model="currentEvent[prStDe.dataElement.id]"
+ ng-required={{prStDe.compulsory}}
+ blur-or-change="saveDatavalue(dhis2Event, eventGridColumn.id)"
+ name="foo"/>
+ </div>
+ </div>
+ </ng-form>
+ </td>
+ <td class="col-md-2" ng-if="allowProvidedElsewhereExists">
+ <div class="align-center" ng-show="prStDe.allowProvidedElsewhere">
+ <input type="checkbox"
+ ng-model="currentEvent.providedElsewhere[prStDe.dataElement.id]"
+ ng-change="saveDatavalueLocation(prStDe)"/>
+ </div>
+ </td>
</tr>
</table>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2014-07-04 14:36:11 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2014-07-08 08:30:39 +0000
@@ -1,106 +1,104 @@
-<div class="bordered-div col-md-12" ng-controller="RegistrationController">
- <div class="registration-container">
- <form name="outerForm" novalidate>
-
- <div ng-if='!selectedProgram'>
- <h3>{{'category' | translate}}</h3>
- <table class="table-borderless table-striped">
- <tr>
- <td>
- {{'entity_type' | translate}}
- </td>
- <td>
- <select class="form-control" ng-model="trackedEntities.selected" ng-options="trackedEntity.name for trackedEntity in trackedEntities.available | orderBy: 'name'">
- </select>
- </td>
- </tr>
- </table>
- <hr>
- </div>
-
- <h3>{{'profile' | translate}}</h3>
- <table class="table-borderless table-striped">
- <tr ng-repeat="attribute in attributes">
- <td>
- {{attribute.name}}
- </td>
- <td>
- <ng-form name="innerForm">
- <div ng-switch="attribute.valueType">
- <div ng-switch-when="date">
- <input type="text" name="foo" class="form-control" ng-date ng-model="attribute.value" ng-required="attribute.mandatory" />
- <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
- </div>
- <div ng-switch-when="trueOnly">
- <input type="checkbox" name="foo" class="form-control" ng-model="attribute.value" ng-required="attribute.mandatory" />
- <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
- </div>
- <div ng-switch-when="bool">
- <select name="foo" ng-model="attribute.value" class="form-control" ng-required="attribute.mandatory">
- <option value="">{{'please_select'| translate}}</option>
- <option value="0">{{'no'| translate}}</option>
- <option value="1">{{'yes'| translate}}</option>
- </select>
- <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
- </div>
- <div ng-switch-when="optionSet">
- <input type="text"
- name="foo"
- class="form-control"
- ng-model="attribute.value"
- typeahead="option for option in attribute.optionSet.options | filter:$viewValue | limitTo:20"
- typeahead-open-on-focus
- ng-required="attribute.mandatory"
- />
- <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
- </div>
- <div ng-switch-when="number">
- <input type="number" name="foo" class="form-control" ng-model="attribute.value" ng-required="attribute.mandatory"/>
- <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
- </div>
- <div ng-switch-default>
- <input type="text" name="foo" class="form-control" ng-model="attribute.value" ng-required="attribute.mandatory"/>
- <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
- </div>
- </div>
- </ng-form>
- </td>
- </tr>
- </table>
-
- <div ng-if='selectedProgram'>
- <hr>
- <h3>{{'enrollment' | translate}}</h3>
- <table class="dhis2-list-table-striped dhis2-table-hover">
- <tr>
- <td>
- {{selectedProgram.dateOfEnrollmentDescription}}
- </td>
- <td>
- <input type="text" name="dateOfEnrollment" class="form-control" ng-date ng-model="enrollment.incidentDate" ng-required="true"/>
- <span ng-show="outerForm.submitted && outerForm.dateOfEnrollment.$invalid" class="error">{{'required'| translate}}</span>
- </td>
- </tr>
- <tr ng-if="selectedProgram.displayIncidentDate">
- <td>
- {{selectedProgram.dateOfIncidentDescription}}
- </td>
- <td>
- <input type="text" class="form-control" ng-date ng-model="enrollment.enrollmentDate" />
- </td>
- </tr>
- </table>
- </div>
-
- <div ng-if="!valueExists && outerForm.submitted">
- <div class="alert alert-warning">{{'form_is_empty_fill_at_least_one'| translate}}</div>
- </div>
-
- <div class="vertical-spacing">
- <button type="button" class="btn btn-primary" ng-click="registerEntity('DASHBOARD')">{{'save_and_continue'| translate}}</button>
- <button type="button" class="btn btn-success small-horizonal-spacing" ng-click="registerEntity('SELF')">{{'save_and_add_new'| translate}}</button>
- <button type="button" class="btn btn-default small-horizonal-spacing" ng-click="showRegistration()">{{'cancel'| translate}}</button>
- </div>
- </form>
- </div>
+<div class="bordered-div col-md-12" ng-controller="RegistrationController">
+ <form name="outerForm" novalidate>
+
+ <div ng-if='!selectedProgram'>
+ <h3>{{'category' | translate}}</h3>
+ <table class="table-borderless table-striped">
+ <tr>
+ <td>
+ {{'entity_type' | translate}}
+ </td>
+ <td>
+ <select class="form-control" ng-model="trackedEntities.selected" ng-options="trackedEntity.name for trackedEntity in trackedEntities.available | orderBy: 'name'">
+ </select>
+ </td>
+ </tr>
+ </table>
+ <hr>
+ </div>
+
+ <h3>{{'profile' | translate}}</h3>
+ <table class="table-borderless table-striped">
+ <tr ng-repeat="attribute in attributes">
+ <td>
+ {{attribute.name}}
+ </td>
+ <td>
+ <ng-form name="innerForm">
+ <div ng-switch="attribute.valueType">
+ <div ng-switch-when="date">
+ <input type="text" name="foo" class="form-control" ng-date ng-model="attribute.value" ng-required="attribute.mandatory" />
+ <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
+ </div>
+ <div ng-switch-when="trueOnly">
+ <input type="checkbox" name="foo" class="form-control" ng-model="attribute.value" ng-required="attribute.mandatory" />
+ <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
+ </div>
+ <div ng-switch-when="bool">
+ <select name="foo" ng-model="attribute.value" class="form-control" ng-required="attribute.mandatory">
+ <option value="">{{'please_select'| translate}}</option>
+ <option value="0">{{'no'| translate}}</option>
+ <option value="1">{{'yes'| translate}}</option>
+ </select>
+ <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
+ </div>
+ <div ng-switch-when="optionSet">
+ <input type="text"
+ name="foo"
+ class="form-control"
+ ng-model="attribute.value"
+ typeahead="option for option in attribute.optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead-open-on-focus
+ ng-required="attribute.mandatory"
+ />
+ <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
+ </div>
+ <div ng-switch-when="number">
+ <input type="number" name="foo" class="form-control" ng-model="attribute.value" ng-required="attribute.mandatory"/>
+ <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
+ </div>
+ <div ng-switch-default>
+ <input type="text" name="foo" class="form-control" ng-model="attribute.value" ng-required="attribute.mandatory"/>
+ <span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}}</span>
+ </div>
+ </div>
+ </ng-form>
+ </td>
+ </tr>
+ </table>
+
+ <div ng-if='selectedProgram'>
+ <hr>
+ <h3>{{'enrollment' | translate}}</h3>
+ <table class="dhis2-list-table-striped dhis2-table-hover">
+ <tr>
+ <td>
+ {{selectedProgram.dateOfEnrollmentDescription}}
+ </td>
+ <td>
+ <input type="text" name="dateOfEnrollment" class="form-control" ng-date ng-model="enrollment.incidentDate" ng-required="true"/>
+ <span ng-show="outerForm.submitted && outerForm.dateOfEnrollment.$invalid" class="error">{{'required'| translate}}</span>
+ </td>
+ </tr>
+ <tr ng-if="selectedProgram.displayIncidentDate">
+ <td>
+ {{selectedProgram.dateOfIncidentDescription}}
+ </td>
+ <td>
+ <input type="text" class="form-control" ng-date ng-model="enrollment.enrollmentDate" />
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div ng-if="!valueExists && outerForm.submitted">
+ <div class="alert alert-warning">{{'form_is_empty_fill_at_least_one'| translate}}</div>
+ </div>
+
+ <div class="vertical-spacing">
+ <button type="button" class="btn btn-primary" ng-click="registerEntity('DASHBOARD')">{{'save_and_continue'| translate}}</button>
+ <button type="button" class="btn btn-success small-horizonal-spacing" ng-click="registerEntity('SELF')">{{'save_and_add_new'| translate}}</button>
+ <button type="button" class="btn btn-default small-horizonal-spacing" ng-click="showRegistration()">{{'cancel'| translate}}</button>
+ </div>
+ </form>
</div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js 2014-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js 2014-07-08 08:30:39 +0000
@@ -9,28 +9,12 @@
TranslationService.translate();
- $scope.ouModes = [{name: 'SELECTED'},
- {name: 'CHILDREN'},
- {name: 'DESCENDANTS'},
- {name: 'ACCESSIBLE'}
- ];
+ $scope.ouModes = [{name: 'SELECTED'}, {name: 'CHILDREN'}, {name: 'DESCENDANTS'}, {name: 'ACCESSIBLE'}];
$scope.selectedOuMode = $scope.ouModes[0];
- $scope.$on('dashboard', function(event, args) {
- var selections = CurrentSelection.get();
- $scope.selectedOrgUnit = storage.get('SELECTED_OU');
- $scope.selectedEntity = selections.tei;
- $scope.selectedProgram = selections.pr;
- $scope.selectedEnrollment = selections.enrollment;
-
- if($scope.selectedOrgUnit &&
- $scope.selectedProgram &&
- $scope.selectedEntity &&
- $scope.selectedEnrollment){
-
- $scope.getEvents();
- }
- });
+
+
+
$scope.getEvents = function(){
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report.html 2014-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report.html 2014-07-08 08:30:39 +0000
@@ -1,57 +1,42 @@
-<div class="bordered-div" ng-controller="ReportController">
-
- <div class="report-container">
- <form name="outerForm" novalidate>
- <h3>{{selectedProgram.name}} {{'report'| translate}}</h3>
- <hr>
- <table class="table-borderless">
- <tr>
- <td>{{'org_unit'| translate}}</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/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="descendants" value="DESCENDANTS"> {{'DESCENDANTS'| translate}}</label><br/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="accessible" value="ACCESSIBLE"> {{'ACCESSIBLE'| translate}}</label>
- </td>
- </tr>
- <tr>
- <td>
- <input type="text" name="startDate" placeholder="{{'start_date'| translate}}" class="form-control" ng-date ng-model="startDate" ng-required="true"/>
- </td>
- <td>
- <input type="text" name="endDate" placeholder="{{'end_date'| translate}}" class="form-control" ng-date ng-model="endDate" ng-required="true"/>
- </td>
- </tr>
- </table>
- <div class="row col-md-12 vertical-spacing">
- <button type="button" class="btn btn-primary" ng-click="generateReport()">{{'generate'| translate}}</button>
- <button type="button" class="btn btn-default small-horizonal-spacing" ng-click="showReport()">{{'close'| translate}}</button>
- </div>
- </form>
- <!--<h3>{{selectedProgram.name}} {{'report'| translate}}</h3>
- <hr>
- <table class="table-borderless">
- <tr>
- <td>{{'org_unit'| translate}}</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/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="descendants" value="DESCENDANTS"> {{'DESCENDANTS'| translate}}</label><br/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="accessible" value="ACCESSIBLE"> {{'ACCESSIBLE'| translate}}</label>
- </td>
- </tr>
- <tr>
- <td>
- <input type="text" name="startDate" placeholder="{{'start_date'| translate}}" class="form-control" ng-date ng-model="startDate" ng-required="true"/>
- </td>
- <td>
- <input type="text" name="endDate" placeholder="{{'end_date'| translate}}" class="form-control" ng-date ng-model="endDate" ng-required="true"/>
- </td>
- </tr>
- </table>
- <div class="row col-md-12 vertical-spacing">
- <button type="button" class="btn btn-primary" ng-click="generateReport()">{{'generate'| translate}}</button>
- <button type="button" class="btn btn-default small-horizonal-spacing" ng-click="showReport()">{{'close'| translate}}</button>
- </div>-->
+<div class="bordered-div" ng-controller="ReportController">
+ <form name="outerForm" novalidate>
+ <div class="row">
+ <div class="col-md-6">
+ <table class="table-borderless">
+ <tr>
+ <td>{{'org_unit'| translate}}</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/>
+ <label><input type="radio" ng-model="selectedOuMode.name" name="descendants" value="DESCENDANTS"> {{'DESCENDANTS'| translate}}</label><br/>
+ <label><input type="radio" ng-model="selectedOuMode.name" name="accessible" value="ACCESSIBLE"> {{'ACCESSIBLE'| translate}}</label>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-6">
+ <table class="table-borderless">
+ <tr>
+ <td>
+ <input type="text" name="startDate" placeholder="{{'start_date'| translate}}" class="form-control" ng-date ng-model="startDate" ng-required="true"/>
+ </td>
+ <td>
+ <input type="text" name="endDate" placeholder="{{'end_date'| translate}}" class="form-control" ng-date ng-model="endDate" ng-required="true"/>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="col-md-6 trim">
+ <button type="button" class="btn btn-primary" ng-click="generateReport()">{{'go'| translate}}</button>
+ <button type="button" class="btn btn-default small-horizonal-spacing" ng-click="showReport()">{{'cancel'| translate}}</button>
+ </div>
+ </div>
+ </form>
+ <div class="row" ng-if="!selectedProgram">
+ <div class="col-md-12 vertical-spacing">
+ <div class="alert alert-warning">{{'please_select_program_report'| translate}}</div>
+ </div>
</div>
-</div>
\ No newline at end of file
+</div>
=== 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-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-07-08 08:30:39 +0000
@@ -5,6 +5,7 @@
"please_select": "[Please select]",
"please_select_a_program": "[Please select a program]",
"please_select_a_program_for_enrollment": "Please select a program for enrollment.",
+ "please_select_program_report": "Please select a program for reporting.",
"please_select_a_relationship": "Please select a relationship",
"no_relationship": "No relationship exists.",
"relationship_not_possible": "No tracked entity instance, relationship not possible.",
@@ -44,6 +45,7 @@
"next": "Next",
"last": "Last",
"dashboard": "Go to dashboard",
+ "go": "Go",
"edit": "Edit",
"edit_profile": "Edit profile",
"association": "Manage associations",
=== 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-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-07-08 08:30:39 +0000
@@ -42,6 +42,7 @@
$scope.defaultOperators = OperatorFactory.defaultOperators;
$scope.boolOperators = OperatorFactory.boolOperators;
$scope.enrollment = {programStartDate: '', programEndDate: '', operator: $scope.defaultOperators[0]};
+ $scope.searchState = true;
$scope.searchMode = {
listAll: 'LIST_ALL',
@@ -293,8 +294,10 @@
$scope.showRegistrationDiv = !$scope.showRegistrationDiv;
$scope.showTrackedEntityDiv = false;
$scope.showSearchDiv = false;
+ $scope.searchState = false;
if(!$scope.showRegistrationDiv){
+ $scope.searchState = true;
$scope.doSearch = true;
$scope.getProgramAttributes($scope.selectedProgram);
}
@@ -304,8 +307,10 @@
$scope.showReportDiv = !$scope.showReportDiv;
$scope.showTrackedEntityDiv = false;
$scope.showSearchDiv = false;
+ $scope.searchState = false;
if(!$scope.showReportDiv){
+ $scope.searchState = true;
$scope.doSearch = true;
$scope.getProgramAttributes($scope.selectedProgram);
}
=== 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-07-04 10:10:13 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-07-08 08:30:39 +0000
@@ -434,7 +434,7 @@
return $.ajax( {
url: '../api/programStages.json',
type: 'GET',
- data: 'filter=id:eq:' + id +'&fields=id,name,dataEntryForm,reportDateDescription,minDaysFromStart,repeatable,programStageDataElements[displayInReports,allowProvidedElsewhere,allowDateInFuture,compulsory,dataElement[id,name,type,optionSet[id]]]'
+ data: 'filter=id:eq:' + id +'&fields=id,name,dataEntryForm,reportDateDescription,minDaysFromStart,repeatable,programStageDataElements[displayInReports,allowProvidedElsewhere,allowDateInFuture,compulsory,dataElement[id,name,formName,type,optionSet[id]]]'
}).done( function( response ){
_.each( _.values( response.programStages ), function( programStage ) {
dhis2.tc.store.set( 'programStages', programStage );
=== 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-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-07-08 08:30:39 +0000
@@ -68,44 +68,6 @@
width: 264px;
}
-/*----------------------------------------------------------------------------*/
-/* Table
-/*----------------------------------------------------------------------------*/
-
-table {
- font-size: 13px;
- line-height: 18px;
- margin-bottom: 10px;
-}
-
-/*----------------------------------------------------------------------------*/
-/* Button list
-/*----------------------------------------------------------------------------*/
-
-.buttons
-{
- text-align:right;
- padding-bottom:10px;
- width:100%;
-}
-
-div.actions
-{
- float: right;
- width: 140px;
- text-align: right;
-}
-
-/*----------------------------------------------------------------------------*/
-/* Data entry form
-/*----------------------------------------------------------------------------*/
-
-.entryScreen {
- margin-bottom: 20px;
- width: 100%;
- font-size: 13px;
- line-height: 18px;
-}
/*----------------------------------------------------------------------------*/
/* Program-stage-instances
@@ -115,27 +77,12 @@
overflow: scroll;
}
-.arrow-container {
- font-size: 25px;
- width: 10px;
-}
-
-.stage-flow {
- height:100px;
- overflow: scroll;
-}
-
.table-flow {
height:100px;
overflow-x:hidden;
overflow-y:hidden;
}
-div.orgunit-object {
- margin-left: 5px;
- width: 120px;
-}
-
.align-center {
text-align: center;
}
@@ -195,107 +142,6 @@
display: block;
}
-input.stage-object[type="button"] {
- width: 135px;
- height: 60px;
- cursor: pointer;
- opacity: 1.0;
- border: 2px solid;
- margin: 5px;
- white-space: normal;
-}
-
-input.stage-object[type="button"]:hover {
- border: 5px solid;
-}
-
-input.stage-object-selected[type="button"] {
- border: 5px solid;
-}
-
-input.stage-scheduled[type="button"] {
- border: 5px solid;
-}
-
-input.entity-instance-object[type="button"] {
- width: 130px;
- height: 60px;
- border-color: #bbbbbb;
- background-color: #ddd;
- cursor: pointer;
- border: 1px solid #aaa;
- margin: 5px;
- border-radius: 2px;
-}
-
-input.patient-object[type="button"] {
- width: 130px;
- height: 60px;
- border-color: #bbbbbb;
- background-color: #ddd;
- cursor: pointer;
- border: 1px solid #aaa;
- margin: 5px;
- border-radius: 2px;
-}
-
-div.dashboard-history {
- z-index:100;
- width:300px;
- height:200px;
- position:absolute;
- left:650px;
- top:115px;
- background-color:#ffffff;
- border:1px solid #d0d0d0;
- padding: 1px;
-}
-
-/*----------------------------------------------------------------------------*/
-/* Program tracking
-/*----------------------------------------------------------------------------*/
-
-div.link-area-tracking {
- display:inline-block;
- border:1px solid #d0d0d0;
- padding: 1px 1px 0 1px;
- height:200px;
- width:60%;
- overflow:hidden;
-}
-
-.gridTable th, .gridTable td {
- line-height: 200%;
-}
-
-/* Treepanel contextmenu */
-#treepanel-contextmenu {
- border-radius: 2px;
- border-width: 1px;
- border-style: solid;
- border-color: #aaa;
-}
-
-/*----------------------------------------------------------------------------*/
-/* Capture Coordinates
-/*----------------------------------------------------------------------------*/
-
-.coordinates1 {
- width: 110px;
- white-space: normal;
-}
-
-.coordinates2 {
- width: 150px;
-}
-
-
-.commentHeader {
- color: #606060;
- font-size: 17px;
- padding: 5px 0;
-}
-
/*----------------------------------------------------------------------------*/
/* App - specific
@@ -594,11 +440,6 @@
overflow-y: scroll;
}
-.registration-container, report-container {
- margin-top: 20px;
- margin-bottom: 10px;
-}
-
.widget-content-container{
padding: 20px 10px;
}
@@ -650,7 +491,7 @@
input[type=number], input[type=text], input[type=password], textarea, select {
border: 1px solid #aaa;
- padding: 6px 8px;
+ padding: 2px 4px;
font-size: 14px;
}
@@ -752,7 +593,7 @@
display: block;
width: 100%;
height: 34px;
- padding: 6px 6px;
+ padding: 2px 4px;
font-size: 14px;
line-height: 1.0;
color: #555;
@@ -771,7 +612,7 @@
.form-control-program {
width: 40%;
height: 34px;
- padding: 6px 6px;
+ padding: 2px 4px;
font-size: 14px;
line-height: 1.0;
color: #555;
@@ -792,7 +633,7 @@
display: block;
width: 100%;
height: 30px;
- padding: 6px 6px;
+ padding: 2px 4px;
font-size: 14px;
line-height: 1.0;
color: #555;
@@ -814,7 +655,7 @@
.select-drop-down-button{
text-align: left;
- padding: 6px 12px;
+ padding: 2px 4px;
color: #999;
}
=== 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-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-07-08 08:30:39 +0000
@@ -13,12 +13,15 @@
<!-- top bar begins -->
<div class="row top-bar">
<div class="col-sm-12">
- <span ng-if='showSearchDiv || !showRegistrationDiv'>
+ <span ng-if='searchState'>
{{'search'| translate}} {{selectedProgram.trackedEntity.name}}
</span>
<span ng-if='showRegistrationDiv'>
{{'register'| translate}} {{selectedProgram.trackedEntity.name}}
</span>
+ <span ng-if='showReportDiv'>
+ {{selectedProgram.name}} {{'report'| translate}}
+ </span>
<div class="pull-right">
<div class="btn-group" dropdown is-open="status.isopen">
<button type="button" class="btn btn-default dropdown-toggle" ng-disabled="trackedEntityList.rows.length <= 0">
@@ -54,10 +57,10 @@
</div>
</div>
<div id="searchDropDownParent" class="input-group col-md-5">
- <input type="text" placeholder="{{'type_here_for_simple_search'| translate}}" ng-model="searchText" class="form-control expanded" ng-class="{true: 'invalid-input'} [!searchText && emptySearchText]" ng-focus="showHideSearch()" ng-disabled="showRegistrationDiv">
+ <input type="text" placeholder="{{'type_here_for_simple_search'| translate}}" ng-model="searchText" class="form-control expanded" ng-class="{true: 'invalid-input'} [!searchText && emptySearchText]" ng-focus="showHideSearch()" ng-disabled="showRegistrationDiv || showReportDiv">
<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="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 without-border-radius trim" type="button" title="{{'advanced_search'| translate}}" data-toggle="dropdown" ng-click="showHideSearch()" ng-disabled="showRegistrationDiv || showReportDiv"><i class="fa fa-caret-down"></i></button>
+ <button class="btn btn-primary trim" type="button" title="{{'search'| translate}}" ng-disabled="showRegistrationDiv || showReportDiv" 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>
@@ -90,7 +93,7 @@
<!--- Error display for search begins -->
<div class="row" ng-if="emptySearchAttribute || !searchText && emptySearchText">
<div class="col-md-8 vertical-spacing">
- <div class="alert alert-danger">{{'search_input_required'| translate}}</div>
+ <div class="alert alert-warning">{{'search_input_required'| translate}}</div>
</div>
</div>
<!--- Error display for search ends -->