dont use toPid if "topic/reply" is clicked

v1.18.x
barisusakli 9 years ago
parent 24704cadbd
commit 5634c5417c

@ -146,12 +146,15 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
if (getData(button, 'data-uid') === '0') {
username = '';
}
var toPid = button.is('[component="post/reply"]') ? getData(button, 'data-pid') : null;
if (selectionText.length) {
$(window).trigger('action:composer.addQuote', {
tid: tid,
slug: ajaxify.data.slug,
index: getData(button, 'data-index'),
pid: getData(button, 'data-pid'),
pid: toPid,
topicName: topicName,
username: username,
text: selectionText
@ -159,7 +162,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
} else {
$(window).trigger('action:composer.post.new', {
tid: tid,
pid: getData(button, 'data-pid'),
pid: toPid,
topicName: topicName,
text: username ? username + ' ' : ''
});

Loading…
Cancel
Save