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 50
View file
roundcubemail-plugins-kolab.spec
Changed
@@ -24,14 +24,14 @@ Name: roundcubemail-plugins-kolab Version: 3.2 -Release: 0.4.dev20140624.gitb120d395%{?dist} +Release: 0.5.dev20140812.gitf75cc4757%{?dist} Summary: Kolab Groupware plugins for Roundcube Webmail Group: Applications/Internet License: AGPLv3+ and GPLv3+ URL: http://www.kolab.org -# From git b120d3958fc934d3377fb15c15af8f666b2b00c5 +# From git f75cc4757d3759da158cf60c32e0a9a9217592a7 Source0: http://git.kolab.org/%{name}/snapshot/%{name}-%{version}.tar.gz Source1: kolab_logo.png @@ -248,6 +248,9 @@ %attr(0770,root,%{httpd_group}) %{roundcube_lib}/plugins/odfviewer %changelog +* Tue Aug 12 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.2-0.5.git +- New git master head snapshot + * Tue Jun 24 2014 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.2-0.4.git - New git master head snapshot
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +roundcubemail-plugins-kolab (1:3.2~dev20140812-0~kolab1) unstable; urgency=low + + * New git master head snapshot (f75cc4757d3759da158cf60c32e0a9a9217592a7) + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Tue, 12 Aug 2014 18:41:13 +0200 + roundcubemail-plugins-kolab (1:3.2~dev20140624-0~kolab1) unstable; urgency=low * New git master head snapshot
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_activesync/kolab_activesync.js
Changed
@@ -41,7 +41,7 @@ if (!rcmail.env.devicecount) device_select(); } - else { + else if (rcmail.env.action != 'edit-folder') { if (rcmail.env.active_device) rcmail.enable_command('plugin.save-config', true); @@ -155,9 +155,36 @@ this.update_list = function(id, name) { $('#devices-table tr.selected span.devicealias').html(name); - } -}; + }; + + this.update_sync_data = function(elem) + { + elem.name.match(/^_(subscriptions|alarms)\[(.+)\]$/); + + var flag, type = RegExp.$1, device = RegExp.$2, + http_lock = rcmail.set_busy(true, 'kolab_activesync.savingdata'); + // set subscription flag + if (elem.checked) { + flag = type == 'alarms' ? 2 : 1; + } + else { + flag = type == 'alarms' ? 1 : 0; + } + + // make sure subscription checkbox is checked if alarms is checked + if (flag == 2) { + $('input[name="_subscriptions[' + device + ']"]').prop('checked', true); + } + // make sure alarms checkbox is unchecked if subscription is unchecked + else if (flag == 0) { + $('input[name="_alarms[' + device + ']"]').prop('checked', false); + } + + // send the request + rcmail.http_post('plugin.activesync-json', {cmd: 'update', id: device, flag: flag, folder: rcmail.env.folder}, http_lock); + }; +}; window.rcmail && rcmail.addEventListener('init', function(evt) { activesync_object = new kolab_activesync_config();
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_activesync/kolab_activesync.php
Changed
@@ -53,10 +53,12 @@ $this->register_action('plugin.activesync-json', array($this, 'json_command')); $this->add_hook('settings_actions', array($this, 'settings_actions')); + $this->add_hook('folder_form', array($this, 'folder_form')); - $this->add_texts('localization/', array('devicedeleteconfirm', 'savingdata')); + $this->add_texts('localization/'); - if (strpos($this->rc->action, 'plugin.activesync') === 0) { + if (preg_match('/^(plugin.activesync|edit-folder|save-folder)/', $this->rc->action)) { + $this->add_label('devicedeleteconfirm', 'savingdata'); $this->include_script('kolab_activesync.js'); } } @@ -78,12 +80,51 @@ } /** + * Handler for folder info/edit form (folder_form hook). + * Adds ActiveSync section. + */ + function folder_form($args) + { + $mbox_imap = $args['options']['name']; + $myrights = $args['options']['rights']; + + // Edited folder name (empty in create-folder mode) + if (!strlen($mbox_imap)) { + return $args; + } + + $devices = $this->list_devices(); + + // no registered devices + if (empty($devices)) { + return $args; + } + + list($type, ) = explode('.', (string) kolab_storage::folder_type($mbox_imap)); + if ($type && !in_array($type, array('mail', 'event', 'contact', 'task', 'note'))) { + return $args; + } + + require_once $this->home . '/kolab_activesync_ui.php'; + $this->ui = new kolab_activesync_ui($this); + + if ($content = $this->ui->folder_options_table($mbox_imap, $devices, $type)) { + $args['form']['activesync'] = array( + 'name' => rcube::Q($this->gettext('tabtitle')), + 'content' => $content, + ); + } + + return $args; + } + + /** * Handle JSON requests */ public function json_command() { - $cmd = get_input_value('cmd', RCUBE_INPUT_GPC); - $imei = get_input_value('id', RCUBE_INPUT_GPC); + $cmd = get_input_value('cmd', RCUBE_INPUT_POST); + $imei = get_input_value('id', RCUBE_INPUT_POST); switch ($cmd) { case 'save': @@ -130,6 +171,19 @@ $this->rc->output->show_message($this->gettext('savingerror'), 'error'); break; + + case 'update': + $subscription = (int) get_input_value('flag', RCUBE_INPUT_POST); + $folder = get_input_value('folder', RCUBE_INPUT_POST); + + $err = !$this->folder_set($folder, $imei, $subscription); + + if ($err) + $this->rc->output->show_message($this->gettext('savingerror'), 'error'); + else + $this->rc->output->show_message($this->gettext('successfullysaved'), 'confirmation'); + + break; } $this->rc->output->send();
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_activesync/kolab_activesync_ui.php
Changed
@@ -37,7 +37,6 @@ $this->skin_path = 'plugins/kolab_activesync/' . $skin_path; $this->plugin->include_stylesheet($skin_path . 'config.css'); - $this->rc->output->include_script('list.js'); } public function device_list($attrib = array()) @@ -56,6 +55,8 @@ $this->rc->output->add_gui_object('devicelist', $attrib['id']); $this->rc->output->set_env('devicecount', count($devices)); + $this->rc->output->include_script('list.js'); + return $table->show($attrib); } @@ -195,4 +196,51 @@ return $table->show(); } + + public function folder_options_table($folder_name, $devices, $type) + { + $alarms = $type == 'event' || $type == 'task'; + $meta = $this->plugin->folder_meta(); + $folder_data = (array) ($meta[$folder_name] ? $meta[$folder_name]['FOLDER'] : null); + + $table = new html_table(array('cellspacing' => 0, 'id' => 'folder-sync-options', 'class' => 'records-table')); + + // table header + $table->add_header(array('class' => 'device'), $this->plugin->gettext('devicealias')); + $table->add_header(array('class' => 'subscription'), $this->plugin->gettext('synchronize')); + if ($alarms) { + $table->add_header(array('class' => 'alarm'), $this->plugin->gettext('withalarms')); + } + + // table records + foreach ($devices as $id => $device) { + $info = $this->plugin->device_info($device['ID']); + $name = $id; + $title = ''; + $checkbox = new html_checkbox(array('name' => "_subscriptions[$id]", 'value' => 1, + 'onchange' => 'return activesync_object.update_sync_data(this)')); + + if (!empty($info)) { + $_name = trim($info['friendlyname'] . ' ' . $info['os']); + $title = $info['useragent']; + + if ($_name) { + $name .= " ($_name)"; + } + } + + $table->add_row(); + $table->add(array('class' => 'device', 'title' => $title), $name); + $table->add('subscription', $checkbox->show(!empty($folder_data[$id]['S']) ? 1 : 0)); + + if ($alarms) { + $checkbox_alarm = new html_checkbox(array('name' => "_alarms[$id]", 'value' => 1, + 'onchange' => 'return activesync_object.update_sync_data(this)')); + + $table->add('alarm', $checkbox_alarm->show($folder_data[$id]['S'] > 1 ? 1 : 0)); + } + } + + return $table->show(); + } }
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_activesync/package.xml
Changed
@@ -19,9 +19,9 @@ <email>bruederli@kolabsys.com</email> <active>yes</active> </lead> - <date>2013-04-09</date> + <date>2014-08-12</date> <version> - <release>1.0</release> + <release>1.1</release> <api>1.0</api> </version> <stability>
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_activesync/skins/larry/config.css
Changed
@@ -46,7 +46,7 @@ } div.subscriptionblock h3.task { - background-position: 4px -58x; + background-position: 4px -58px; } div.subscriptionblock h3.note { @@ -98,6 +98,21 @@ margin-top: 0.5em; } +#folder-sync-options { + border-radius: 4px; +} + +#folder-sync-options td.subscription, +#folder-sync-options td.alarm, +#folder-sync-options th { + text-align: center; +} + +#folder-sync-options th.subscription, +#folder-sync-options th.alarm { + width: 90px; +} + #introtext { position: absolute; top: 16px;
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_tags/kolab_tags.js
Changed
@@ -75,7 +75,7 @@ } }); -var tagsfilter = [], tag_selector_element, tag_form_data, +var tagsfilter = [], tag_selector_element, tag_form_data, tag_form_save_func, reset_css = {color: '', backgroundColor: ''}; // fills tag cloud with tags list @@ -159,7 +159,7 @@ rcmail.gettext('kolab_tags.tags'), [{ text: rcmail.gettext('save'), - click: function() { $(this).dialog('close'); tag_form_save(); } + click: function() { if (tag_form_save()) $(this).dialog('close'); } }, { text: rcmail.gettext('cancel'), @@ -176,6 +176,7 @@ ); tag_form_data = {add: {}, 'delete': [], update: {}}; + tag_form_save_func = null; var form = $('#tagsform'), select = $('select', form), @@ -218,71 +219,69 @@ { var tag, form = $('#tagsform'), content = $('<div id="tageditform"></div>'), - input = $('<input type="text" size="25" />'), - color_input = $('<input type="text" size="6" class="colors" />'), - close = function() { content.remove(); form.children().show(); }, - buttons = [ - $('<input type="button" />').val(rcmail.gettext('save')) - .click(function() { - var i, tag, name = $.trim(input.val()), color = $.trim(color_input.val()); - - if (!name) { - alert(rcmail.gettext('kolab_tags.nameempty')); - return; - } - - // check if specified name already exists - for (i in rcmail.env.tags) { - tag = rcmail.env.tags[i]; - if (tag.uid != id) { - if (tag_form_data.update[tag.uid]) - tag.name = tag_form_data.update[tag.uid].name; - - if (tag.name == name && !tag_form_data['delete'][tag.uid]) { - alert(rcmail.gettext('kolab_tags.nameexists')); - return; - } - } - } - for (i in tag_form_data.add) { - if (i != id) { - if (tag_form_data.add[i].name == name) { - alert(rcmail.gettext('kolab_tags.nameexists')); - return; - } - } - } - - // check color - if (color) { - color = color.toUpperCase(); - if (!color.match(/^#/)) - color = '#' + color; - if (!color.match(/^#[a-f0-9]{3,6}$/i)) { - alert(rcmail.gettext('kolab_tags.colorinvalid')); - return; - } - } - - tag = {name: name, color: color}; - - if (!id) { - tag.uid = 'temp' + (new Date()).getTime(); // temp ID - tag_form_data.add[tag.uid] = tag; - $('<option>').val(tag.uid).text(name) - .on('dblclick', function() { tag_form_dialog(tag.uid); }) - .appendTo($('#tagsform select')); - } - else { - tag_form_data[tag_form_data.add[id] ? 'add' : 'update'][id] = tag; - $('#tagsform option[value=' + id + ']').text(name); - } - - close(); - }), - $('<input type="button" />').val(rcmail.gettext('cancel')) - .click(close) - ]; + name_input = $('<input type="text" size="25" id="tag-form-name" />'), + color_input = $('<input type="text" size="6" class="colors" id="tag-form-color" />'), + name_label = $('<label for="tag-form-name">').text(rcmail.gettext('kolab_tags.tagname')), + color_label = $('<label for="tag-form-color">').text(rcmail.gettext('kolab_tags.tagcolor')); + + tag_form_save_func = function() { + var i, tag, name = $.trim(name_input.val()), color = $.trim(color_input.val()); + + if (!name) { + alert(rcmail.gettext('kolab_tags.nameempty')); + return false; + } + + // check if specified name already exists + for (i in rcmail.env.tags) { + tag = rcmail.env.tags[i]; + if (tag.uid != id) { + if (tag_form_data.update[tag.uid]) { + tag.name = tag_form_data.update[tag.uid].name; + } + + if (tag.name == name && !tag_form_data['delete'][tag.uid]) { + alert(rcmail.gettext('kolab_tags.nameexists')); + return false; + } + } + } + + for (i in tag_form_data.add) { + if (i != id) { + if (tag_form_data.add[i].name == name) { + alert(rcmail.gettext('kolab_tags.nameexists')); + return false; + } + } + } + + // check color + if (color) { + color = color.toUpperCase(); + + if (!color.match(/^#/)) { + color = '#' + color; + } + + if (!color.match(/^#[a-f0-9]{3,6}$/i)) { + alert(rcmail.gettext('kolab_tags.colorinvalid')); + return false; + } + } + + tag = {name: name, color: color}; + + if (!id) { + tag.uid = 'temp' + (new Date()).getTime(); // temp ID + tag_form_data.add[tag.uid] = tag; + } + else { + tag_form_data[tag_form_data.add[id] ? 'add' : 'update'][id] = tag; + } + + return true; + }; // reset inputs if (id) { @@ -293,7 +292,7 @@ tag = tag_find(id); if (tag) { - input.val(tag.name); + name_input.val(tag.name); color_input.val(tag.color.replace(/^#/, '')); } } @@ -302,13 +301,17 @@ // display form form.children().hide(); form.append(content); - content.append([input, ' ', color_input]).append($('<div></div>').append(buttons)).show(); - input.focus(); + content.append([name_label, name_input, '<br>', color_label, color_input]).show(); + name_input.focus(); } // save tags form (create/update/delete tags) function tag_form_save() { + if (tag_form_save_func && !tag_form_save_func()) { + return false; + } + var count = 0; // check if updates are needed @@ -325,11 +328,15 @@ }); // check if anything added/deleted - if (!count) + if (!count) { count = tag_form_data['delete'].length || $.makeArray(tag_form_data.add).length; + } - if (count)
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_tags/lib/kolab_tags_engine.php
Changed
@@ -54,7 +54,7 @@ $this->plugin->include_script('kolab_tags.js'); $this->rc->output->add_label('cancel', 'save'); $this->plugin->add_label('tags', 'add', 'edit', 'delete', 'saving', - 'nameempty', 'nameexists', 'colorinvalid', 'untag'); + 'nameempty', 'nameexists', 'colorinvalid', 'untag', 'tagname', 'tagcolor'); $this->rc->output->add_handlers(array( 'plugin.taglist' => array($this, 'taglist'),
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_tags/localization/en_US.inc
Changed
@@ -11,6 +11,8 @@ $labels['add'] = 'Add'; $labels['edit'] = 'Edit'; $labels['delete'] = 'Delete'; +$labels['tagname'] = 'Name'; +$labels['tagcolor'] = 'Color'; $labels['nameempty'] = 'Tag name cannot be empty!'; $labels['nameexists'] = 'Tag with specified name already exists!'; $labels['colorinvalid'] = 'Invalid color specification!';
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/kolab_tags/skins/larry/style.css
Changed
@@ -97,10 +97,13 @@ float: left; } -#tageditform input[type=button] { +#tageditform input { + margin-bottom: 5px; +} + +#tageditform label { + width: 60px; display: inline-block; - width: 80px; - margin-top: 10px; } .tagbox {
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/libkolab/lib/kolab_storage_config.php
Changed
@@ -187,8 +187,7 @@ } // fetch the object to find folder - $list = $this->get_object($uid); - $object = $list[0]; + $object = $this->get_object($uid); if (!$object) { return false;
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/tasklist/tasklist.php
Changed
@@ -1172,10 +1172,17 @@ $this->ui->init_templates(); echo $this->api->output->parse('tasklist.taskedit', false, false); + + $script_add = ''; + foreach ($this->ui->get_gui_objects() as $obj => $id) { + $script_add .= rcmail_output::JS_OBJECT_NAME . ".gui_object('$obj', '$id');\n"; + } + echo html::tag('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => $this->url($this->local_skin_path() . '/tagedit.css'), 'nl' => true)); echo html::tag('script', array('type' => 'text/javascript'), - "rcmail.set_env(" . json_encode($env) . ");\n". - "rcmail.add_label(" . json_encode($texts) . ");\n" + rcmail_output::JS_OBJECT_NAME . ".set_env(" . json_encode($env) . ");\n". + rcmail_output::JS_OBJECT_NAME . ".add_label(" . json_encode($texts) . ");\n". + $script_add ); exit; }
View file
roundcubemail-plugins-kolab-3.2.tar.gz/plugins/tasklist/tasklist_ui.php
Changed
@@ -27,6 +27,7 @@ private $rc; private $plugin; private $ready = false; + private $gui_objects = array(); function __construct($plugin) { @@ -175,7 +176,7 @@ } $this->rc->output->set_env('tasklists', $jsenv); - $this->rc->output->add_gui_object('tasklistslist', $attrib['id']); + $this->register_gui_object('tasklistslist', $attrib['id']); return html::tag('ul', $attrib, $html, html::$common_attrib); } @@ -278,13 +279,17 @@ $attrib['name'] = 'list'; $attrib['is_escaped'] = true; $select = new html_select($attrib); + $default = null; foreach ((array)$this->plugin->driver->get_lists() as $id => $prop) { - if ($prop['editable']) + if ($prop['editable']) { $select->add($prop['name'], $id); + if (!$default || $prop['default']) + $default = $id; + } } - return $select->show(null); + return $select->show($default); } @@ -334,7 +339,7 @@ $input = new html_inputfield(array('name' => 'text', 'id' => 'quickaddinput')); $button = html::tag('input', array('type' => 'submit', 'value' => '+', 'title' => $this->plugin->gettext('createtask'), 'class' => 'button mainaction')); - $this->rc->output->add_gui_object('quickaddform', $attrib['id']); + $this->register_gui_object('quickaddform', $attrib['id']); return html::tag('form', $attrib, $label . $input->show() . $button); } @@ -345,7 +350,7 @@ { $attrib += array('id' => 'rcmtaskslist'); - $this->rc->output->add_gui_object('resultlist', $attrib['id']); + $this->register_gui_object('resultlist', $attrib['id']); unset($attrib['name']); return html::tag('ul', $attrib, ''); @@ -359,7 +364,7 @@ $attrib += array('id' => 'rcmtasktagslist'); unset($attrib['name']); - $this->rc->output->add_gui_object('tagslist', $attrib['id']); + $this->register_gui_object('tagslist', $attrib['id']); return html::tag('ul', $attrib, ''); } @@ -369,7 +374,7 @@ function tags_editline($attrib) { $attrib += array('id' => 'rcmtasktagsedit'); - $this->rc->output->add_gui_object('edittagline', $attrib['id']); + $this->register_gui_object('edittagline', $attrib['id']); $input = new html_inputfield(array('name' => 'tags[]', 'class' => 'tag', 'size' => $attrib['size'], 'tabindex' => $attrib['tabindex'])); unset($attrib['tabindex']); @@ -384,7 +389,7 @@ if (!$attrib['id']) $attrib['id'] = 'rcmtaskattachmentlist'; - $this->rc->output->add_gui_object('attachmentlist', $attrib['id']); + $this->register_gui_object('attachmentlist', $attrib['id']); return html::tag('ul', $attrib, '', html::$common_attrib); } @@ -423,7 +428,7 @@ function file_drop_area($attrib = array()) { if ($attrib['id']) { - $this->rc->output->add_gui_object('filedrop', $attrib['id']); + $this->register_gui_object('filedrop', $attrib['id']); $this->rc->output->set_env('filedrop', array('action' => 'upload', 'fieldname' => '_attachments')); } } @@ -477,4 +482,22 @@ $checkbox = new html_checkbox(array('name' => '_notify', 'id' => 'edit-attendees-donotify', 'value' => 1)); return html::div($attrib, html::label(null, $checkbox->show(1) . ' ' . $this->plugin->gettext('sendnotifications'))); } + + /** + * Wrapper for rcube_output_html::add_gui_object() + */ + function register_gui_object($name, $id) + { + $this->gui_objects[$name] = $id; + $this->rc->output->add_gui_object($name, $id); + } + + /** + * Getter for registered gui objects. + * (for manual registration when loading the inline UI) + */ + function get_gui_objects() + { + return $this->gui_objects; + } }
View file
roundcubemail-plugins-kolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: roundcubemail-plugins-kolab Binary: roundcubemail-plugins-kolab Architecture: all -Version: 1:3.2~dev20140404-0~kolab3 +Version: 1:3.2~dev20140812-0~kolab1 Maintainer: Christoph Wickert <wickert@kolabsys.com> Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Standards-Version: 3.9.3
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
.