non-catalog part of menu refactoring from Mayhem commit 60e89e3f28dcb5cb5936f31940c786117ba5240a
This commit is contained in:
parent
fa2ed2218a
commit
97cd4f47ea
@ -2,6 +2,11 @@ Menu =
|
||||
init: ->
|
||||
return if g.VIEW is 'catalog' or !Conf['Menu']
|
||||
|
||||
@button = $.el 'a',
|
||||
className: 'menu-button'
|
||||
href: 'javascript:;'
|
||||
$.extend @button, <%= html('<i class="fa fa-angle-down"></i>') %>
|
||||
|
||||
@menu = new UI.Menu 'post'
|
||||
Post.callbacks.push
|
||||
name: 'Menu'
|
||||
@ -13,15 +18,10 @@ Menu =
|
||||
return
|
||||
$.add @nodes.info, Menu.makeButton()
|
||||
|
||||
makeButton: do ->
|
||||
a = $.el 'a',
|
||||
className: 'menu-button'
|
||||
href: 'javascript:;'
|
||||
$.extend a, <%= html('<i class="fa fa-angle-down"></i>') %>
|
||||
->
|
||||
button = a.cloneNode true
|
||||
$.on button, 'click', Menu.toggle
|
||||
button
|
||||
makeButton: ->
|
||||
clone = Menu.button.cloneNode true
|
||||
$.on clone, 'click', Menu.toggle
|
||||
clone
|
||||
|
||||
toggle: (e) ->
|
||||
post = Get.postFromNode @
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user