
We don't want to subscribe if we're at any other routes, because there is no data there. The main target is to avoid all of the notifications from a common channel if we're on the /dashboard route.
20 lines
494 B
CoffeeScript
20 lines
494 B
CoffeeScript
View = Ember.View.extend
|
|
actions:
|
|
popup: (name) -> @popup(name)
|
|
popupClose: -> @popupClose()
|
|
|
|
popup: (name) ->
|
|
@popupCloseAll()
|
|
name = event?.target?.name || name
|
|
$("##{name}").toggleClass('display')
|
|
popupClose: ->
|
|
$('.popup').removeClass('display')
|
|
popupCloseAll: ->
|
|
if view = Travis.View.currentPopupView
|
|
view.destroy()
|
|
Travis.View.currentPopupView = null
|
|
|
|
$('.popup').removeClass('display')
|
|
|
|
Travis.View = View
|