Allow adding tags from autocomplete; use class selector for tagcloud styles
This commit is contained in:
parent
1fdec3bc57
commit
27a669a195
5 changed files with 12 additions and 20 deletions
|
@ -176,7 +176,7 @@
|
||||||
$(this).bind('transformToTag', function(event, id) {
|
$(this).bind('transformToTag', function(event, id) {
|
||||||
var oldValue = (typeof id != 'undefined' && (id.length > 0 || id > 0));
|
var oldValue = (typeof id != 'undefined' && (id.length > 0 || id > 0));
|
||||||
|
|
||||||
var checkAutocomplete = oldValue == true? false : true;
|
var checkAutocomplete = oldValue == true || options.autocompleteOptions.noCheck ? false : true;
|
||||||
// check if the Value ist new
|
// check if the Value ist new
|
||||||
var isNewResult = isNew($(this).val(), checkAutocomplete);
|
var isNewResult = isNew($(this).val(), checkAutocomplete);
|
||||||
if(isNewResult[0] === true || (isNewResult[0] === false && typeof isNewResult[1] == 'string')) {
|
if(isNewResult[0] === true || (isNewResult[0] === false && typeof isNewResult[1] == 'string')) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ html.ie7 #taskselector li.selected.overdue .count {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
html.ie7 #tagslist li,
|
html.ie7 .tagcloud li,
|
||||||
html.ie7 #taskselector li {
|
html.ie7 #taskselector li {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ body.attachmentwin #topnav .topright {
|
||||||
padding-right: 0.3em;
|
padding-right: 0.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tagslist li,
|
.tagcloud li,
|
||||||
#taskselector li a {
|
#taskselector li a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #004458;
|
color: #004458;
|
||||||
|
@ -108,7 +108,7 @@ body.attachmentwin #topnav .topright {
|
||||||
color: #97b3bf;
|
color: #97b3bf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tagslist li.selected,
|
.tagcloud li.selected,
|
||||||
#taskselector li.selected a {
|
#taskselector li.selected a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #005d76;
|
background: #005d76;
|
||||||
|
@ -171,13 +171,13 @@ body.attachmentwin #topnav .topright {
|
||||||
border-color: #ff3800 transparent;
|
border-color: #ff3800 transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tagslist {
|
.tagcloud {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 6px;
|
margin: 6px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tagslist li {
|
.tagcloud li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #004458;
|
color: #004458;
|
||||||
padding-right: 0.2em;
|
padding-right: 0.2em;
|
||||||
|
@ -187,14 +187,14 @@ body.attachmentwin #topnav .topright {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tagslist li.inactive {
|
.tagcloud li.inactive {
|
||||||
color: #89b3be;
|
color: #89b3be;
|
||||||
padding-right: 0.6em;
|
padding-right: 0.6em;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
/* display: none; */
|
/* display: none; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#tagslist li .count {
|
.tagcloud li .count {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
@ -212,7 +212,7 @@ body.attachmentwin #topnav .topright {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-draghelper .tag .count,
|
.tag-draghelper .tag .count,
|
||||||
#tagslist li.inactive .count {
|
.tagcloud li.inactive .count {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div id="tagsbox" class="uibox listbox">
|
<div id="tagsbox" class="uibox listbox">
|
||||||
<h2 class="boxtitle"><roundcube:label name="tasklist.tags" id="taglist" /></h2>
|
<h2 class="boxtitle"><roundcube:label name="tasklist.tags" id="taglist" /></h2>
|
||||||
<div class="scroller">
|
<div class="scroller">
|
||||||
<roundcube:object name="plugin.tagslist" id="tagslist" />
|
<roundcube:object name="plugin.tagslist" id="tagslist" class="tagcloud" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1205,7 +1205,7 @@ function rcube_tasklist_ui(settings)
|
||||||
animSpeed: 100,
|
animSpeed: 100,
|
||||||
allowEdit: false,
|
allowEdit: false,
|
||||||
checkNewEntriesCaseSensitive: false,
|
checkNewEntriesCaseSensitive: false,
|
||||||
autocompleteOptions: { source: tags, minLength: 0 },
|
autocompleteOptions: { source: tags, minLength: 0, noCheck: true },
|
||||||
texts: { removeLinkTitle: rcmail.gettext('removetag', 'tasklist') }
|
texts: { removeLinkTitle: rcmail.gettext('removetag', 'tasklist') }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1341,9 +1341,6 @@ function rcube_tasklist_ui(settings)
|
||||||
resizable: (!bw.ie6 && !bw.ie7), // disable for performance reasons
|
resizable: (!bw.ie6 && !bw.ie7), // disable for performance reasons
|
||||||
closeOnEscape: false,
|
closeOnEscape: false,
|
||||||
title: rcmail.gettext((action == 'edit' ? 'edittask' : 'newtask'), 'tasklist'),
|
title: rcmail.gettext((action == 'edit' ? 'edittask' : 'newtask'), 'tasklist'),
|
||||||
open: function() {
|
|
||||||
$dialog.parent().find('.ui-dialog-buttonset .ui-button').first().addClass('mainaction');
|
|
||||||
},
|
|
||||||
close: function() {
|
close: function() {
|
||||||
editform.hide().appendTo(document.body);
|
editform.hide().appendTo(document.body);
|
||||||
$dialog.dialog('destroy').remove();
|
$dialog.dialog('destroy').remove();
|
||||||
|
@ -1667,12 +1664,7 @@ function rcube_tasklist_ui(settings)
|
||||||
resizable: true,
|
resizable: true,
|
||||||
closeOnEscape: false,
|
closeOnEscape: false,
|
||||||
title: rcmail.gettext((list.id ? 'editlist' : 'createlist'), 'tasklist'),
|
title: rcmail.gettext((list.id ? 'editlist' : 'createlist'), 'tasklist'),
|
||||||
open: function() {
|
close: function() { $dialog.dialog('destroy').hide(); },
|
||||||
$dialog.parent().find('.ui-dialog-buttonset .ui-button').first().addClass('mainaction');
|
|
||||||
},
|
|
||||||
close: function() {
|
|
||||||
$dialog.dialog('destroy').hide();
|
|
||||||
},
|
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
minWidth: 400,
|
minWidth: 400,
|
||||||
width: 420
|
width: 420
|
||||||
|
|
Loading…
Add table
Reference in a new issue