fixing quoting that broke with the introduction of the new post window

This commit is contained in:
Julian Lam
2013-06-06 15:56:44 -04:00
parent a09cfd9304
commit 7e55e7b3d2
4 changed files with 18 additions and 15 deletions

View File

@@ -443,10 +443,15 @@
if (thread_state.locked !== '1') {
var pid = $(this).parents('li').attr('data-pid');
require(['composer'], function(cmp) {
cmp.push(tid);
$('.post-window textarea').val('> ' + $('#content_' + pid).html() + '\n');
socket.once('api:posts.getRawPost', function(data) {
quoted = '> ' + data.post.replace(/\n/g, '\n> ') + '\n\n';
require(['composer'], function(cmp) {
cmp.push(tid, null, null, quoted);
});
});
socket.emit('api:posts.getRawPost', { pid: pid });
// $('.post-window textarea').val('> ' + $('#content_' + pid).html() + '\n');
// });
}
});