Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube
This commit is contained in:
commit
ccd75c9ac1
9 changed files with 47 additions and 14 deletions
|
@ -1340,7 +1340,7 @@ class calendar extends rcube_plugin
|
||||||
$rrule .= $k . '=' . $val . ';';
|
$rrule .= $k . '=' . $val . ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rrule;
|
return rtrim($rrule, ';');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -129,10 +129,10 @@ class kolab_format_task extends kolab_format_xcal
|
||||||
$tags = array();
|
$tags = array();
|
||||||
|
|
||||||
if ($this->data['status'] == 'COMPLETED' || $this->data['complete'] == 100)
|
if ($this->data['status'] == 'COMPLETED' || $this->data['complete'] == 100)
|
||||||
$tags[] = 'complete';
|
$tags[] = 'x-complete';
|
||||||
|
|
||||||
if ($this->data['priority'] == 1)
|
if ($this->data['priority'] == 1)
|
||||||
$tags[] = 'flagged';
|
$tags[] = 'x-flagged';
|
||||||
|
|
||||||
if (!empty($this->data['alarms']))
|
if (!empty($this->data['alarms']))
|
||||||
$tags[] = 'x-has-alarms';
|
$tags[] = 'x-has-alarms';
|
||||||
|
|
|
@ -28,7 +28,7 @@ abstract class kolab_format_xcal extends kolab_format
|
||||||
{
|
{
|
||||||
public $CTYPE = 'application/calendar+xml';
|
public $CTYPE = 'application/calendar+xml';
|
||||||
|
|
||||||
public static $fulltext_cols = array('title', 'description', 'location', 'attendees:name', 'attendees:email');
|
public static $fulltext_cols = array('title', 'description', 'location', 'attendees:name', 'attendees:email', 'categories');
|
||||||
|
|
||||||
protected $sensitivity_map = array(
|
protected $sensitivity_map = array(
|
||||||
'public' => kolabformat::ClassPublic,
|
'public' => kolabformat::ClassPublic,
|
||||||
|
|
|
@ -219,10 +219,10 @@ class tasklist_kolab_driver extends tasklist_driver
|
||||||
$counts = array('all' => 0, 'flagged' => 0, 'today' => 0, 'tomorrow' => 0, 'overdue' => 0, 'nodate' => 0);
|
$counts = array('all' => 0, 'flagged' => 0, 'today' => 0, 'tomorrow' => 0, 'overdue' => 0, 'nodate' => 0);
|
||||||
foreach ($lists as $list_id) {
|
foreach ($lists as $list_id) {
|
||||||
$folder = $this->folders[$list_id];
|
$folder = $this->folders[$list_id];
|
||||||
foreach ((array)$folder->select(array(array('tags','!~','complete'))) as $record) {
|
foreach ((array)$folder->select(array(array('tags','!~','x-complete'))) as $record) {
|
||||||
$rec = $this->_to_rcube_task($record);
|
$rec = $this->_to_rcube_task($record);
|
||||||
|
|
||||||
if ($rec['complete']) // don't count complete tasks
|
if ($rec['complete'] >= 1.0) // don't count complete tasks
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$counts['all']++;
|
$counts['all']++;
|
||||||
|
@ -265,9 +265,9 @@ class tasklist_kolab_driver extends tasklist_driver
|
||||||
// query Kolab storage
|
// query Kolab storage
|
||||||
$query = array();
|
$query = array();
|
||||||
if ($filter['mask'] & tasklist::FILTER_MASK_COMPLETE)
|
if ($filter['mask'] & tasklist::FILTER_MASK_COMPLETE)
|
||||||
$query[] = array('tags','~','complete');
|
$query[] = array('tags','~','x-complete');
|
||||||
else
|
else
|
||||||
$query[] = array('tags','!~','complete');
|
$query[] = array('tags','!~','x-complete');
|
||||||
|
|
||||||
// full text search (only works with cache enabled)
|
// full text search (only works with cache enabled)
|
||||||
if ($filter['search']) {
|
if ($filter['search']) {
|
||||||
|
|
BIN
plugins/tasklist/skins/larry/buttons.png
Normal file
BIN
plugins/tasklist/skins/larry/buttons.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
|
@ -13,13 +13,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#taskbar a.button-tasklist span.button-inner {
|
#taskbar a.button-tasklist span.button-inner {
|
||||||
background-image: url(taskbaricon.png);
|
background-image: url(buttons.png);
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#taskbar a.button-tasklist:hover span.button-inner,
|
#taskbar a.button-tasklist:hover span.button-inner,
|
||||||
#taskbar a.button-tasklist.button-selected span.button-inner {
|
#taskbar a.button-tasklist.button-selected span.button-inner {
|
||||||
background-position: 0 -44px;
|
background-position: 0 -26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar {
|
#sidebar {
|
||||||
|
@ -165,6 +165,7 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #004458;
|
color: #004458;
|
||||||
margin-right: 0.5em;
|
margin-right: 0.5em;
|
||||||
|
margin-bottom: 0.4em;
|
||||||
min-width: 1.2em;
|
min-width: 1.2em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
@ -215,6 +216,11 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#taskstoolbar a.button.newtask {
|
||||||
|
background-image: url(buttons.png);
|
||||||
|
background-position: center -53px;
|
||||||
|
}
|
||||||
|
|
||||||
.tasklistview #quicksearchbar {
|
.tasklistview #quicksearchbar {
|
||||||
top: -7px;
|
top: -7px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ function rcube_tasklist(settings)
|
||||||
var selector = 'all';
|
var selector = 'all';
|
||||||
var tagsfilter = null;
|
var tagsfilter = null;
|
||||||
var filtermask = FILTER_MASK_ALL;
|
var filtermask = FILTER_MASK_ALL;
|
||||||
var loadstate = { filter:-1, lists:'' };
|
var loadstate = { filter:-1, lists:'', search:null };
|
||||||
var idcount = 0;
|
var idcount = 0;
|
||||||
var saving_lock;
|
var saving_lock;
|
||||||
var ui_loading;
|
var ui_loading;
|
||||||
|
@ -310,7 +310,7 @@ function rcube_tasklist(settings)
|
||||||
|
|
||||||
var active = active_lists(),
|
var active = active_lists(),
|
||||||
basefilter = filtermask == FILTER_MASK_COMPLETE ? FILTER_MASK_COMPLETE : FILTER_MASK_ALL,
|
basefilter = filtermask == FILTER_MASK_COMPLETE ? FILTER_MASK_COMPLETE : FILTER_MASK_ALL,
|
||||||
reload = active.join(',') != loadstate.lists || basefilter != loadstate.filter;
|
reload = active.join(',') != loadstate.lists || basefilter != loadstate.filter || loadstate.search != search_query;
|
||||||
|
|
||||||
if (active.length && reload) {
|
if (active.length && reload) {
|
||||||
ui_loading = rcmail.set_busy(true, 'loading');
|
ui_loading = rcmail.set_busy(true, 'loading');
|
||||||
|
@ -333,6 +333,8 @@ function rcube_tasklist(settings)
|
||||||
listdata = {};
|
listdata = {};
|
||||||
loadstate.lists = response.lists;
|
loadstate.lists = response.lists;
|
||||||
loadstate.filter = response.filter;
|
loadstate.filter = response.filter;
|
||||||
|
loadstate.search = response.search;
|
||||||
|
|
||||||
for (var i=0; i < response.data.length; i++) {
|
for (var i=0; i < response.data.length; i++) {
|
||||||
listdata[response.data[i].id] = response.data[i];
|
listdata[response.data[i].id] = response.data[i];
|
||||||
}
|
}
|
||||||
|
@ -379,6 +381,12 @@ function rcube_tasklist(settings)
|
||||||
$.each(newtags, function(i, tag){
|
$.each(newtags, function(i, tag){
|
||||||
$('<li>').attr('rel', tag).data('value', tag).html(Q(tag)).appendTo(rcmail.gui_objects.tagslist);
|
$('<li>').attr('rel', tag).data('value', tag).html(Q(tag)).appendTo(rcmail.gui_objects.tagslist);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// re-sort tags list
|
||||||
|
$(rcmail.gui_objects.tagslist).children('li').sortElements(function(a,b){
|
||||||
|
console.log($.text([a]), $.text([b]))
|
||||||
|
return $.text([a]).toLowerCase() > $.text([b]).toLowerCase() ? 1 : -1;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1130,6 +1138,25 @@ function rcube_tasklist(settings)
|
||||||
};
|
};
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
// from http://james.padolsey.com/javascript/sorting-elements-with-jquery/
|
||||||
|
jQuery.fn.sortElements = (function(){
|
||||||
|
var sort = [].sort;
|
||||||
|
|
||||||
|
return function(comparator, getSortable) {
|
||||||
|
getSortable = getSortable || function(){ return this };
|
||||||
|
|
||||||
|
var last = null;
|
||||||
|
return sort.call(this, comparator).each(function(i){
|
||||||
|
// at this point the array is sorted, so we can just detach each one from wherever it is, and add it after the last
|
||||||
|
var node = $(getSortable.call(this));
|
||||||
|
var parent = node.parent();
|
||||||
|
if (last) last.after(node);
|
||||||
|
else parent.prepend(node);
|
||||||
|
last = node;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
/* tasklist plugin UI initialization */
|
/* tasklist plugin UI initialization */
|
||||||
var rctasks;
|
var rctasks;
|
||||||
|
|
|
@ -313,7 +313,7 @@ class tasklist extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public function fetch_counts()
|
public function fetch_counts()
|
||||||
{
|
{
|
||||||
$lists = null;
|
$lists = get_input_value('lists', RCUBE_INPUT_GPC);;
|
||||||
$counts = $this->driver->count_tasks($lists);
|
$counts = $this->driver->count_tasks($lists);
|
||||||
$this->rc->output->command('plugin.update_counts', $counts);
|
$this->rc->output->command('plugin.update_counts', $counts);
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ class tasklist extends rcube_plugin
|
||||||
// sort tasks according to their hierarchy level and due date
|
// sort tasks according to their hierarchy level and due date
|
||||||
usort($data, array($this, 'task_sort_cmp'));
|
usort($data, array($this, 'task_sort_cmp'));
|
||||||
|
|
||||||
$this->rc->output->command('plugin.data_ready', array('filter' => $f, 'lists' => $lists, 'data' => $data, 'tags' => array_values(array_unique($tags))));
|
$this->rc->output->command('plugin.data_ready', array('filter' => $f, 'lists' => $lists, 'search' => $search, 'data' => $data, 'tags' => array_values(array_unique($tags))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue