fix bug with quick-reply and make it nicer

This commit is contained in:
Michael Foster 2013-09-15 07:31:05 +10:00
parent 9a8cebe4a1
commit c8f2f00320
2 changed files with 14 additions and 5 deletions

View file

@ -13,7 +13,9 @@
var show_quick_reply = function(){
if($('div.banner').length == 0)
return; // not index
return;
if($('#quick-reply').length != 0)
return;
$('<style type="text/css">\
#quick-reply {\
@ -148,7 +150,14 @@ var show_quick_reply = function(){
});
};
$(window).on('cite', function() {
$(window).on('cite', function(e, id, with_link) {
show_quick_reply();
$('#quick-reply textarea').focus();
if (with_link) {
console.log(id, with_link);
setTimeout(function() {
highlightReply(id);
$(window).scrollTop($('#' + id).offset().top);
}, 10);
}
});