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'
'top-header'
'bottom'
'after'
] else [
'top-header'
'bottom-header'
'top'
'add'
]
$.addClass doc, args[0]
$.rmClass doc, args[1]
Header.bar.parentNode.className = args[2]
$[args[3]] Header.bar, Header.noticesRoot
$.before Header.bar, Header.noticesRoot
toggleBarPosition: ->
$.cb.checked.call @

View File

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

View File

@ -1,7 +1,7 @@
class Notice
constructor: (type, content, @timeout, @onclose) ->
@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
@setType type
$.on @el.firstElementChild, 'click', @close
@ -19,7 +19,7 @@ class Notice
$.on d, 'visibilitychange', @add
return
$.off d, 'visibilitychange', @add
$.add doc, @el
$.add Header.noticesRoot, @el
@el.clientHeight # force reflow
@el.style.opacity = 1
setTimeout @close, @timeout * $.SECOND if @timeout