Skip to content

Instantly share code, notes, and snippets.

@whitmanc
Created August 23, 2012 23:57
Show Gist options
  • Save whitmanc/3443749 to your computer and use it in GitHub Desktop.
Save whitmanc/3443749 to your computer and use it in GitHub Desktop.
initSortable: =>
$(@el).sortable
opacity: 0.6
cursor: 'move'
containment: 'footer'
update: =>
#ids = App.keyframeList().collection.pluck('id')
#console.log ids
@json = {}
@json.keyframes = []
#console.log ids
@collection.each (keyframe) =>
@json.keyframes.push(keyframe)
console.log @json
$.ajax
dataType: 'JSON'
type: 'POST'
data: @json
url: "#{@collection.ordinalUpdateUrl(App.currentScene().get('id'))}"
complete: ->
console.log "COMPLETE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment