Projects
Kolab:3.4
roundcubemail-plugins-kolab
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 20
View file
roundcubemail-plugins-kolab.spec
Changed
@@ -24,7 +24,7 @@ Name: roundcubemail-plugins-kolab Version: 3.1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Kolab Groupware plugins for Roundcube Webmail Group: Applications/Internet @@ -34,6 +34,8 @@ Source0: http://git.kolab.org/%{name}/snapshot/%{name}-%{version}.tar.gz Source1: kolab_logo.png +Patch1: roundcubemail-plugins-kolab-3.1.6-task-enhancements.patch + BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch @@ -49,6 +51,8 @@ %prep %setup -q +%patch1 -p1 + %build %install @@ -208,7 +212,8 @@ %attr(0770,root,%{httpd_group}) %{roundcube_lib}/plugins/odfviewer %changelog -* Thu Oct 31 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.6-1 +* Thu Oct 31 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.6-2 +- Also apply patch for task enhancements - New upstream version * Fri Oct 18 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.5-1
View file
roundcubemail-plugins-kolab-3.1.6-task-enhancements.patch
Added
@@ -0,0 +1,1472 @@ +diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php +index f038caf..685745d 100644 +--- a/plugins/calendar/calendar.php ++++ b/plugins/calendar/calendar.php +@@ -126,6 +126,7 @@ class calendar extends rcube_plugin + $this->register_action('mailtoevent', array($this, 'mail_message2event')); + $this->register_action('inlineui', array($this, 'get_inline_ui')); + $this->register_action('check-recent', array($this, 'check_recent')); ++ $this->add_hook('refresh', array($this, 'refresh')); + + // remove undo information... + if ($undo = $_SESSION['calendar_event_undo']) { +@@ -162,6 +163,8 @@ class calendar extends rcube_plugin + 'innerclass' => 'icon calendar', + ))), + 'messagemenu'); ++ ++ $this->api->output->add_label('calendar.createfrommail'); + } + } + +@@ -919,6 +922,38 @@ class calendar extends rcube_plugin + } + + /** ++ * Handler for keep-alive requests ++ * This will check for updated data in active calendars and sync them to the client ++ */ ++ public function refresh($attr) ++ { ++ // refresh the entire calendar every 10th time to also sync deleted events ++ $refetch = rand(0,10) == 10; ++ ++ foreach ($this->driver->list_calendars(true) as $cal) { ++ if ($refetch) { ++ $this->rc->output->command('plugin.refresh_calendar', ++ array('source' => $cal['id'], 'refetch' => true)); ++ } ++ else { ++ $events = $this->driver->load_events( ++ get_input_value('start', RCUBE_INPUT_GET), ++ get_input_value('end', RCUBE_INPUT_GET), ++ get_input_value('q', RCUBE_INPUT_GET), ++ $cal['id'], ++ 1, ++ $attr['last'] ++ ); ++ ++ foreach ($events as $event) { ++ $this->rc->output->command('plugin.refresh_calendar', ++ array('source' => $cal['id'], 'update' => $this->_client_event($event))); ++ } ++ } ++ } ++ } ++ ++ /** + * Handler for pending_alarms plugin hook triggered by the calendar module on keep-alive requests. + * This will check for pending notifications and pass them to the client + */ +@@ -975,10 +1010,18 @@ class calendar extends rcube_plugin + + if (!$err && $_FILES['_data']['tmp_name']) { + $calendar = get_input_value('calendar', RCUBE_INPUT_GPC); +- $events = $this->get_ical()->import_from_file($_FILES['_data']['tmp_name']); +- +- $count = $errors = 0; + $rangestart = $_REQUEST['_range'] ? date_create("now -" . intval($_REQUEST['_range']) . " months") : 0; ++ $count = $errors = 0; ++ ++ try { ++ $events = $this->get_ical()->import_from_file($_FILES['_data']['tmp_name'], 'UTF-8', true); ++ } ++ catch (Exception $e) { ++ $errors = 1; ++ $msg = $e->getMessage(); ++ $events = array(); ++ } ++ + foreach ($events as $event) { + // TODO: correctly handle recurring events which start before $rangestart + if ($event['end'] < $rangestart && (!$event['recurrence'] || ($event['recurrence']['until'] && $event['recurrence']['until'] < $rangestart))) +@@ -1000,8 +1043,9 @@ class calendar extends rcube_plugin + $this->rc->output->command('display_message', $this->gettext('importnone'), 'notice'); + $this->rc->output->command('plugin.import_success', array('source' => $calendar)); + } +- else +- $this->rc->output->command('display_message', $this->gettext('importerror'), 'error'); ++ else { ++ $this->rc->output->command('plugin.import_error', array('message' => $this->gettext('importerror') . ($msg ? ': ' . $msg : ''))); ++ } + } + else { + if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { +@@ -1012,7 +1056,7 @@ class calendar extends rcube_plugin + $msg = rcube_label('fileuploaderror'); + } + +- $this->rc->output->command('display_message', $msg, 'error'); ++ $this->rc->output->command('plugin.import_error', array('message' => $msg)); + $this->rc->output->command('plugin.unlock_saving', false); + } + +diff --git a/plugins/calendar/calendar_base.js b/plugins/calendar/calendar_base.js +index c60c89a..33fe9e4 100644 +--- a/plugins/calendar/calendar_base.js ++++ b/plugins/calendar/calendar_base.js +@@ -6,7 +6,7 @@ + * @author Thomas Bruederli <bruederli@kolabsys.com> + * + * Copyright (C) 2010, Lazlo Westerhof <hello@lazlo.me> +- * Copyright (C) 2012, Kolab Systems AG <contact@kolabsys.com> ++ * Copyright (C) 2013, Kolab Systems AG <contact@kolabsys.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as +@@ -36,10 +36,9 @@ function rcube_calendar(settings) + var me = this; + + // create new event from current mail message +- this.create_from_mail = function() ++ this.create_from_mail = function(uid) + { +- var uid; +- if ((uid = rcmail.get_single_uid())) { ++ if (uid || (uid = rcmail.get_single_uid())) { + // load calendar UI (scripts and edit dialog template) + if (!this.ui_loaded) { + $.when( +@@ -53,7 +52,7 @@ function rcube_calendar(settings) + + me.ui_loaded = true; + me.ui = new rcube_calendar_ui(me.settings); +- me.create_from_mail(); // start over ++ me.create_from_mail(uid); // start over + }); + return; + } +@@ -156,9 +155,6 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { + + // register create-from-mail command to message_commands array + if (rcmail.env.task == 'mail') { +- // place link above 'view source' +- $('#messagemenu a.calendarlink').parent().insertBefore($('#messagemenu a.sourcelink').parent()); +- + rcmail.register_command('calendar-create-from-mail', function() { cal.create_from_mail() }); + rcmail.addEventListener('plugin.mail2event_dialog', function(p){ cal.mail2event_dialog(p) }); + rcmail.addEventListener('plugin.unlock_saving', function(p){ cal.ui && cal.ui.unlock_saving(); }); +@@ -169,6 +165,15 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { + } + else + rcmail.enable_command('calendar-create-from-mail', true); ++ ++ // add contextmenu item ++ if (window.rcm_contextmenu_register_command) { ++ rcm_contextmenu_register_command( ++ 'calendar-create-from-mail', ++ function(cmd,el){ cal.create_from_mail() }, ++ 'calendar.createfrommail', ++ 'moveto'); ++ } + } + } + +diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js +index 986113f..d5a4308 100644 +--- a/plugins/calendar/calendar_ui.js ++++ b/plugins/calendar/calendar_ui.js +@@ -1981,10 +1981,17 @@ function rcube_calendar_ui(settings) + if (form && form.elements._data.value) { + rcmail.async_upload_form(form, 'import_events', function(e) { + rcmail.set_busy(false, null, me.saving_lock); ++ $('.ui-dialog-buttonpane button', $dialog.parent()).button('enable'); ++ ++ // display error message if no sophisticated response from server arrived (e.g. iframe load error) ++ if (me.import_succeeded === null) ++ rcmail.display_message(rcmail.get_label('importerror', 'calendar'), 'error'); + }); + + // display upload indicator ++ me.import_succeeded = null; + me.saving_lock = rcmail.set_busy(true, 'uploading'); ++ $('.ui-dialog-buttonpane button', $dialog.parent()).button('disable'); + } + }; + +@@ -1999,6 +2006,7 @@ function rcube_calendar_ui(settings) + closeOnEscape: false, + title: rcmail.gettext('importevents', 'calendar'), + close: function() { ++ $('.ui-dialog-buttonpane button', $dialog.parent()).button('enable'); + $dialog.dialog("destroy").hide(); + }, + buttons: buttons, +@@ -2010,6 +2018,7 @@ function rcube_calendar_ui(settings) + // callback from server if import succeeded + this.import_success = function(p) + { ++ this.import_succeeded = true;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.