Skip to content

Commit

Permalink
Remove model-open class if App.ControllerModalLoading class is used w…
Browse files Browse the repository at this point in the history
…ithout container.
  • Loading branch information
znuny-robo committed Feb 25, 2019
1 parent 12eb538 commit 8831b57
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -260,11 +260,14 @@ class App.ControllerModalLoading extends App.Controller

@render()

@el.modal
@el.modal(
keyboard: false
show: true
backdrop: 'static'
container: @container
).on(
'hidden.bs.modal': @localOnClosed
)

render: ->
@html App.view('generic/modal_loader')(
Expand All @@ -283,9 +286,12 @@ class App.ControllerModalLoading extends App.Controller
showIcon: =>
@$('.js-loadingIcon').removeClass('hide')

localOnClosed: =>
@el.remove()

hide: (delay) =>
remove = =>
@el.remove()
@el.modal('hide')
if !delay
remove()
return
Expand Down

0 comments on commit 8831b57

Please sign in to comment.