Clean up threaded notices vs replies classes, and fixed realtime's threaded behavior to only run on threaded lists
This commit is contained in:
10
js/util.js
10
js/util.js
@@ -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);
|
||||
|
Reference in New Issue
Block a user