added auto mention if u click post reply

v1.18.x
Baris Soner Usakli 11 years ago
parent ee63fae803
commit c1da56ce45

@ -263,12 +263,20 @@ define(function() {
if ($(selection.baseNode).parents('.post-content').length > 0) {
var snippet = selection.toString();
if (snippet.length > 0) selectionText = '> ' + snippet.replace(/\n/g, '\n> ');
if (snippet.length > 0) {
selectionText = '> ' + snippet.replace(/\n/g, '\n> ');
}
}
var username = '',
post = $(this).parents('li[data-pid]');
if(post.length) {
username = '@' + post.attr('data-username') + ' ';
}
if (thread_state.locked !== '1') {
require(['composer'], function(cmp) {
cmp.push(tid, null, null, selectionText.length > 0 ? selectionText + '\n\n' : '');
cmp.push(tid, null, null, selectionText.length > 0 ? selectionText + '\n\n' + username : '' + username);
});
}
});

Loading…
Cancel
Save