Cleanup, small bugfix for CatalogLinks

This commit is contained in:
Zixaphir 2013-04-21 23:34:34 -07:00
parent e0dbc28e3c
commit 9340cfda9f
6 changed files with 22 additions and 32 deletions

View File

@ -4172,7 +4172,7 @@
return $.asap((function() {
return $.id('boardNavMobile');
}), function() {
return CatalogLinks.toggle.call(el);
return CatalogLinks.toggle.call(input);
});
});
},
@ -4260,7 +4260,7 @@
return post.nodes.comment = post.nodes.shortComment;
},
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;
if (![200, 304].contains(status)) {
@ -4299,12 +4299,10 @@
post.parseComment();
post.parseQuotes();
_ref1 = ExpandComment.callbacks;
_results = [];
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
callback = _ref1[_k];
_results.push(callback.call(post));
callback.call(post);
}
return _results;
}
};
@ -8256,7 +8254,7 @@
return true;
},
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');
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
@ -8276,12 +8274,10 @@
node = nodes[_i];
Unread.node.call(node);
}
_results = [];
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
node = nodes[_j];
_results.push(QuoteThreading.node(node));
QuoteThreading.node(node);
}
return _results;
} else {
replies.sort(function(a, b) {
var aID, bID;
@ -8296,7 +8292,7 @@
container = containers[_k];
$.rm(container);
}
return Unread.update(true);
Unread.update(true);
}
},
kb: function() {

View File

@ -4164,7 +4164,7 @@
return $.asap((function() {
return $.id('boardNavMobile');
}), function() {
return CatalogLinks.toggle.call(el);
return CatalogLinks.toggle.call(input);
});
});
},
@ -4252,7 +4252,7 @@
return post.nodes.comment = post.nodes.shortComment;
},
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;
if (![200, 304].contains(status)) {
@ -4291,12 +4291,10 @@
post.parseComment();
post.parseQuotes();
_ref1 = ExpandComment.callbacks;
_results = [];
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
callback = _ref1[_k];
_results.push(callback.call(post));
callback.call(post);
}
return _results;
}
};
@ -8273,7 +8271,7 @@
return true;
},
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');
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
@ -8293,12 +8291,10 @@
node = nodes[_i];
Unread.node.call(node);
}
_results = [];
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
node = nodes[_j];
_results.push(QuoteThreading.node(node));
QuoteThreading.node(node);
}
return _results;
} else {
replies.sort(function(a, b) {
var aID, bID;
@ -8313,7 +8309,7 @@
container = containers[_k];
$.rm(container);
}
return Unread.update(true);
Unread.update(true);
}
},
kb: function() {

View File

@ -4085,7 +4085,7 @@
return $.asap((function() {
return $.id('boardNavMobile');
}), function() {
return CatalogLinks.toggle.call(el);
return CatalogLinks.toggle.call(input);
});
});
},
@ -4173,7 +4173,7 @@
return post.nodes.comment = post.nodes.shortComment;
},
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;
if (![200, 304].contains(status)) {
@ -4212,12 +4212,10 @@
post.parseComment();
post.parseQuotes();
_ref1 = ExpandComment.callbacks;
_results = [];
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
callback = _ref1[_k];
_results.push(callback.call(post));
callback.call(post);
}
return _results;
}
};
@ -8175,7 +8173,7 @@
return true;
},
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');
replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread);
@ -8195,12 +8193,10 @@
node = nodes[_i];
Unread.node.call(node);
}
_results = [];
for (_j = 0, _len1 = nodes.length; _j < _len1; _j++) {
node = nodes[_j];
_results.push(QuoteThreading.node(node));
QuoteThreading.node(node);
}
return _results;
} else {
replies.sort(function(a, b) {
var aID, bID;
@ -8215,7 +8211,7 @@
container = containers[_k];
$.rm(container);
}
return Unread.update(true);
Unread.update(true);
}
},
kb: function() {

View File

@ -21,7 +21,7 @@ CatalogLinks =
# it might be incomplete otherwise.
$.asap (-> $.id 'boardNavMobile'), ->
# Set links on load.
CatalogLinks.toggle.call el
CatalogLinks.toggle.call input
toggle: ->
$.set 'Header catalog links', useCatalog = @checked

View File

@ -62,4 +62,5 @@ ExpandComment =
post.parseQuotes()
for callback in ExpandComment.callbacks
callback.call post
callback.call post
return

View File

@ -100,6 +100,7 @@ QuoteThreading =
containers = $$ '.threadContainer', thread
$.rm container for container in containers
Unread.update true
return
kb: ->
control = $.id 'threadingControl'