change to .text() extraction of template, fix SafeWaiter error handling

This commit is contained in:
Miles Steele
2013-08-06 10:52:22 -04:00
parent e0760d95ab
commit a15c2d7381
2 changed files with 4 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ class ProfileDistributionWidget
title: @title
feature: @feature
endpoint: @endpoint
template_html = $("#profile-distribution-widget-template").html()
template_html = $("#profile-distribution-widget-template").text()
@$container.html Mustache.render template_html, template_params
reset_display: ->
@@ -93,7 +93,7 @@ class ProfileDistributionWidget
class GradeDistributionDisplay
constructor: ({@$container, @endpoint}) ->
template_params = {}
template_html = $('#grade-distributions-widget-template').html()
template_html = $('#grade-distributions-widget-template').text()
@$container.html Mustache.render template_html, template_params
@$problem_selector = @$container.find '.problem-selector'

View File

@@ -61,10 +61,8 @@ class SafeWaiter
=>
@waitFor_handlers = @waitFor_handlers.filter (g) -> g isnt f
if @waitFor_handlers.length is 0
plantTimeout 0, =>
@fired = true
for cb in @after_handlers
cb()
@fired = true
@after_handlers.map (cb) -> plantTimeout 0, cb
f.apply this, arguments