removed duplicate id in topic template, closed #84, where opening a couple threads caused the reply window to load multiple times

v1.18.x
Julian Lam 12 years ago
parent d4a0b3d05a
commit 0e854119c6

@ -221,7 +221,7 @@
}); });
}); });
$('#content').on('click', '.post_reply', function() { var reply_fn = function() {
var selectionText = '', var selectionText = '',
selection = window.getSelection() || document.getSelection(); selection = window.getSelection() || document.getSelection();
@ -235,7 +235,9 @@
cmp.push(tid, null, null, selectionText + '\n\n'); cmp.push(tid, null, null, selectionText + '\n\n');
}); });
} }
}); };
$('.post-container').on('click', '.post_reply', reply_fn);
$('#post_reply').on('click', reply_fn);
$('.post-container').on('click', '.quote', function() { $('.post-container').on('click', '.quote', function() {
if (thread_state.locked !== '1') { if (thread_state.locked !== '1') {

@ -8,6 +8,7 @@ define(['taskbar'], function(taskbar) {
}; };
composer.init = function() { composer.init = function() {
if (!composer.initialized) {
// Create the fixed bottom bar // Create the fixed bottom bar
var taskbar = document.getElementById('taskbar'); var taskbar = document.getElementById('taskbar');
@ -143,6 +144,7 @@ define(['taskbar'], function(taskbar) {
composer.initialized = true; composer.initialized = true;
} }
}
composer.push = function(tid, cid, pid, text) { composer.push = function(tid, cid, pid, text) {
socket.emit('api:composer.push', { socket.emit('api:composer.push', {

@ -48,7 +48,7 @@
<button id="favs_{main_posts.pid}_{main_posts.uid}" class="favourite btn" type="button"> <button id="favs_{main_posts.pid}_{main_posts.uid}" class="favourite btn" type="button">
<span>Favourite</span> <span>Favourite</span>
<span class="post_rep_{main_posts.pid}">{main_posts.post_rep} </span><i class="{main_posts.fav_star_class}"></i></button> <span class="post_rep_{main_posts.pid}">{main_posts.post_rep} </span><i class="{main_posts.fav_star_class}"></i></button>
<button id="post_reply" class="btn btn-primary btn post_reply hidden-phone" type="button">Reply <i class="icon-reply"></i></button> <button class="btn btn-primary btn post_reply hidden-phone" type="button">Reply <i class="icon-reply"></i></button>
</div> </div>
<div style="clear:both; margin-bottom: 10px;"></div> <div style="clear:both; margin-bottom: 10px;"></div>

Loading…
Cancel
Save