refactor out old modal structure in favor of the new namespaced one

This commit is contained in:
2015-01-13 12:34:42 +01:00
parent b614eeeaef
commit 6d6b95d9c0
20 changed files with 126 additions and 61 deletions
@@ -1,10 +1,13 @@
#App.ModalView = Ember.View.extend
#templateName: "modal"
#title: ""
#classNames: ["reveal-modal"],
#didInsertElement: ->
##this.$().foundation('reveal', 'open')
#actions:
#close: ->
#console.log('close action fired')
#this.destroy()
App.ModalView = Ember.View.extend
layoutName: 'modals/layout'
didInsertElement: ->
sortable = $('.sortable')
controller = @get('controller')
if sortable.length
sortable.sortable
update: (e, ui)->
ids = sortable.find('.sortable-item-container').map((i, el) -> $(el).data('sortableId')).toArray()
if callback = controller.sortableUpdate
callback.call(controller, ids)