Cleanup, small bugfix for CatalogLinks
This commit is contained in:
parent
e0dbc28e3c
commit
9340cfda9f
@ -4172,7 +4172,7 @@
|
|||||||
return $.asap((function() {
|
return $.asap((function() {
|
||||||
return $.id('boardNavMobile');
|
return $.id('boardNavMobile');
|
||||||
}), function() {
|
}), function() {
|
||||||
return CatalogLinks.toggle.call(el);
|
return CatalogLinks.toggle.call(input);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -4260,7 +4260,7 @@
|
|||||||
return post.nodes.comment = post.nodes.shortComment;
|
return post.nodes.comment = post.nodes.shortComment;
|
||||||
},
|
},
|
||||||
parse: function(req, a, post) {
|
parse: function(req, a, post) {
|
||||||
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results;
|
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1;
|
||||||
|
|
||||||
status = req.status;
|
status = req.status;
|
||||||
if (![200, 304].contains(status)) {
|
if (![200, 304].contains(status)) {
|
||||||
@ -4299,12 +4299,10 @@
|
|||||||
post.parseComment();
|
post.parseComment();
|
||||||
post.parseQuotes();
|
post.parseQuotes();
|
||||||
_ref1 = ExpandComment.callbacks;
|
_ref1 = ExpandComment.callbacks;
|
||||||
_results = [];
|
|
||||||
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
||||||
callback = _ref1[_k];
|
callback = _ref1[_k];
|
||||||
_results.push(callback.call(post));
|
callback.call(post);
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -8256,7 +8254,7 @@
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
var container, containers, node, nodes, replies, reply, thread, _i, _j, _k, _len, _len1, _len2, _results;
|
var container, containers, node, nodes, replies, reply, thread, _i, _j, _k, _len, _len1, _len2;
|
||||||
|
|
||||||
thread = $('.thread');
|
thread = $('.thread');
|
||||||
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
|
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
|
||||||
@ -8276,12 +8274,10 @@
|
|||||||
node = nodes[_i];
|
node = nodes[_i];
|
||||||
Unread.node.call(node);
|
Unread.node.call(node);
|
||||||
}
|
}
|
||||||
_results = [];
|
|
||||||
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
|
||||||
node = nodes[_j];
|
node = nodes[_j];
|
||||||
_results.push(QuoteThreading.node(node));
|
QuoteThreading.node(node);
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
} else {
|
} else {
|
||||||
replies.sort(function(a, b) {
|
replies.sort(function(a, b) {
|
||||||
var aID, bID;
|
var aID, bID;
|
||||||
@ -8296,7 +8292,7 @@
|
|||||||
container = containers[_k];
|
container = containers[_k];
|
||||||
$.rm(container);
|
$.rm(container);
|
||||||
}
|
}
|
||||||
return Unread.update(true);
|
Unread.update(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
kb: function() {
|
kb: function() {
|
||||||
|
|||||||
@ -4164,7 +4164,7 @@
|
|||||||
return $.asap((function() {
|
return $.asap((function() {
|
||||||
return $.id('boardNavMobile');
|
return $.id('boardNavMobile');
|
||||||
}), function() {
|
}), function() {
|
||||||
return CatalogLinks.toggle.call(el);
|
return CatalogLinks.toggle.call(input);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -4252,7 +4252,7 @@
|
|||||||
return post.nodes.comment = post.nodes.shortComment;
|
return post.nodes.comment = post.nodes.shortComment;
|
||||||
},
|
},
|
||||||
parse: function(req, a, post) {
|
parse: function(req, a, post) {
|
||||||
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results;
|
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1;
|
||||||
|
|
||||||
status = req.status;
|
status = req.status;
|
||||||
if (![200, 304].contains(status)) {
|
if (![200, 304].contains(status)) {
|
||||||
@ -4291,12 +4291,10 @@
|
|||||||
post.parseComment();
|
post.parseComment();
|
||||||
post.parseQuotes();
|
post.parseQuotes();
|
||||||
_ref1 = ExpandComment.callbacks;
|
_ref1 = ExpandComment.callbacks;
|
||||||
_results = [];
|
|
||||||
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
||||||
callback = _ref1[_k];
|
callback = _ref1[_k];
|
||||||
_results.push(callback.call(post));
|
callback.call(post);
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -8273,7 +8271,7 @@
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
var container, containers, node, nodes, replies, reply, thread, _i, _j, _k, _len, _len1, _len2, _results;
|
var container, containers, node, nodes, replies, reply, thread, _i, _j, _k, _len, _len1, _len2;
|
||||||
|
|
||||||
thread = $('.thread');
|
thread = $('.thread');
|
||||||
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
|
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
|
||||||
@ -8293,12 +8291,10 @@
|
|||||||
node = nodes[_i];
|
node = nodes[_i];
|
||||||
Unread.node.call(node);
|
Unread.node.call(node);
|
||||||
}
|
}
|
||||||
_results = [];
|
|
||||||
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
|
||||||
node = nodes[_j];
|
node = nodes[_j];
|
||||||
_results.push(QuoteThreading.node(node));
|
QuoteThreading.node(node);
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
} else {
|
} else {
|
||||||
replies.sort(function(a, b) {
|
replies.sort(function(a, b) {
|
||||||
var aID, bID;
|
var aID, bID;
|
||||||
@ -8313,7 +8309,7 @@
|
|||||||
container = containers[_k];
|
container = containers[_k];
|
||||||
$.rm(container);
|
$.rm(container);
|
||||||
}
|
}
|
||||||
return Unread.update(true);
|
Unread.update(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
kb: function() {
|
kb: function() {
|
||||||
|
|||||||
@ -4085,7 +4085,7 @@
|
|||||||
return $.asap((function() {
|
return $.asap((function() {
|
||||||
return $.id('boardNavMobile');
|
return $.id('boardNavMobile');
|
||||||
}), function() {
|
}), function() {
|
||||||
return CatalogLinks.toggle.call(el);
|
return CatalogLinks.toggle.call(input);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -4173,7 +4173,7 @@
|
|||||||
return post.nodes.comment = post.nodes.shortComment;
|
return post.nodes.comment = post.nodes.shortComment;
|
||||||
},
|
},
|
||||||
parse: function(req, a, post) {
|
parse: function(req, a, post) {
|
||||||
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results;
|
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1;
|
||||||
|
|
||||||
status = req.status;
|
status = req.status;
|
||||||
if (![200, 304].contains(status)) {
|
if (![200, 304].contains(status)) {
|
||||||
@ -4212,12 +4212,10 @@
|
|||||||
post.parseComment();
|
post.parseComment();
|
||||||
post.parseQuotes();
|
post.parseQuotes();
|
||||||
_ref1 = ExpandComment.callbacks;
|
_ref1 = ExpandComment.callbacks;
|
||||||
_results = [];
|
|
||||||
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
||||||
callback = _ref1[_k];
|
callback = _ref1[_k];
|
||||||
_results.push(callback.call(post));
|
callback.call(post);
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -8175,7 +8173,7 @@
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
var container, containers, node, nodes, replies, reply, thread, _i, _j, _k, _len, _len1, _len2, _results;
|
var container, containers, node, nodes, replies, reply, thread, _i, _j, _k, _len, _len1, _len2;
|
||||||
|
|
||||||
thread = $('.thread');
|
thread = $('.thread');
|
||||||
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
|
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
|
||||||
@ -8195,12 +8193,10 @@
|
|||||||
node = nodes[_i];
|
node = nodes[_i];
|
||||||
Unread.node.call(node);
|
Unread.node.call(node);
|
||||||
}
|
}
|
||||||
_results = [];
|
|
||||||
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
|
||||||
node = nodes[_j];
|
node = nodes[_j];
|
||||||
_results.push(QuoteThreading.node(node));
|
QuoteThreading.node(node);
|
||||||
}
|
}
|
||||||
return _results;
|
|
||||||
} else {
|
} else {
|
||||||
replies.sort(function(a, b) {
|
replies.sort(function(a, b) {
|
||||||
var aID, bID;
|
var aID, bID;
|
||||||
@ -8215,7 +8211,7 @@
|
|||||||
container = containers[_k];
|
container = containers[_k];
|
||||||
$.rm(container);
|
$.rm(container);
|
||||||
}
|
}
|
||||||
return Unread.update(true);
|
Unread.update(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
kb: function() {
|
kb: function() {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ CatalogLinks =
|
|||||||
# it might be incomplete otherwise.
|
# it might be incomplete otherwise.
|
||||||
$.asap (-> $.id 'boardNavMobile'), ->
|
$.asap (-> $.id 'boardNavMobile'), ->
|
||||||
# Set links on load.
|
# Set links on load.
|
||||||
CatalogLinks.toggle.call el
|
CatalogLinks.toggle.call input
|
||||||
|
|
||||||
toggle: ->
|
toggle: ->
|
||||||
$.set 'Header catalog links', useCatalog = @checked
|
$.set 'Header catalog links', useCatalog = @checked
|
||||||
|
|||||||
@ -62,4 +62,5 @@ ExpandComment =
|
|||||||
post.parseQuotes()
|
post.parseQuotes()
|
||||||
|
|
||||||
for callback in ExpandComment.callbacks
|
for callback in ExpandComment.callbacks
|
||||||
callback.call post
|
callback.call post
|
||||||
|
return
|
||||||
@ -100,6 +100,7 @@ QuoteThreading =
|
|||||||
containers = $$ '.threadContainer', thread
|
containers = $$ '.threadContainer', thread
|
||||||
$.rm container for container in containers
|
$.rm container for container in containers
|
||||||
Unread.update true
|
Unread.update true
|
||||||
|
return
|
||||||
|
|
||||||
kb: ->
|
kb: ->
|
||||||
control = $.id 'threadingControl'
|
control = $.id 'threadingControl'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user