Merge from Appchan X: src/General/Get.coffee
deferred: adding dataset.fullID for simpler Get.thread/postFromRoot
This commit is contained in:
parent
b06d3d77ec
commit
332e00342e
@ -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,13 +109,14 @@ 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'
|
|
||||||
root.textContent =
|
$.addClass root, 'warning'
|
||||||
if status is 404
|
root.textContent =
|
||||||
"Thread No.#{threadID} 404'd."
|
if status is 404
|
||||||
else
|
"Thread No.#{threadID} 404'd."
|
||||||
"Error #{req.statusText} (#{req.status})."
|
else
|
||||||
|
"Error #{req.statusText} (#{req.status})."
|
||||||
return
|
return
|
||||||
|
|
||||||
{posts} = req.response
|
{posts} = req.response
|
||||||
@ -133,9 +134,10 @@ 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'
|
|
||||||
root.textContent = "Post No.#{postID} was not found."
|
$.addClass root, 'warning'
|
||||||
|
root.textContent = "Post No.#{postID} was not found."
|
||||||
return
|
return
|
||||||
|
|
||||||
board = g.boards[boardID] or
|
board = g.boards[boardID] or
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user