(html) Use datepicker for task completion date
parent
cb03a1d97e
commit
eefb9056ca
1
NEWS
1
NEWS
|
@ -46,6 +46,7 @@ Bug fixes
|
||||||
- [web] replaced checkboxes in menu by a custom checkmark (#3557)
|
- [web] replaced checkboxes in menu by a custom checkmark (#3557)
|
||||||
- [web] fixed attachments display when forwarding a message (#3560)
|
- [web] fixed attachments display when forwarding a message (#3560)
|
||||||
- [web] activate new calendar subscriptions by default
|
- [web] activate new calendar subscriptions by default
|
||||||
|
- [web] keep specified task status when not completed (#3499)
|
||||||
- [eas] allow EAS attachments get on 2nd-level mailboxes (#3505)
|
- [eas] allow EAS attachments get on 2nd-level mailboxes (#3505)
|
||||||
- [eas] fix EAS bday shift (#3518)
|
- [eas] fix EAS bday shift (#3518)
|
||||||
|
|
||||||
|
|
|
@ -187,11 +187,15 @@
|
||||||
// Handle completed date
|
// Handle completed date
|
||||||
o = [data objectForKey: @"completedDate"];
|
o = [data objectForKey: @"completedDate"];
|
||||||
if ([o isKindOfClass: [NSString class]] && [o length])
|
if ([o isKindOfClass: [NSString class]] && [o length])
|
||||||
completedDate = [self dateFromString: o inContext: context];
|
{
|
||||||
|
completedDate = [self dateFromString: o inContext: context];
|
||||||
|
|
||||||
o = [data objectForKey: @"completedTime"];
|
o = [data objectForKey: @"completedTime"];
|
||||||
if ([o isKindOfClass: [NSString class]] && [o length])
|
if ([o isKindOfClass: [NSString class]] && [o length])
|
||||||
[self adjustDate: &completedDate withTimeString: o inContext: context];
|
[self adjustDate: &completedDate withTimeString: o inContext: context];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
[(iCalDateTime *) [self uniqueChildWithTag: @"completed"] setDateTime: nil];
|
||||||
|
|
||||||
o = [self status];
|
o = [self status];
|
||||||
if ([o length])
|
if ([o length])
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
<div layout="row" layout-align="start center" layout-wrap="layout-wrap">
|
<div layout="row" layout-align="start center" layout-wrap="layout-wrap">
|
||||||
<md-datepicker ng-model="editor.component.due"
|
<md-datepicker ng-model="editor.component.due"
|
||||||
ng-change="editor.updateDueTime()"
|
ng-change="editor.updateDueTime()"
|
||||||
label:md-placeholder="Due"> <!-- date picker--></md-datepicker>
|
label:md-placeholder="Due"><!-- date picker--></md-datepicker>
|
||||||
<sg-timepicker ng-model="editor.component.due"
|
<sg-timepicker ng-model="editor.component.due"
|
||||||
ng-change="editor.adjustDueTime()"><!-- time picker --></sg-timepicker>
|
ng-change="editor.adjustDueTime()"><!-- time picker --></sg-timepicker>
|
||||||
<md-button class="md-icon-button" type="button" ng-click="editor.component.$deleteDueDate()">
|
<md-button class="md-icon-button" type="button" ng-click="editor.component.$deleteDueDate()">
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<label class="button-label"><var:string label:value="Add Due"/></label>
|
<label class="button-label"><var:string label:value="Add Due"/></label>
|
||||||
</div>
|
</div>
|
||||||
<!-- status -->
|
<!-- status -->
|
||||||
<div layout="row">
|
<div layout="row" layout-align="start center">
|
||||||
<md-input-container flex="50">
|
<md-input-container flex="50">
|
||||||
<label><var:string label:value="Status"/></label>
|
<label><var:string label:value="Status"/></label>
|
||||||
<md-select ng-model="editor.component.status">
|
<md-select ng-model="editor.component.status">
|
||||||
|
@ -161,10 +161,9 @@
|
||||||
</var:foreach>
|
</var:foreach>
|
||||||
</md-select>
|
</md-select>
|
||||||
</md-input-container>
|
</md-input-container>
|
||||||
<md-input-container ng-show="editor.component.status == 'completed'">
|
<md-datepicker ng-show="editor.component.status == 'completed'"
|
||||||
<label><var:string label:value="status_COMPLETED"/></label>
|
ng-model="editor.component.completed"
|
||||||
<input type="text" ng-model="editor.component.completedDate"/>
|
label:md-placeholder="status_COMPLETED"><!-- date picker--></md-datepicker>
|
||||||
</md-input-container>
|
|
||||||
</div>
|
</div>
|
||||||
<div layout="row" layout-align="center center"
|
<div layout="row" layout-align="center center"
|
||||||
ng-show="editor.component.enablePercentComplete()">
|
ng-show="editor.component.enablePercentComplete()">
|
||||||
|
|
|
@ -470,7 +470,7 @@
|
||||||
|
|
||||||
if (this.component == 'vevent')
|
if (this.component == 'vevent')
|
||||||
this.type = 'appointment';
|
this.type = 'appointment';
|
||||||
else if (this.component == 'vtoto')
|
else if (this.component == 'vtodo')
|
||||||
this.type = 'task';
|
this.type = 'task';
|
||||||
|
|
||||||
if (this.startDate) {
|
if (this.startDate) {
|
||||||
|
@ -497,6 +497,11 @@
|
||||||
if (this.dueDate)
|
if (this.dueDate)
|
||||||
this.due = Component.$parseDate(this.dueDate);
|
this.due = Component.$parseDate(this.dueDate);
|
||||||
|
|
||||||
|
if (this.completedDate)
|
||||||
|
this.completed = Component.$parseDate(this.completedDate);
|
||||||
|
else if (this.type == 'task')
|
||||||
|
this.completed = new Date();
|
||||||
|
|
||||||
if (this.c_category)
|
if (this.c_category)
|
||||||
this.categories = _.invokeMap(this.c_category, 'asCSSIdentifier');
|
this.categories = _.invokeMap(this.c_category, 'asCSSIdentifier');
|
||||||
|
|
||||||
|
@ -1059,6 +1064,7 @@
|
||||||
component.endTime = component.end ? component.end.format(dlp, '%H:%M') : '';
|
component.endTime = component.end ? component.end.format(dlp, '%H:%M') : '';
|
||||||
component.dueDate = component.due ? component.due.format(dlp, '%Y-%m-%d') : '';
|
component.dueDate = component.due ? component.due.format(dlp, '%Y-%m-%d') : '';
|
||||||
component.dueTime = component.due ? component.due.format(dlp, '%H:%M') : '';
|
component.dueTime = component.due ? component.due.format(dlp, '%H:%M') : '';
|
||||||
|
component.completedDate = component.completed ? component.completed.format(dlp, '%Y-%m-%d') : '';
|
||||||
|
|
||||||
// Update recurrence definition depending on selections
|
// Update recurrence definition depending on selections
|
||||||
if (this.$hasCustomRepeat) {
|
if (this.$hasCustomRepeat) {
|
||||||
|
@ -1093,6 +1099,8 @@
|
||||||
// Check status
|
// Check status
|
||||||
if (this.status == 'not-specified')
|
if (this.status == 'not-specified')
|
||||||
delete component.status;
|
delete component.status;
|
||||||
|
else if (this.status != 'completed')
|
||||||
|
delete component.completedDate;
|
||||||
|
|
||||||
// Verify alarm
|
// Verify alarm
|
||||||
if (this.$hasAlarm) {
|
if (this.$hasAlarm) {
|
||||||
|
|
Loading…
Reference in New Issue