Couple bug fixes.

This commit is contained in:
Scott Erickson 2014-05-08 11:10:22 -07:00
parent 9a5c4b6ced
commit 1e938910ed
2 changed files with 3 additions and 3 deletions

View file

@ -32,7 +32,7 @@ module.exports = class SuperModel extends Backbone.Model
else
@registerModel(model)
res = @addModelResource(model, name, fetchOptions, value)
if not res.isLoaded then res.load()
if model.loaded then res.markLoaded() else res.load()
return res
loadCollection: (collection, name, fetchOptions, value=1) ->

View file

@ -43,8 +43,8 @@ module.exports = class VersionsModalView extends ModalView
onSelectionChanged: ->
rows = @$el.find 'input.select:checked'
deltaEl = @$el.find '.delta-view'
@deltaView?.destroy()
deltaEl.empty()
@removeSubView(@deltaView) if @deltaView
@deltaView = null
if rows.length isnt 2 then return
laterVersion = new @model(_id:$(rows[0]).val())