Merge branch 'master' of ssh://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab

This commit is contained in:
Aleksander Machniak 2016-02-29 10:39:32 +01:00
commit bef4dfc978
8 changed files with 47 additions and 38 deletions

View file

@ -1112,7 +1112,7 @@ td.topalign {
#eventedit .edit-attendees-table th.invite,
#eventedit .edit-attendees-table td.invite {
width: 44px;
width: 50px;
padding: 2px;
}

View file

@ -188,8 +188,8 @@ rcube_webmail.prototype.delegate_save = function()
}
data.folders = {};
$('input.read:checked').each(function(i, elem) {
data.folders[elem.value] = 1;
$('input.read').each(function(i, elem) {
data.folders[elem.value] = this.checked ? 1 : 0;
});
$('input.write:checked').each(function(i, elem) {
data.folders[elem.value] = 2;

View file

@ -105,6 +105,9 @@ class kolab_delegation_engine
if ($r) {
$storage->set_acl($folder_name, $uid, $r);
}
else {
$storage->delete_acl($folder_name, $uid);
}
if (!empty($folders) && isset($folders[$folder_name])) {
unset($folders[$folder_name]);
@ -863,12 +866,10 @@ class kolab_delegation_engine
/**
* Compares two ACLs (according to supported rights)
*
* @todo: this is stolen from acl plugin, move to rcube_storage/rcube_imap
*
* @param array $acl1 ACL rights array (or string)
* @param array $acl2 ACL rights array (or string)
*
* @param int Comparision result, 2 - full match, 1 - partial match, 0 - no match
* @param bool True if $acl1 contains all rights from $acl2
*/
function acl_compare($acl1, $acl2)
{
@ -884,12 +885,9 @@ class kolab_delegation_engine
$cnt1 = count($res);
$cnt2 = count($acl2);
if ($cnt1 == $cnt2)
return 2;
else if ($cnt1)
return 1;
else
return 0;
if ($cnt1 >= $cnt2) {
return true;
}
}
/**

View file

@ -79,10 +79,6 @@ class kolab_tags extends rcube_plugin
return;
}
if ($this->rc->action == 'print') {
return;
}
if ($engine = $this->engine()) {
$engine->ui();
}

View file

@ -47,26 +47,32 @@ class kolab_tags_engine
public function ui()
{
// set templates of Files UI and widgets
if ($this->rc->task == 'mail') {
$this->plugin->add_texts('localization/');
$this->plugin->include_stylesheet($this->plugin->local_skin_path().'/style.css');
$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', 'tagname',
'tagcolor', 'tagsearchnew', 'newtag');
$this->rc->output->add_handlers(array(
'plugin.taglist' => array($this, 'taglist'),
));
$ui = $this->rc->output->parse('kolab_tags.ui', false, false);
$this->rc->output->add_footer($ui);
// load miniColors
jqueryui::miniColors();
if ($this->rc->task != 'mail') {
return;
}
if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview'))) {
return;
}
$this->plugin->add_texts('localization/');
$this->plugin->include_stylesheet($this->plugin->local_skin_path().'/style.css');
$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', 'tagname',
'tagcolor', 'tagsearchnew', 'newtag');
$this->rc->output->add_handlers(array(
'plugin.taglist' => array($this, 'taglist'),
));
$ui = $this->rc->output->parse('kolab_tags.ui', false, false);
$this->rc->output->add_footer($ui);
// load miniColors
jqueryui::miniColors();
}
/**

View file

@ -957,7 +957,7 @@ a.morelink:hover {
#taskedit .edit-attendees-table th.invite,
#taskedit .edit-attendees-table td.invite {
width: 48px;
width: 50px;
padding: 2px;
}

View file

@ -252,12 +252,16 @@ class tasklist extends rcube_plugin
$rec = $this->prepare_task($rec);
$clone = $this->handle_recurrence($rec, $this->driver->get_task($rec));
if ($success = $this->driver->edit_task($rec)) {
$refresh[] = $this->driver->get_task($rec);
$new_task = $this->driver->get_task($rec);
$new_task['tempid'] = $rec['id'];
$refresh[] = $new_task;
$this->cleanup_task($rec);
// add clone from recurring task
if ($clone && $this->driver->create_task($clone)) {
$refresh[] = $this->driver->get_task($clone);
$new_clone = $this->driver->get_task($clone);
$new_clone['tempid'] = $clone['id'];
$refresh[] = $new_clone;
$this->driver->clear_alarms($rec['id']);
}
@ -268,6 +272,7 @@ class tasklist extends rcube_plugin
if ($this->driver->move_task($child)) {
$r = $this->driver->get_task($child);
if ((bool)($filter & self::FILTER_MASK_COMPLETE) == $this->driver->is_complete($r)) {
$r['tempid'] = $cid;
$refresh[] = $r;
}
}

View file

@ -44,6 +44,10 @@ class tasklist_ui
return;
}
if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview', 'print', 'index'))) {
return;
}
// add taskbar button
$this->plugin->add_button(array(
'command' => 'tasks',