summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-03-13 14:30:12 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-03-13 14:30:12 (GMT)
commit6af69cbe2b13d99a6fe55e26d1f12001ff1e73b4 (patch)
tree208bdd19eca4d02d7927c53bba8ea785195d9641
parenta9bfa2f771cd81c6ef35b0def5f706ed17fb4e54 (diff)
downloadroundcubemail-plugins-kolab-6af69cbe2b13d99a6fe55e26d1f12001ff1e73b4.tar.gz
Don't display local-change warning if calendar owner is organizer; Better wording for wanring text (#1693)
-rw-r--r--plugins/calendar/calendar_ui.js11
-rw-r--r--plugins/calendar/drivers/kolab/kolab_driver.php1
-rw-r--r--plugins/calendar/localization/de_CH.inc2
-rw-r--r--plugins/calendar/localization/de_DE.inc2
-rw-r--r--plugins/calendar/localization/en_US.inc2
5 files changed, 10 insertions, 8 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 7eff506..1db870a 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -170,19 +170,20 @@ function rcube_calendar_ui(settings)
};
// check if the current user is an attendee of this event
- var is_attendee = function(event, role)
+ var is_attendee = function(event, role, email)
{
+ var emails = email ? ';'+email : settings.identity.emails;
for (var i=0; event.attendees && i < event.attendees.length; i++) {
- if ((!role || event.attendees[i].role == role) && event.attendees[i].email && settings.identity.emails.indexOf(';'+event.attendees[i].email) >= 0)
+ if ((!role || event.attendees[i].role == role) && event.attendees[i].email && emails.indexOf(';'+event.attendees[i].email) >= 0)
return true;
}
return false;
};
// check if the current user is the organizer
- var is_organizer = function(event)
+ var is_organizer = function(event, email)
{
- return is_attendee(event, 'ORGANIZER') || !event.id;
+ return is_attendee(event, 'ORGANIZER', email) || !event.id;
};
var load_attachment = function(event, att)
@@ -527,7 +528,7 @@ function rcube_calendar_ui(settings)
event_attendees = [];
attendees_list = $('#edit-attendees-table > tbody').html('');
$('#edit-attendees-notify')[(notify.checked && organizer ? 'show' : 'hide')]();
- $('#edit-localchanges-warning')[(has_attendees(event) && !organizer ? 'show' : 'hide')]();
+ $('#edit-localchanges-warning')[(has_attendees(event) && !(organizer || (calendar.owner && is_organizer(event, calendar.owner))) ? 'show' : 'hide')]();
var load_attendees_tab = function()
{
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index 05c05e9..139a181 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -123,6 +123,7 @@ class kolab_driver extends calendar_driver
'class_name' => $cal->get_namespace(),
'default' => $cal->storage->default,
'active' => $cal->storage->is_subscribed(),
+ 'owner' => $cal->get_owner(),
);
}
diff --git a/plugins/calendar/localization/de_CH.inc b/plugins/calendar/localization/de_CH.inc
index 1bd8a97..025f655 100644
--- a/plugins/calendar/localization/de_CH.inc
+++ b/plugins/calendar/localization/de_CH.inc
@@ -183,7 +183,7 @@ $labels['attendeupdateesuccess'] = 'Teilnehmerstatus erfolgreich aktualisiert';
$labels['itipsendsuccess'] = 'Einladung an Teilnehmer versendet.';
$labels['itipresponseerror'] = 'Die Antwort auf diese Einladung konnte nicht versendet werden';
$labels['sentresponseto'] = 'Antwort auf diese Einladung erfolgreich an $mailto gesendet';
-$labels['localchangeswarning'] = 'Die Änderungen an diesem Termin können nur in Ihrem persönlichen Kalender gespeichert werden.';
+$labels['localchangeswarning'] = 'Änderungen an diesem Termin werden nur in Ihrem Kalender gespeichert und nicht an den Organisator des Termins gesendet.';
$labels['importsuccess'] = 'Es wurden $nr Termine erfolgreich importiert';
$labels['importnone'] = 'Keine Termine zum Importieren gefunden';
$labels['importerror'] = 'Fehler beim Importieren';
diff --git a/plugins/calendar/localization/de_DE.inc b/plugins/calendar/localization/de_DE.inc
index ea1d0a7..8d0f2bb 100644
--- a/plugins/calendar/localization/de_DE.inc
+++ b/plugins/calendar/localization/de_DE.inc
@@ -183,7 +183,7 @@ $labels['attendeupdateesuccess'] = 'Teilnehmerstatus erfolgreich aktualisiert';
$labels['itipsendsuccess'] = 'Einladung an Teilnehmer versendet.';
$labels['itipresponseerror'] = 'Die Antwort auf diese Einladung konnte nicht versendet werden';
$labels['sentresponseto'] = 'Antwort auf diese Einladung erfolgreich an $mailto gesendet';
-$labels['localchangeswarning'] = 'Die Änderungen an diesem Termin können nur in Ihrem persönlichen Kalender gespeichert werden.';
+$labels['localchangeswarning'] = 'Änderungen an diesem Termin werden nur in Ihrem Kalender gespeichert und nicht an den Organisator des Termins gesendet.';
$labels['importsuccess'] = 'Es wurden $nr Termine erfolgreich importiert';
$labels['importnone'] = 'Keine Termine zum Importieren gefunden';
$labels['importerror'] = 'Fehler beim Importieren';
diff --git a/plugins/calendar/localization/en_US.inc b/plugins/calendar/localization/en_US.inc
index 6cc76d7..4164d89 100644
--- a/plugins/calendar/localization/en_US.inc
+++ b/plugins/calendar/localization/en_US.inc
@@ -184,7 +184,7 @@ $labels['itipsendsuccess'] = 'Invitation sent to participants.';
$labels['itipresponseerror'] = 'Failed to send the response to this event invitation';
$labels['itipinvalidrequest'] = 'This invitation is no longer valid';
$labels['sentresponseto'] = 'Successfully sent invitation response to $mailto';
-$labels['localchangeswarning'] = 'You are about to make changes that will only be reflected on your personal calendar';
+$labels['localchangeswarning'] = 'You are about to make changes that will only be reflected on your calendar and not be sent to the organizer of the event.';
$labels['importsuccess'] = 'Successfully imported $nr events';
$labels['importnone'] = 'No events found to be imported';
$labels['importerror'] = 'An error occured while importing';