ajax load for additional inline replies; /replies variant of conversationview

This commit is contained in:
Brion Vibber
2011-03-17 16:27:42 -07:00
parent 057a831026
commit 4afa3caae3
5 changed files with 130 additions and 5 deletions

View File

@@ -666,6 +666,18 @@ var SN = { // StatusNet
SN.U.NoticeInlineReplyTrigger(notice);
return false;
});
$('li.notice-reply-comments a')
.live('click', function() {
var url = $(this).attr('href');
var area = $(this).closest('.threaded-replies');
$.get(url, {ajax: 1}, function(data, textStatus, xhr) {
var replies = $('.threaded-replies', data);
if (replies.length) {
area.replaceWith(document._importNode(replies[0], true));
}
});
return false;
});
},
/**