Commit dab5da47 by kimth

Frontend queue polling doesn't render HTML until content changes

parent 33ef453a
...@@ -39,13 +39,12 @@ class @Problem ...@@ -39,13 +39,12 @@ class @Problem
poll: => poll: =>
$.postWithPrefix "#{@url}/problem_get", (response) => $.postWithPrefix "#{@url}/problem_get", (response) =>
@queued_items = $(response.html).find(".xqueue")
if @queued_items.length == 0
@el.html(response.html) @el.html(response.html)
@executeProblemScripts () => @executeProblemScripts () =>
@setupInputTypes() @setupInputTypes()
@bind() @bind()
@queued_items = @$(".xqueue")
if @queued_items.length == 0
delete window.queuePollerID delete window.queuePollerID
else else
# TODO: Dynamically adjust timeout interval based on @queued_items.value # TODO: Dynamically adjust timeout interval based on @queued_items.value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment