Merge from Appchan X: src/General/Get.coffee

deferred: adding dataset.fullID for simpler Get.thread/postFromRoot
This commit is contained in:
ccd0 2015-02-02 21:12:27 -08:00
parent b06d3d77ec
commit 332e00342e

View File

@ -90,7 +90,7 @@ Get =
clone = post.addClone context, ($.hasClass root, 'dialog') clone = post.addClone context, ($.hasClass root, 'dialog')
Main.callbackNodes Clone, [clone] Main.callbackNodes Clone, [clone]
# Get rid of the side arrows. # Get rid of the side arrows/stubs.
{nodes} = clone {nodes} = clone
$.rmAll nodes.root $.rmAll nodes.root
$.add nodes.root, nodes.post $.add nodes.root, nodes.post
@ -109,7 +109,8 @@ Get =
{status} = req {status} = req
unless status in [200, 304] unless status in [200, 304]
# The thread can die by the time we check a quote. # The thread can die by the time we check a quote.
unless Get.archivedPost boardID, postID, root, context return if Get.archivedPost boardID, postID, root, context
$.addClass root, 'warning' $.addClass root, 'warning'
root.textContent = root.textContent =
if status is 404 if status is 404
@ -133,7 +134,8 @@ Get =
return return
# The post can be deleted by the time we check a quote. # The post can be deleted by the time we check a quote.
unless Get.archivedPost boardID, postID, root, context return if Get.archivedPost boardID, postID, root, context
$.addClass root, 'warning' $.addClass root, 'warning'
root.textContent = "Post No.#{postID} was not found." root.textContent = "Post No.#{postID} was not found."
return return