summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-10-21 12:51:29 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-31 11:51:10 (GMT)
commitee52d6e52f1c85c35f85faebb73b05b0c8210741 (patch)
treeff1bed48cbc72d43798ee3072789629e185b9e99
parent9fc827c2c3ca7322ee4f8d72dce6f85db4a81b2c (diff)
downloadroundcubemail-plugins-kolab-ee52d6e52f1c85c35f85faebb73b05b0c8210741.tar.gz
Show inherited tags in task show dialog (#2368)
-rw-r--r--plugins/tasklist/skins/larry/tasklist.css6
-rw-r--r--plugins/tasklist/tasklist.js16
2 files changed, 20 insertions, 2 deletions
diff --git a/plugins/tasklist/skins/larry/tasklist.css b/plugins/tasklist/skins/larry/tasklist.css
index 173704d..caa5067 100644
--- a/plugins/tasklist/skins/larry/tasklist.css
+++ b/plugins/tasklist/skins/larry/tasklist.css
@@ -806,6 +806,12 @@ label.block {
/* cursor: pointer; */
}
+.form-section span.tag-element.inherit {
+ color: #666;
+ background: #f2f2f2;
+ border-color: #ddd;
+}
+
.tagedit-list li.tagedit-listelement-old a.tagedit-close,
.tagedit-list li.tagedit-listelement-old a.tagedit-break,
.tagedit-list li.tagedit-listelement-old a.tagedit-delete,
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index e52174b..19db0fe 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -921,10 +921,22 @@ function rcube_tasklist_ui(settings)
$('#task-completeness .task-text').html(((rec.complete || 0) * 100) + '%');
$('#task-list .task-text').html(Q(me.tasklists[rec.list] ? me.tasklists[rec.list].name : ''));
- var taglist = $('#task-tags')[(rec.tags && rec.tags.length ? 'show' : 'hide')]().children('.task-text').empty();
+ var itags = get_inherited_tags(rec);
+ var taglist = $('#task-tags')[(rec.tags && rec.tags.length || itags.length ? 'show' : 'hide')]().children('.task-text').empty();
if (rec.tags && rec.tags.length) {
$.each(rec.tags, function(i,val){
- $('<span>').addClass('tag-element').html(Q(val)).data('value', val).appendTo(taglist);
+ $('<span>').addClass('tag-element').html(Q(val)).appendTo(taglist);
+ });
+ }
+
+ // append inherited tags
+ if (itags.length) {
+ $.each(itags, function(i,val){
+ $('<span>').addClass('tag-element inherit').html(Q(val)).appendTo(taglist);
+ });
+ // re-sort tags list
+ $(taglist).children().sortElements(function(a,b){
+ return $.text([a]).toLowerCase() > $.text([b]).toLowerCase() ? 1 : -1;
});
}