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: ->
|
init: ->
|
||||||
return if g.VIEW is 'catalog' or !Conf['Menu']
|
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'
|
@menu = new UI.Menu 'post'
|
||||||
Post.callbacks.push
|
Post.callbacks.push
|
||||||
name: 'Menu'
|
name: 'Menu'
|
||||||
@ -13,15 +18,10 @@ Menu =
|
|||||||
return
|
return
|
||||||
$.add @nodes.info, Menu.makeButton()
|
$.add @nodes.info, Menu.makeButton()
|
||||||
|
|
||||||
makeButton: do ->
|
makeButton: ->
|
||||||
a = $.el 'a',
|
clone = Menu.button.cloneNode true
|
||||||
className: 'menu-button'
|
$.on clone, 'click', Menu.toggle
|
||||||
href: 'javascript:;'
|
clone
|
||||||
$.extend a, <%= html('<i class="fa fa-angle-down"></i>') %>
|
|
||||||
->
|
|
||||||
button = a.cloneNode true
|
|
||||||
$.on button, 'click', Menu.toggle
|
|
||||||
button
|
|
||||||
|
|
||||||
toggle: (e) ->
|
toggle: (e) ->
|
||||||
post = Get.postFromNode @
|
post = Get.postFromNode @
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user