ukko: fix javascript interoperation

This commit is contained in:
czaks 2013-07-27 00:57:12 -04:00
parent 35f8730f40
commit e3cb427fee
4 changed files with 26 additions and 6 deletions

View file

@ -15,7 +15,7 @@ $(document).ready(function(){
if($('div.banner').length != 0)
return; // not index
$('div.post.op span.omitted').each(function() {
var do_expand = function() {
$(this)
.html($(this).text().replace(_("Click reply to view."), '<a href="javascript:void(0)">'+_("Click to expand")+'</a>.'))
.find('a').click(function() {
@ -52,5 +52,13 @@ $(document).ready(function(){
}
});
});
}
$('div.post.op span.omitted').each(do_expand);
$(document).bind("new_post", function(e, post) {
if (!$(post).hasClass("reply")) {
$(post).find('div.post.op span.omitted').each(do_expand);
}
});
});