Frontend queue polling doesn't render HTML until content changes

This commit is contained in:
kimth
2012-08-13 19:07:44 -04:00
parent 9324ae3485
commit afd78febfb

View File

@@ -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