add onComplete parameter to ControllerModal

gets called on @onShown
This commit is contained in:
Felix Niklas 2015-06-29 17:01:22 +02:00
parent 2a4da78906
commit 568c0575d3

View file

@ -546,6 +546,7 @@ class App.ControllerModal extends App.Controller
buttonClass: 'btn--success'
centerButtons: []
container: null
onComplete: (->)
options = _.extend( defaults, options )
@ -582,7 +583,7 @@ class App.ControllerModal extends App.Controller
container: @container
.on
'show.bs.modal': @onShow
'shown.bs.modal': @onShown
'shown.bs.modal': @onComplete
'hidden.bs.modal': =>
@onHide()
# remove modal from dom
@ -593,7 +594,8 @@ class App.ControllerModal extends App.Controller
e.preventDefault()
@el.modal('hide')
onShown: ->
onShown: =>
@onComplete()
console.log('modal shown: do nothing')
# do nothing