Clean up threaded notices vs replies classes, and fixed realtime's threaded behavior to only run on threaded lists

This commit is contained in:
Brion Vibber
2011-03-01 16:08:37 -08:00
parent 9fd2ee86f3
commit 764d069ccd
6 changed files with 23 additions and 23 deletions

View File

@@ -575,16 +575,16 @@ var SN = { // StatusNet
// Find the threaded replies view we'll be adding to...
var list = notice.closest('.notices');
if (list.hasClass('threaded-notices')) {
if (list.hasClass('threaded-replies')) {
// We're replying to a reply; use reply form on the end of this list.
// We'll add our form at the end of this; grab the root notice.
parentNotice = list.closest('.notice');
} else {
// We're replying to a parent notice; pull its threaded list
// and we'll add on the end of it. Will add if needed.
list = $('ul.threaded-notices', notice);
list = $('ul.threaded-replies', notice);
if (list.length == 0) {
list = $('<ul class="notices threaded-notices xoxo"></ul>');
list = $('<ul class="notices threaded-replies xoxo"></ul>');
notice.append(list);
}
}
@@ -731,7 +731,7 @@ var SN = { // StatusNet
},
NoticeInlineReplyPlaceholder: function(notice) {
var list = notice.find('ul.threaded-notices');
var list = notice.find('ul.threaded-replies');
var placeholder = $('<li class="notice-reply-placeholder">' +
'<input class="placeholder">' +
'</li>');
@@ -749,7 +749,7 @@ var SN = { // StatusNet
* Uses 'live' rather than 'bind', so applies to future as well as present items.
*/
NoticeInlineReplySetup: function() {
$('.threaded-notices').each(function() {
$('.threaded-replies').each(function() {
var list = $(this);
var notice = list.closest('.notice');
SN.U.NoticeInlineReplyPlaceholder(notice);