Make URLs in task titles clickable (#2289)
This commit is contained in:
parent
777fb89394
commit
ed6fd93ac5
2 changed files with 7 additions and 4 deletions
|
@ -281,7 +281,7 @@ function rcube_libcalendaring(settings)
|
|||
var mailto_pattern = new RegExp('([^\\s\\n\\(\\);]+@'+utf_domain+')', 'ig');
|
||||
|
||||
return html
|
||||
.replace(link_pattern, '<a href="$1$2" target="_blank">$1$2</a>')
|
||||
.replace(link_pattern, '<a href="$1$2" class="extlink" target="_blank">$1$2</a>')
|
||||
.replace(mailto_pattern, '<a href="mailto:$1">$1</a>')
|
||||
.replace(/(mailto:)([^"]+)"/g, '$1$2" onclick="rcmail.command(\'compose\', \'$2\');return false"')
|
||||
.replace(/\n/g, "<br/>");
|
||||
|
|
|
@ -297,7 +297,10 @@ function rcube_tasklist_ui(settings)
|
|||
}
|
||||
e.bubble = false;
|
||||
break;
|
||||
|
||||
|
||||
case 'extlink':
|
||||
return true;
|
||||
|
||||
default:
|
||||
if (e.target.nodeName != 'INPUT')
|
||||
task_show_dialog(id);
|
||||
|
@ -642,7 +645,7 @@ function rcube_tasklist_ui(settings)
|
|||
'<div class="progressbar"><div class="progressvalue" style="width:' + (rec.complete * 100) + '%"></div></div>' +
|
||||
'<input type="checkbox" name="completed[]" value="1" class="complete" ' + (rec.complete == 1.0 ? 'checked="checked" ' : '') + '/>' +
|
||||
'<span class="flagged"></span>' +
|
||||
'<span class="title">' + Q(rec.title) + '</span>' +
|
||||
'<span class="title">' + text2html(Q(rec.title)) + '</span>' +
|
||||
'<span class="tags">' + tags_html + '</span>' +
|
||||
'<span class="date">' + Q(rec.date || rcmail.gettext('nodate','tasklist')) + '</span>' +
|
||||
'<a href="#" class="actions">V</a>'
|
||||
|
@ -908,7 +911,7 @@ function rcube_tasklist_ui(settings)
|
|||
|
||||
// fill dialog data
|
||||
$('#task-parent-title').html(Q(rec.parent_title || '')+' »').css('display', rec.parent_title ? 'block' : 'none');
|
||||
$('#task-title').html(Q(rec.title || ''));
|
||||
$('#task-title').html(text2html(Q(rec.title || '')));
|
||||
$('#task-description').html(text2html(rec.description || '', 300, 6))[(rec.description ? 'show' : 'hide')]();
|
||||
$('#task-date')[(rec.date ? 'show' : 'hide')]().children('.task-text').html(Q(rec.date || rcmail.gettext('nodate','tasklist')));
|
||||
$('#task-time').html(Q(rec.time || ''));
|
||||
|
|
Loading…
Add table
Reference in a new issue