don't use exceptions for catalog menu
This commit is contained in:
parent
12c319dd23
commit
e4c05c81f0
@ -17,22 +17,16 @@ Menu =
|
|||||||
|
|
||||||
node: ->
|
node: ->
|
||||||
if @isClone
|
if @isClone
|
||||||
$.on $('.menu-button', @nodes.info), 'click', Menu.toggle
|
Menu.makeButton @, $('.menu-button', @nodes.info)
|
||||||
return
|
return
|
||||||
$.add @nodes.info, Menu.makeButton()
|
$.add @nodes.info, Menu.makeButton @
|
||||||
|
|
||||||
catalogNode: ->
|
catalogNode: ->
|
||||||
$.add @nodes.thumb.parentNode, Menu.makeButton()
|
post = g.threads[@thread.fullID].OP
|
||||||
|
$.add @nodes.thumb.parentNode, Menu.makeButton post
|
||||||
|
|
||||||
makeButton: ->
|
makeButton: (post, button) ->
|
||||||
clone = Menu.button.cloneNode true
|
button or= Menu.button.cloneNode true
|
||||||
$.on clone, 'click', Menu.toggle
|
$.on button, 'click', (e) ->
|
||||||
clone
|
Menu.menu.toggle e, @, post
|
||||||
|
button
|
||||||
toggle: (e) ->
|
|
||||||
try
|
|
||||||
post = Get.postFromNode @
|
|
||||||
catch
|
|
||||||
fullID = @parentNode.parentNode.dataset.fullID
|
|
||||||
post = g.threads[fullID].OP
|
|
||||||
Menu.menu.toggle e, @, post
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user