diff --git a/static/coffee/audioplayer.coffee b/static/coffee/audioplayer.coffee index a680711..c77dd8a 100644 --- a/static/coffee/audioplayer.coffee +++ b/static/coffee/audioplayer.coffee @@ -38,7 +38,8 @@ class AudioPlayer ann_url = '/view/' + docid + '/audioannotations' $.getJSON ann_url, (annotations) => for ann in annotations.data - annotation = new AudioAnnotation this, ann.id, ann.start, ann.length, ann.state, ann.text + annotation = new AudioAnnotation this, ann.id, ann.start, + ann.length, ann.state, ann.text @$div.append annotation.$div @annotations.push annotation @update() @@ -262,7 +263,7 @@ class AudioAnnotation onblur: 'submit' update: -> - y = @player.secondsToPixels (@start + @length/2) + y = @player.secondsToPixels (@start + @length / 2) @$div.css top: y + "px" diff --git a/static/coffee/rest.coffee b/static/coffee/rest.coffee index 610b320..24038f7 100644 --- a/static/coffee/rest.coffee +++ b/static/coffee/rest.coffee @@ -12,7 +12,7 @@ class RestClient type: type url: url data: data - success: (d) => + success: (d) -> if type == 'POST' obj.id = d.id