This commit is contained in:
Nicolas Stepien 2013-04-10 21:53:06 +02:00
parent 6425a2a36d
commit 182046f254

View File

@ -54,6 +54,8 @@ Header =
@setBarVisibility Conf['Header auto-hide']
$.sync 'Header auto-hide', @setBarVisibility
$.on d, 'CreateNotification', @createNotification
$.asap (-> d.body), ->
return unless Main.isThisPageLegit()
# Wait for #boardNavMobile instead of #boardNavDesktop,
@ -188,6 +190,11 @@ Header =
menuToggle: (e) ->
Header.menu.toggle e, @, g
createNotification: (e) ->
{type, content, lifetime, cb} = e.detail
notif = new Notification type, content, lifetime
cb notif if cb
class Notification
constructor: (type, content, @timeout) ->
@add = add.bind @