Add a span in the reply hider.

This commit is contained in:
Nicolas Stepien 2012-05-01 15:52:28 +02:00
parent 7b20be3a91
commit fabd887317
2 changed files with 8 additions and 6 deletions

View File

@ -931,8 +931,8 @@
return;
}
button = post.el.previousElementSibling;
button.innerHTML = '<a href="javascript:;">[ - ]</a>';
$.addClass(button, 'hide_reply_button');
button.innerHTML = '<a href="javascript:;"><span>[ - ]</span></a>';
$.on(button.firstChild, 'click', ReplyHiding.toggle);
if (post.id in g.hiddenReplies) {
return ReplyHiding.hide(post.root.firstElementChild);
@ -969,7 +969,8 @@
button.hidden = true;
return;
}
return button.firstChild.textContent = "[ + ] " + ($('.nameBlock', button.nextElementSibling).textContent);
button.firstChild.firstChild.textContent = '[ + ]';
return $.add(button.firstChild, $.tn(" " + ($('.nameBlock', button.nextElementSibling).textContent)));
},
show: function(button) {
$.removeClass(button, 'hidden_reply');
@ -977,7 +978,7 @@
button.hidden = false;
return;
}
return button.firstChild.textContent = '[ - ]';
return button.firstChild.innerHTML = '<span>[ - ]</span>';
}
};

View File

@ -735,8 +735,8 @@ ReplyHiding =
node: (post) ->
return if post.isInlined or /\bop\b/.test post.class
button = post.el.previousElementSibling
button.innerHTML = '<a href="javascript:;">[ - ]</a>'
$.addClass button, 'hide_reply_button'
button.innerHTML = '<a href="javascript:;"><span>[ - ]</span></a>'
$.on button.firstChild, 'click', ReplyHiding.toggle
if post.id of g.hiddenReplies
@ -766,7 +766,8 @@ ReplyHiding =
button.hidden = true
return
button.firstChild.textContent = "[ + ] #{$('.nameBlock', button.nextElementSibling).textContent}"
button.firstChild.firstChild.textContent = '[ + ]'
$.add button.firstChild, $.tn " #{$('.nameBlock', button.nextElementSibling).textContent}"
show: (button) ->
$.removeClass button, 'hidden_reply'
@ -775,7 +776,7 @@ ReplyHiding =
button.hidden = false
return
button.firstChild.textContent = '[ - ]'
button.firstChild.innerHTML = '<span>[ - ]</span>'
Keybinds =
init: ->