summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-20 09:18:21 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-20 09:18:21 (GMT)
commitf972f4a511a7c3710ec5f5cee001133837797923 (patch)
tree48688c7f8d6c5f4961ee2e6917ecfbe8c85b99e3 /plugins
parent515a7d9ef6dcdc1c1de2488745a511bdac256896 (diff)
downloadroundcubemail-plugins-kolab-f972f4a511a7c3710ec5f5cee001133837797923.tar.gz
Disable the 'future' savemode for event deletion if attendees are involved
Diffstat (limited to 'plugins')
-rw-r--r--plugins/calendar/calendar_ui.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 5a26c18..eb57fa7 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -2603,25 +2603,19 @@ function rcube_calendar_ui(settings)
// recurring event: user needs to select the savemode
if (event.recurrence) {
- var disabled_state = '', message_label = (action == 'remove' ? 'removerecurringeventwarning' : 'changerecurringeventwarning');
-/*
- if (_has_attendees) {
- if (action == 'remove') {
- if (!_is_organizer) {
- message_label = 'removerecurringallonly';
- disabled_state = ' disabled';
- }
- }
- else if (is_organizer(event)) {
- disabled_state = ' disabled';
- }
+ var future_disabled = '', message_label = (action == 'remove' ? 'removerecurringeventwarning' : 'changerecurringeventwarning');
+
+ // disable the 'future' savemode if attendees are involved
+ // reason: no calendaring system supports the thisandfuture range parameter
+ if (action == 'remove' && _has_attendees && is_organizer(event)) {
+ future_disabled = ' disabled';
}
-*/
+
html += '<div class="message"><span class="ui-icon ui-icon-alert"></span>' +
rcmail.gettext(message_label, 'calendar') + '</div>' +
'<div class="savemode">' +
- '<a href="#current" class="button' + disabled_state + '">' + rcmail.gettext('currentevent', 'calendar') + '</a>' +
- '<a href="#future" class="button' + disabled_state + '">' + rcmail.gettext('futurevents', 'calendar') + '</a>' +
+ '<a href="#current" class="button">' + rcmail.gettext('currentevent', 'calendar') + '</a>' +
+ '<a href="#future" class="button' + future_disabled + '">' + rcmail.gettext('futurevents', 'calendar') + '</a>' +
'<a href="#all" class="button">' + rcmail.gettext('allevents', 'calendar') + '</a>' +
(action != 'remove' ? '<a href="#new" class="button">' + rcmail.gettext('saveasnew', 'calendar') + '</a>' : '') +
'</div>';