add onComplete parameter to ControllerModal
gets called on @onShown
This commit is contained in:
parent
2a4da78906
commit
568c0575d3
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue