plugins/tasklist
Thomas Brüderli
bruederli at kolabsys.com
Mon Oct 21 14:54:00 CEST 2013
plugins/tasklist/skins/larry/tasklist.css | 6 ++++++
plugins/tasklist/tasklist.js | 16 ++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
New commits:
commit 1befe422945b19b51d79737f930a7940fc1a2666
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Mon Oct 21 14:51:29 2013 +0200
Show inherited tags in task show dialog (#2368)
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;
});
}
More information about the commits
mailing list