Restore Notifications positioning, z-index at highest order

This commit is contained in:
Zixaphir 2015-01-12 21:18:22 -07:00
parent 630db39831
commit ac794bde3e
5 changed files with 17 additions and 17 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -314,18 +314,16 @@ Header =
'bottom-header' 'bottom-header'
'top-header' 'top-header'
'bottom' 'bottom'
'after'
] else [ ] else [
'top-header' 'top-header'
'bottom-header' 'bottom-header'
'top' 'top'
'add'
] ]
$.addClass doc, args[0] $.addClass doc, args[0]
$.rmClass doc, args[1] $.rmClass doc, args[1]
Header.bar.parentNode.className = args[2] Header.bar.parentNode.className = args[2]
$[args[3]] Header.bar, Header.noticesRoot $.before Header.bar, Header.noticesRoot
toggleBarPosition: -> toggleBarPosition: ->
$.cb.checked.call @ $.cb.checked.call @

View File

@ -455,16 +455,18 @@ nav a,
} }
/* Notifications */ /* Notifications */
#notifications { #notifications {
z-index: 40;
position: fixed; position: fixed;
top: 0; top: 0;
text-align: center; text-align: center;
right: 0; right: 0;
left: 0; left: 0;
height: 0;
overflow: visible;
transition: all .8s .6s cubic-bezier(.55, .055, .675, .19); transition: all .8s .6s cubic-bezier(.55, .055, .675, .19);
} }
.fixed.top-header #header-bar #notifications { .fixed.top-header #header-bar #notifications {
position: absolute; top: 2em;
top: 100%;
} }
.notification { .notification {
font-weight: 700; font-weight: 700;

View File

@ -1,7 +1,7 @@
class Notice class Notice
constructor: (type, content, @timeout, @onclose) -> constructor: (type, content, @timeout, @onclose) ->
@el = $.el 'div', @el = $.el 'div',
<%= html('<a href="javascript:;" class="close fa fa-times" title="Close"></a><div class="message"></div>') %> <%= html('<a href="javascript:;" class="close fa" title="Close">\uf00d</a><div class="message"></div>') %>
@el.style.opacity = 0 @el.style.opacity = 0
@setType type @setType type
$.on @el.firstElementChild, 'click', @close $.on @el.firstElementChild, 'click', @close
@ -19,7 +19,7 @@ class Notice
$.on d, 'visibilitychange', @add $.on d, 'visibilitychange', @add
return return
$.off d, 'visibilitychange', @add $.off d, 'visibilitychange', @add
$.add doc, @el $.add Header.noticesRoot, @el
@el.clientHeight # force reflow @el.clientHeight # force reflow
@el.style.opacity = 1 @el.style.opacity = 1
setTimeout @close, @timeout * $.SECOND if @timeout setTimeout @close, @timeout * $.SECOND if @timeout