Moved back to permanent bindings (notify need be available the whole time).
This commit is contained in:
parent
452b0ccc5f
commit
d68293b46b
1 changed files with 7 additions and 8 deletions
|
@ -1,26 +1,25 @@
|
||||||
class App.Notify extends Spine.Controller
|
class App.Notify extends Spine.Controller
|
||||||
|
className: 'container'
|
||||||
events:
|
events:
|
||||||
'click .alert': 'destroy'
|
'click .alert': 'destroy'
|
||||||
|
|
||||||
className: 'container'
|
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
@bind 'notify', (data) =>
|
App.Event.bind 'notify', (data) =>
|
||||||
@render(data)
|
@render(data)
|
||||||
|
|
||||||
@bind 'notify:removeall', =>
|
App.Event.bind 'notify:removeall', =>
|
||||||
@log 'notify:removeall', @
|
@log 'notify:removeall', @
|
||||||
@destroyAll()
|
@destroyAll()
|
||||||
|
|
||||||
@bind 'notifyDesktop', (data) =>
|
App.Event.bind 'notifyDesktop', (data) =>
|
||||||
if !data['icon']
|
if !data['icon']
|
||||||
data['icon'] = 'unknown'
|
data['icon'] = 'unknown'
|
||||||
notify.createNotification( data.msg, data )
|
notify.createNotification( data.msg, data )
|
||||||
|
|
||||||
# request desktop notification after login
|
# request desktop notification after login
|
||||||
@bind 'auth', (data) ->
|
App.Event.bind 'auth', (data) ->
|
||||||
if !_.isEmpty(data)
|
if !_.isEmpty(data)
|
||||||
notify.requestPermission()
|
notify.requestPermission()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue