v1.18.x
Julian Lam 12 years ago
parent 79584d3178
commit 86ad794918

@ -57,12 +57,16 @@
float: right; float: right;
margin-right: 5px; margin-right: 5px;
div { button {
display: inline-block; display: inline-block;
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
border: none;
border-left: 1px solid #f0f0f0; border-left: 1px solid #f0f0f0;
cursor: pointer; cursor: pointer;
background: none;
font-size: 12px;
height: 20px;
&:last-child { &:last-child {
padding-right: 5px; 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') { if (thread_state.locked !== '1') {
require(['composer'], function(cmp) { 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="post-signature">{posts.signature}</div>
<div class="profile-block"> <div class="profile-block">
<span class="post-buttons"> <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> <button id="ids_{posts.pid}_{posts.uid}" class="edit {posts.display_moderator_tools} hidden-phone" title="Edit"><i class="icon-pencil"></i></button>
<div id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone" title="Delete"><i class="icon-trash"></i></div> <button id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone" title="Delete"><i class="icon-trash"></i></button>
<div id="quote_{posts.pid}_{posts.uid}" class="quote hidden-phone" title="Quote"><i class="icon-quote-left"></i></div> <button id="quote_{posts.pid}_{posts.uid}" class="quote hidden-phone" title="Quote"><i class="icon-quote-left"></i></button>
<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> <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>
<div class="post_reply" title="Reply"><i class="icon-reply"></i></div> <button class="post_reply" title="Reply"><i class="icon-reply"></i></button>
</span> </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 <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> <span class="{posts.edited-class} hidden-phone">| last edited by <strong><a href="/users/{posts.editorslug}">{posts.editorname}</a></strong> {posts.relativeEditTime} ago</span>

Loading…
Cancel
Save