dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43174
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21930: tracker-capture: some fix to upcoming events
------------------------------------------------------------
revno: 21930
committer: Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-02-10 10:32:32 +0100
message:
tracker-capture: some fix to upcoming events
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.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-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js 2016-02-09 15:59:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js 2016-02-10 09:32:32 +0000
@@ -284,7 +284,10 @@
}
});
-
+ $scope.hideDatePicker = function(){
+ $scope.datePicker.visible = !$scope.datePicker.visible;
+ $scope.selectedDate = $scope.dates[0];
+ };
$scope.generateReportHeader = function(){
return TEIGridService.getHeader($scope.gridColumns);
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html 2016-02-09 15:59:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html 2016-02-10 09:32:32 +0000
@@ -80,58 +80,48 @@
<input type="checkbox" ng-change="markForFollowup()" ng-model="displayMode.onlyMarkedFollowup"/> {{'only_marked_for_followup'| translate}}
</label>
</td>
- </tr>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-8 col-md-6">
+ <table class="table-borderless">
<tr>
<td>
- {{'date'| translate}}
+ {{'date'| translate}}
+ <a class="pull-right mouse-pointer" title="{{'close' | translate}}" ng-if="datePicker.visible" ng-click="hideDatePicker()">
+ <i class="fa fa-times-circle"></i>
+ </a>
</td>
- <td>
+ <td ng-show="!datePicker.visible">
<select ng-model="selectedDate" class="form-control"
ng-options="date as date.name for date in dates | orderBy: 'numOfDays'">
</select>
</td>
- </tr>
- </table>
- </div>
-
- <div class="col-md-5 trim" ng-if="!datePicker.visible">
- <div class="row row-with-go-button">
- <button type="button" class="btn btn-primary" ng-click="generateReport()" ng-disabled="!selectedProgram">{{'go'| translate}}</button>
- <button type="button"
- class="btn btn-success small-horizonal-spacing"
- ng-if="upcomingEvents.length > 0"
- onclick="javascript:window.print()">
- {{'print'| translate}}
- </button>
- <button type="button"
- class="btn btn-info small-horizonal-spacing"
- ng-if="upcomingEvents.length > 0"
- ng-csv="generateReportData()"
- csv-header="generateReportHeader()"
- filename="upcomingEvents.csv">
- {{'excel_export'| translate}}
- </button>
- </div>
- </div>
- </div>
- <div class="row" ng-if="datePicker.visible">
- <div class="col-sm-8 col-md-6">
- <table class="table-borderless">
- <tr>
- <td>
- <input type="text"
- name="reportStartDate"
- placeholder="{{'start_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})"
- class="form-control"
- d2-date
- ng-model="report.startDate"
- min-date="today"
- ng-required="true"/>
- <span ng-show="outerForm.submitted && outerForm.reportStartDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})</span>
- </td>
- <td>
- <input type="text" name="reportEndDate" placeholder="{{'end_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})" class="form-control" d2-date ng-model="report.endDate" min-date="today" ng-required="true"/>
- <span ng-show="outerForm.submitted && outerForm.reportEndDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})</span>
+ <td ng-show="datePicker.visible">
+ <div>
+ <input type="text"
+ name="reportStartDate"
+ placeholder="{{'start_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})"
+ class="form-control"
+ d2-date
+ ng-model="report.startDate"
+ min-date="today"
+ ng-required="true"/>
+ <span ng-show="outerForm.submitted && outerForm.reportStartDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})</span>
+ </div>
+ <div>
+ <input type="text"
+ name="reportEndDate"
+ placeholder="{{'end_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})"
+ class="form-control"
+ d2-date
+ ng-model="report.endDate"
+ min-date="today"
+ ng-required="true"/>
+ <span ng-show="outerForm.submitted && outerForm.reportEndDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})</span>
+ </div>
</td>
</tr>
</table>