diff --git a/public/css/topic.less b/public/css/topic.less index a89e53c0bc..a92a5e221a 100644 --- a/public/css/topic.less +++ b/public/css/topic.less @@ -57,12 +57,16 @@ float: right; margin-right: 5px; - div { + button { display: inline-block; padding-left: 15px; padding-right: 15px; + border: none; border-left: 1px solid #f0f0f0; cursor: pointer; + background: none; + font-size: 12px; + height: 20px; &:last-child { padding-right: 5px; diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 7f74eadb87..063183ffe5 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -221,10 +221,18 @@ }); }); - $('.container').on('click', '.post_reply', function() { + $('#content').on('click', '.post_reply', function() { + var selectionText = '', + selection = window.getSelection() || document.getSelection(); + + if ($(selection.baseNode).parents('.post-content').length > 0) { + var snippet = selection.toString(); + if (snippet.length > 0) selectionText = '> ' + snippet.replace(/\n/g, '\n> '); + } + if (thread_state.locked !== '1') { require(['composer'], function(cmp) { - cmp.push(tid); + cmp.push(tid, null, null, selectionText + '\n\n'); }); } }); diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 7ef124deca..177b95956c 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -84,11 +84,11 @@
{posts.signature}
-
-
-
-
{posts.post_rep}
-
+ + + + +
posted by {posts.username} {posts.relativeTime} ago | last edited by {posts.editorname} {posts.relativeEditTime} ago