Move the header menu button into the header shortcuts.
This commit is contained in:
parent
fb28d20870
commit
f1cf1addfe
@ -189,9 +189,6 @@ a[href="javascript:;"] {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
#shortcuts:empty {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.shortcut:not(:last-child)::after {
|
.shortcut:not(:last-child)::after {
|
||||||
content: " / ";
|
content: " / ";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,4 @@
|
|||||||
<div id="header-bar" class="dialog">
|
<div id="header-bar" class="dialog">
|
||||||
<span class="menu-button brackets-wrap">
|
|
||||||
<a href="javascript:;">
|
|
||||||
<i></i>
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
<span id="shortcuts" class="brackets-wrap"></span>
|
<span id="shortcuts" class="brackets-wrap"></span>
|
||||||
<span id="board-list">
|
<span id="board-list">
|
||||||
<span id="custom-board-list"></span>
|
<span id="custom-board-list"></span>
|
||||||
|
|||||||
@ -10,7 +10,12 @@ Header =
|
|||||||
@toggle = $ '#toggle-header-bar', @bar
|
@toggle = $ '#toggle-header-bar', @bar
|
||||||
|
|
||||||
@menu = new UI.Menu 'header'
|
@menu = new UI.Menu 'header'
|
||||||
$.on $('.menu-button', @bar), 'click', @menuToggle
|
menuButton = $.el 'a',
|
||||||
|
className: 'menu-button'
|
||||||
|
innerHTML: '<i></i>'
|
||||||
|
href: 'javascript:;'
|
||||||
|
$.on menuButton, 'click', @menuToggle
|
||||||
|
@addShortcut menuButton, 0
|
||||||
$.on @toggle, 'mousedown', @toggleBarVisibility
|
$.on @toggle, 'mousedown', @toggleBarVisibility
|
||||||
$.on window, 'load hashchange', Header.hashScroll
|
$.on window, 'load hashchange', Header.hashScroll
|
||||||
$.on d, 'CreateNotification', @createNotification
|
$.on d, 'CreateNotification', @createNotification
|
||||||
@ -247,11 +252,15 @@ Header =
|
|||||||
top -= headRect.top + headRect.height
|
top -= headRect.top + headRect.height
|
||||||
window.scrollBy 0, top
|
window.scrollBy 0, top
|
||||||
|
|
||||||
addShortcut: (el) ->
|
addShortcut: (el, index) ->
|
||||||
shortcut = $.el 'span',
|
shortcut = $.el 'span',
|
||||||
className: 'shortcut'
|
className: 'shortcut'
|
||||||
$.add shortcut, el
|
$.add shortcut, el
|
||||||
$.prepend $('#shortcuts', Header.bar), shortcut
|
shortcuts = $ '#shortcuts', Header.bar
|
||||||
|
nodes = [shortcuts.childNodes...]
|
||||||
|
nodes.splice index, 0, shortcut
|
||||||
|
$.add shortcuts, nodes
|
||||||
|
|
||||||
|
|
||||||
menuToggle: (e) ->
|
menuToggle: (e) ->
|
||||||
Header.menu.toggle e, @, g
|
Header.menu.toggle e, @, g
|
||||||
|
|||||||
@ -8,7 +8,7 @@ ImageExpand =
|
|||||||
title: 'Expand All Images'
|
title: 'Expand All Images'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on @EAI, 'click', ImageExpand.cb.toggleAll
|
$.on @EAI, 'click', ImageExpand.cb.toggleAll
|
||||||
Header.addShortcut @EAI
|
Header.addShortcut @EAI, 2
|
||||||
|
|
||||||
Post::callbacks.push
|
Post::callbacks.push
|
||||||
name: 'Image Expansion'
|
name: 'Image Expansion'
|
||||||
|
|||||||
@ -27,7 +27,7 @@ QR =
|
|||||||
$.event 'CloseMenu'
|
$.event 'CloseMenu'
|
||||||
QR.open()
|
QR.open()
|
||||||
QR.nodes.com.focus()
|
QR.nodes.com.focus()
|
||||||
Header.addShortcut sc
|
Header.addShortcut sc, 1
|
||||||
|
|
||||||
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
||||||
cb QR.selected
|
cb QR.selected
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user