mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-28 17:57:38 +00:00
Add support for events with recurrence dates
This commit is contained in:
@@ -571,6 +571,7 @@ vtodo_class2 = "(Confidential task)";
|
||||
"More options" = "More options";
|
||||
"Delete This Occurrence" = "Delete This Occurrence";
|
||||
"Delete All Occurrences" = "Delete All Occurrences";
|
||||
"Add Recurrence Date" = "Add Recurrence Date";
|
||||
"Add From" = "Add From";
|
||||
"Add Due" = "Add Due";
|
||||
"Import" = "Import";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxAppointmentEditor.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2016 Inverse inc.
|
||||
* Copyright (C) 2007-2017 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -650,6 +650,7 @@
|
||||
* @apiSuccess (Success 200) {Number} [repeat.days.occurence] Occurrence of a specific day within the monthly or yearly rule (values are -5 to 5)
|
||||
* @apiSuccess (Success 200) {Number[]} [repeat.months] List of months of the year (values are 1 to 12)
|
||||
* @apiSuccess (Success 200) {Number[]} [repeat.monthdays] Days of the month (values are 1 to 31)
|
||||
* @apiSuccess (Success 200) {String[]} [repeat.dates] Recurrence dates (ISO8601)
|
||||
*/
|
||||
- (id <WOActionResults>) viewAction
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxCalMainView.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2016 Inverse inc.
|
||||
* Copyright (C) 2006-2017 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -476,6 +476,7 @@
|
||||
@"weekly",
|
||||
@"monthly",
|
||||
@"yearly",
|
||||
@"custom",
|
||||
nil];
|
||||
[repeatItems retain];
|
||||
}
|
||||
|
||||
@@ -179,7 +179,10 @@
|
||||
<div layout="row" layout-align="start center">
|
||||
<md-input-container class="md-block md-flex">
|
||||
<label><var:string label:value="Repeat"/></label>
|
||||
<md-select ng-model="editor.component.repeat.frequency" ng-disabled="editor.component.occurrenceId">
|
||||
<md-select
|
||||
ng-model="editor.component.repeat.frequency"
|
||||
ng-change="editor.changeFrequency($event)"
|
||||
ng-disabled="editor.component.occurrenceId">
|
||||
<var:foreach list="repeatList" item="item">
|
||||
<md-option var:value="item"><var:string var:value="itemRepeatText"/></md-option>
|
||||
</var:foreach>
|
||||
|
||||
@@ -144,4 +144,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- custom (rdates) -->
|
||||
<div ng-if="editor.component.repeat.frequency == 'custom'">
|
||||
<label class="button-label"><var:string label:value="On"/></label>
|
||||
<div layout="row" layout-align="start end" ng-repeat="rdate in editor.component.repeat.dates">
|
||||
<md-button class="md-icon-button" type="button" ng-click="editor.component.$deleteRecurrenceDate($index)">
|
||||
<md-icon>remove_circle</md-icon>
|
||||
</md-button>
|
||||
<md-datepicker
|
||||
ng-model="editor.component.repeat.dates[$index]"
|
||||
label:md-placeholder="On"><!-- date picker --></md-datepicker>
|
||||
<sg-timepicker
|
||||
ng-model="editor.component.repeat.dates[$index]"
|
||||
ng-hide="editor.component.isAllDay"><!-- time picker --></sg-timepicker>
|
||||
</div>
|
||||
<div layout="row" layout-align="start center">
|
||||
<md-button class="md-icon-button" type="button" ng-click="editor.component.$addRecurrenceDate()">
|
||||
<md-icon>add_circle</md-icon>
|
||||
</md-button>
|
||||
<label class="button-label">
|
||||
<var:string label:value="Add Recurrence Date"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</container>
|
||||
|
||||
@@ -222,6 +222,7 @@
|
||||
vm.showAttendeesEditor = vm.component.attendees && vm.component.attendees.length;
|
||||
vm.toggleAttendeesEditor = toggleAttendeesEditor;
|
||||
//vm.searchText = null;
|
||||
vm.changeFrequency = changeFrequency;
|
||||
vm.changeCalendar = changeCalendar;
|
||||
vm.cardFilter = cardFilter;
|
||||
vm.addAttendee = addAttendee;
|
||||
@@ -272,6 +273,11 @@
|
||||
vm.component.repeat.month.type == 'bymonthday';
|
||||
}
|
||||
|
||||
function changeFrequency() {
|
||||
if (vm.component.repeat.frequency == 'custom')
|
||||
vm.showRecurrenceEditor = true;
|
||||
}
|
||||
|
||||
function changeCalendar() {
|
||||
var updateRequired = (vm.component.attendees && vm.component.attendees.length > 0);
|
||||
if (updateRequired)
|
||||
|
||||
Reference in New Issue
Block a user