Commit f6b2cabd by kimth

Position change in sequence kills polling thread, rather than new Problem creation

parent 64eba433
......@@ -4,12 +4,6 @@ class @Problem
@id = @el.data('problem-id')
@element_id = @el.attr('id')
@url = @el.data('url')
# Destroy any existing polling threads on Problem change
if window.queuePollerID
window.clearTimeout(window.queuePollerID)
delete window.queuePollerID
@render()
$: (selector) ->
......
......@@ -91,6 +91,13 @@ class @Sequence
event.preventDefault()
new_position = $(event.target).data('element')
Logger.log "seq_goto", old: @position, new: new_position, id: @id
# On Sequence chage, destroy any existing polling thread
# for queued submissions, see ../capa/display.coffee
if window.queuePollerID
window.clearTimeout(window.queuePollerID)
delete window.queuePollerID
@render new_position
next: (event) =>
......
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