Skip to content
Snippets Groups Projects
Commit afd78feb authored by kimth's avatar kimth
Browse files

Frontend queue polling doesn't render HTML until content changes

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