dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33468
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17083: directive name change from ngDate to d2Date
------------------------------------------------------------
revno: 17083
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-10-13 17:05:01 +0200
message:
directive name change from ngDate to d2Date
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html
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/scripts/directives.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
dhis-2/dhis-web/dhis-web-apps/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-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html 2014-10-13 15:05:01 +0000
@@ -69,12 +69,12 @@
<div class="row">
<div class="col-md-6">
{{currentDummyEvent.reportDateDescription}}
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="eventDate" class="form-control" ng-date ng-model="currentDummyEvent.eventDate" ng-required="false"/>
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="eventDate" class="form-control" d2-date ng-model="currentDummyEvent.eventDate" ng-required="false"/>
<span ng-if="eventCreationForm.submitted && eventCreationForm.eventDate.$invalid" class="error">{{'required'| translate}}</span>
</div>
<div class="col-md-6">
{{'due_date'| translate}}
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="dueDate" class="form-control" ng-date ng-model="currentDummyEvent.dueDate" ng-required="true"/>
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="dueDate" class="form-control" d2-date ng-model="currentDummyEvent.dueDate" ng-required="true"/>
<span ng-if="eventCreationForm.submitted && eventCreationForm.dueDate.$invalid" class="error">{{'required'| translate}}</span>
</div>
</div>
@@ -95,7 +95,7 @@
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
class="form-control"
ng-class="{'input-success': eventDateSaved}"
- ng-date
+ d2-date
ng-model="currentEvent.eventDate"
ng-disabled="currentEvent.status === 'SKIPPED'"
ng-required="true"
@@ -113,7 +113,7 @@
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
class="form-control"
ng-class="{'input-success': dueDateSaved}"
- ng-date
+ d2-date
ng-model="currentEvent.dueDate"
blur-or-change="saveDueDate()"
ng-disabled="currentEvent.eventDate || !schedulingEnabled"/>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2014-10-09 13:41:37 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2014-10-13 15:05:01 +0000
@@ -89,7 +89,7 @@
<div ng-switch-when="date">
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
- ng-date
+ d2-date
ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html 2014-10-13 15:05:01 +0000
@@ -25,7 +25,7 @@
{{selectedProgram.dateOfEnrollmentDescription}}
</td>
<td class="col-md-6">
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" class="form-control" ng-date ng-model="selectedEnrollment.dateOfEnrollment" ng-disabled="true"/>
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" class="form-control" d2-date ng-model="selectedEnrollment.dateOfEnrollment" ng-disabled="true"/>
</td>
</tr>
<tr class="col-md-12" ng-if="selectedProgram.displayIncidentDate">
@@ -33,7 +33,7 @@
{{selectedProgram.dateOfIncidentDescription}}
</td>
<td class="col-md-6">
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" class="form-control" ng-date ng-model="selectedEnrollment.dateOfIncident" ng-disabled="true"/>
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" class="form-control" d2-date ng-model="selectedEnrollment.dateOfIncident" ng-disabled="true"/>
</td>
</tr>
</table>
@@ -84,7 +84,7 @@
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
name="dateOfEnrollment"
class="form-control"
- ng-date
+ d2-date
max-date="selectedProgram.selectEnrollmentDatesInFuture ? '' : 0"
ng-model="newEnrollment.dateOfEnrollment"
ng-required="true"/>
@@ -99,7 +99,7 @@
<input type="text"
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
class="form-control"
- ng-date
+ d2-date
max-date="selectedProgram.selectIncidentDatesInFuture ? '' : 0"
ng-model="newEnrollment.dateOfIncident"
max-date="today"/>
@@ -117,7 +117,7 @@
<ng-form name="innerForm">
<div ng-switch="attribute.valueType">
<div ng-switch-when="date">
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" class="form-control" name="foo" ng-date ng-model="attribute.value" ng-required="attribute.mandatory"/>
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" class="form-control" name="foo" d2-date ng-model="attribute.value" ng-required="attribute.mandatory"/>
<span ng-show="outerForm.submitted && innerForm.foo.$invalid" style="color:red;font-size:12px">{{'required'| translate}}</span>
</div>
<div ng-switch-when="trueOnly">
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html 2014-10-09 15:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html 2014-10-13 15:05:01 +0000
@@ -26,7 +26,7 @@
<ng-form name="innerForm">
<div ng-switch="attribute.type">
<div ng-switch-when="date">
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="foo" class="form-control" ng-date ng-model="attribute.value" value="attribute.value | date:'yyyy-MM-dd" ng-disabled="!editProfile" ng-required="attribute.mandatory"/>
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="foo" class="form-control" d2-date ng-model="attribute.value" value="attribute.value | date:'yyyy-MM-dd" ng-disabled="!editProfile" ng-required="attribute.mandatory"/>
<span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}} - {{attribute.type}}</span>
</div>
<div ng-switch-when="trueOnly">
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2014-10-13 15:05:01 +0000
@@ -27,7 +27,7 @@
<ng-form name="innerForm">
<div ng-switch="attribute.type">
<div ng-switch-when="date">
- <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="foo" class="form-control" ng-date ng-model="attribute.value" ng-required="attribute.mandatory" />
+ <input type="text" placeholder="{{dhis2CalendarFormat.keyDateFormat}}" name="foo" class="form-control" d2-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">
@@ -114,7 +114,7 @@
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
name="dateOfEnrollment"
class="form-control"
- ng-date
+ d2-date
ng-model="enrollment.dateOfEnrollment"
max-date="selectedProgram.selectEnrollmentDatesInFuture ? '' : 0"
min-date=""
@@ -131,7 +131,7 @@
placeholder="{{dhis2CalendarFormat.keyDateFormat}}"
name="dateOfIncident"
class="form-control"
- ng-date
+ d2-date
max-date="selectedProgram.selectIncidentDatesInFuture ? '' : 0"
min-date=""
ng-model="enrollment.dateOfIncident"/>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html 2014-09-07 08:30:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html 2014-10-13 15:05:01 +0000
@@ -34,7 +34,7 @@
<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" />
+ <input type="text" name="foo" class="form-control" d2-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">
@@ -83,7 +83,7 @@
{{selectedProgramForRelative.dateOfEnrollmentDescription}}
</td>
<td>
- <input type="text" name="dateOfEnrollment" class="form-control" ng-date ng-model="enrollment.incidentDate" ng-required="true"/>
+ <input type="text" name="dateOfEnrollment" class="form-control" d2-date ng-model="enrollment.incidentDate" ng-required="true"/>
<span ng-show="outerForm.submitted && outerForm.dateOfEnrollment.$invalid" class="error">{{'required'| translate}}</span>
</td>
</tr>
@@ -92,7 +92,7 @@
{{selectedProgramForRelative.dateOfIncidentDescription}}
</td>
<td>
- <input type="text" class="form-control" ng-date ng-model="enrollment.enrollmentDate" />
+ <input type="text" class="form-control" d2-date ng-model="enrollment.enrollmentDate" />
</td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html 2014-08-08 14:59:22 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html 2014-10-13 15:05:01 +0000
@@ -33,14 +33,14 @@
</select>
</div>
<div class="filter-value" ng-show="enrollment.operator === defaultOperators[0]">
- <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" ng-date ng-model="enrollment.programExactDate"/>
+ <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programExactDate"/>
</div>
<div class="filter-value" ng-show="enrollment.operator === defaultOperators[1]">
<div class="container-1-2">
- <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" ng-date ng-model="enrollment.programStartDate"/>
+ <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programStartDate"/>
</div>
<div class="container-1-2">
- <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" ng-date ng-model="enrollment.programEndDate"/>
+ <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programEndDate"/>
</div>
</div>
</div>
@@ -78,14 +78,14 @@
</select>
</div>
<div class="filter-value" ng-show="attribute.operator === defaultOperators[0]">
- <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" ng-date ng-model="attribute.exactValue"/>
+ <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" d2-date ng-model="attribute.exactValue"/>
</div>
<div class="filter-value" ng-show="attribute.operator === defaultOperators[1]">
<div class="container-1-2">
- <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" ng-date ng-model="attribute.startValue"/>
+ <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="attribute.startValue"/>
</div>
<div class="container-1-2">
- <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" ng-date ng-model="attribute.endValue"/>
+ <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="attribute.endValue"/>
</div>
</div>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html 2014-09-17 14:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events.html 2014-10-13 15:05:01 +0000
@@ -159,11 +159,11 @@
<input style="width: 45%;" placeholder="{{'upper_limit'| translate}}" type="number" ng-model="filterText[gridColumn.id].end" ng-blur="searchInGrid(gridColumn)">
</span>
<span ng-switch-when="date">
- <input style="width: 70%;" placeholder="{{'start_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].start" data-ng-date readonly="readonly">
+ <input style="width: 70%;" placeholder="{{'start_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].start" data-d2-date readonly="readonly">
<span ng-hide="filterText[gridColumn.id].start == undefined || filterText[gridColumn.id].start == ''">
<a href ng-click='removeStartFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>
</span>
- <input style="width: 70%;" placeholder="{{'end_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].end" data-ng-date readonly="readonly">
+ <input style="width: 70%;" placeholder="{{'end_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].end" data-d2-date readonly="readonly">
<span ng-hide="filterText[gridColumn.id].end == undefined || filterText[gridColumn.id].end == ''">
<a href ng-click='removeEndFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>
</span>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html 2014-10-13 15:05:01 +0000
@@ -36,7 +36,7 @@
name="reportStartDate"
placeholder="{{'start_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})"
class="form-control"
- ng-date
+ d2-date
ng-model="report.startDate"
max="today"
ng-required="true"/>
@@ -47,7 +47,7 @@
name="reportEndDate"
placeholder="{{'end_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})"
class="form-control"
- ng-date
+ d2-date
ng-model="report.endDate"
max="today"
ng-required="true"/>
=== 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 2014-10-09 15:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events.html 2014-10-13 15:05:01 +0000
@@ -90,14 +90,14 @@
name="reportStartDate"
placeholder="{{'start_date'| translate}} ({{dhis2CalendarFormat.keyDateFormat}})"
class="form-control"
- ng-date
+ 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" ng-date ng-model="report.endDate" min-date="today" ng-required="true"/>
+ <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>
</tr>
@@ -185,11 +185,11 @@
<input style="width: 45%;" placeholder="{{'upper_limit'| translate}}" type="number" ng-model="filterText[gridColumn.id].end" ng-blur="searchInGrid(gridColumn)">
</span>
<span ng-switch-when="date">
- <input style="width: 70%;" placeholder="{{'start_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].start" data-ng-date readonly="readonly">
+ <input style="width: 70%;" placeholder="{{'start_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].start" data-d2-date readonly="readonly">
<span ng-hide="filterText[gridColumn.id].start === undefined || filterText[gridColumn.id].start === ''">
<a href ng-click='removeStartFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>
</span>
- <input style="width: 70%;" placeholder="{{'end_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].end" data-ng-date readonly="readonly">
+ <input style="width: 70%;" placeholder="{{'end_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].end" data-d2-date readonly="readonly">
<span ng-hide="filterText[gridColumn.id].end === undefined || filterText[gridColumn.id].end === ''">
<a href ng-click='removeEndFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>
</span>
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js 2014-10-13 15:05:01 +0000
@@ -185,52 +185,7 @@
};
})
-/*.directive('ngDate', function(DateUtils, $rootScope) {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, element, attrs, ctrl) {
-
- var dateFormat = 'yy-mm-dd';
- if($rootScope.dhis2CalendarFormat.keyDateFormat === 'dd-MM-yyyy'){
- dateFormat = 'dd-mm-yy';
- }
- element.datepicker({
- changeYear: true,
- changeMonth: true,
- dateFormat: dateFormat,
- yearRange: '-120:+30',
- minDate: attrs.minDate,
- maxDate: attrs.maxDate,
- onSelect: function(date) {
- //scope.date = date;
- ctrl.$setViewValue(date);
- $(this).change();
- scope.$apply();
- }
- })
- .change(function() {
- var rawDate = this.value;
- var convertedDate = DateUtils.format(this.value);
-
- if(rawDate != convertedDate){
- scope.invalidDate = true;
- ctrl.$setViewValue(this.value);
- ctrl.$setValidity('foo', false);
- scope.$apply();
- }
- else{
- scope.invalidDate = false;
- ctrl.$setViewValue(this.value);
- ctrl.$setValidity('foo', true);
- scope.$apply();
- }
- });
- }
- };
-})*/
-
-.directive('ngDate', function(DateUtils, CalendarService, storage, $parse) {
+.directive('d2Date', function(DateUtils, CalendarService, storage, $parse) {
return {
restrict: 'A',
require: 'ngModel',
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-10-13 15:05:01 +0000
@@ -843,7 +843,7 @@
this.getAttributesAsString(attributes) +
' ng-model="currentEvent.' + deId + '"' +
' ng-class="getInputNotifcationClass(' + deId + ',true)"' +
- ' ng-date' +
+ ' d2-date' +
' blur-or-change="saveDatavalue(programStageDataElements.'+ deId + ')"' +
' ng-required="programStageDataElements.' + deId + '.compulsory">';
}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-10-08 11:53:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-10-13 15:05:01 +0000
@@ -94,14 +94,14 @@
</select>
</div>
<div class="filter-value" ng-show="enrollment.operator === defaultOperators[0]">
- <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" ng-date ng-model="enrollment.programExactDate"/>
+ <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programExactDate"/>
</div>
<div class="filter-value" ng-show="enrollment.operator === defaultOperators[1]">
<div class="container-1-2">
- <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" ng-date ng-model="enrollment.programStartDate"/>
+ <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programStartDate"/>
</div>
<div class="container-1-2">
- <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" ng-date ng-model="enrollment.programEndDate"/>
+ <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programEndDate"/>
</div>
</div>
</div>
@@ -139,14 +139,14 @@
</select>
</div>
<div class="filter-value" ng-show="attribute.operator === defaultOperators[0]">
- <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" ng-date ng-model="attribute.exactValue"/>
+ <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" d2-date ng-model="attribute.exactValue"/>
</div>
<div class="filter-value" ng-show="attribute.operator === defaultOperators[1]">
<div class="container-1-2">
- <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" ng-date ng-model="attribute.startValue"/>
+ <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="attribute.startValue"/>
</div>
<div class="container-1-2">
- <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" ng-date ng-model="attribute.endValue"/>
+ <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="attribute.endValue"/>
</div>
</div>
</div>