mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
closes #1739
This commit is contained in:
@@ -140,7 +140,7 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com
|
|||||||
if($('.composer').length) {
|
if($('.composer').length) {
|
||||||
composer.addQuote(tid, pid, topicName, username, quoted);
|
composer.addQuote(tid, pid, topicName, username, quoted);
|
||||||
} else {
|
} else {
|
||||||
composer.newReply(tid, pid, topicName, username + ' said:\n' + quoted);
|
composer.newReply(tid, pid, topicName, '[[modules:composer.user_said, ' + username + ']]' + quoted);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,9 +118,7 @@ define('composer', dependencies, function(taskbar, controls, uploads, formatting
|
|||||||
var uuid = composer.active;
|
var uuid = composer.active;
|
||||||
|
|
||||||
if(uuid === undefined){
|
if(uuid === undefined){
|
||||||
translator.translate('[[modules:composer.user_said, ' + username + ']]', function(translated) {
|
composer.newReply(tid, pid, title, '[[modules:composer.user_said, ' + username + ']]' + text);
|
||||||
composer.newReply(tid, pid, title, translated + text);
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,18 +134,21 @@ define('composer', dependencies, function(taskbar, controls, uploads, formatting
|
|||||||
function onTranslated(translated) {
|
function onTranslated(translated) {
|
||||||
composer.posts[uuid].body = (prevText.length ? prevText + '\n\n' : '') + translated + text;
|
composer.posts[uuid].body = (prevText.length ? prevText + '\n\n' : '') + translated + text;
|
||||||
bodyEl.val(composer.posts[uuid].body);
|
bodyEl.val(composer.posts[uuid].body);
|
||||||
|
preview.render($('#cmp-uuid-' + uuid));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
composer.newReply = function(tid, pid, title, text) {
|
composer.newReply = function(tid, pid, title, text) {
|
||||||
|
translator.translate(text, function(translated) {
|
||||||
push({
|
push({
|
||||||
tid: tid,
|
tid: tid,
|
||||||
toPid: pid,
|
toPid: pid,
|
||||||
title: title,
|
title: title,
|
||||||
body: text,
|
body: translated,
|
||||||
modified: false,
|
modified: false,
|
||||||
isMain: false
|
isMain: false
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
composer.editPost = function(pid) {
|
composer.editPost = function(pid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user