mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
closed #74
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -84,11 +84,11 @@
|
||||
<div class="post-signature">{posts.signature}</div>
|
||||
<div class="profile-block">
|
||||
<span class="post-buttons">
|
||||
<div id="ids_{posts.pid}_{posts.uid}" class="edit {posts.display_moderator_tools} hidden-phone" title="Edit"><i class="icon-pencil"></i></div>
|
||||
<div id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone" title="Delete"><i class="icon-trash"></i></div>
|
||||
<div id="quote_{posts.pid}_{posts.uid}" class="quote hidden-phone" title="Quote"><i class="icon-quote-left"></i></div>
|
||||
<div id="favs_{posts.pid}_{posts.uid}" class="favourite hidden-phone" title="Favourite"><span class="post_rep_{posts.pid}">{posts.post_rep} </span><i class="{posts.fav_star_class}"></i></div>
|
||||
<div class="post_reply" title="Reply"><i class="icon-reply"></i></div>
|
||||
<button id="ids_{posts.pid}_{posts.uid}" class="edit {posts.display_moderator_tools} hidden-phone" title="Edit"><i class="icon-pencil"></i></button>
|
||||
<button id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone" title="Delete"><i class="icon-trash"></i></button>
|
||||
<button id="quote_{posts.pid}_{posts.uid}" class="quote hidden-phone" title="Quote"><i class="icon-quote-left"></i></button>
|
||||
<button id="favs_{posts.pid}_{posts.uid}" class="favourite hidden-phone" title="Favourite"><span class="post_rep_{posts.pid}">{posts.post_rep} </span><i class="{posts.fav_star_class}"></i></button>
|
||||
<button class="post_reply" title="Reply"><i class="icon-reply"></i></button>
|
||||
</span>
|
||||
<img class="hidden-desktop" src="{posts.picture}?s=10&default=identicon" align="left" /> posted by <strong><a class="username-field" href="/users/{posts.userslug}">{posts.username}</a></strong> {posts.relativeTime} ago
|
||||
<span class="{posts.edited-class} hidden-phone">| last edited by <strong><a href="/users/{posts.editorslug}">{posts.editorname}</a></strong> {posts.relativeEditTime} ago</span>
|
||||
|
||||
Reference in New Issue
Block a user