From 12eb65f8cccc1aa0dd18e35c6f3bdebf37df8679 Mon Sep 17 00:00:00 2001 From: Thomas Haddad Date: Wed, 15 Mar 2017 10:34:13 +0100 Subject: Fix Save button not having listeners anymore when sticky Signed-off-by: Thomas Shawarma Haddad --- app/assets/javascripts/main_menu.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/main_menu.coffee b/app/assets/javascripts/main_menu.coffee index d755cd43b..bb7621af7 100644 --- a/app/assets/javascripts/main_menu.coffee +++ b/app/assets/javascripts/main_menu.coffee @@ -18,7 +18,7 @@ $(document).on 'ready page:load', -> stickyContent = '
' stickyContent += '
' + $(".page-title").html() + '
' - stickyContent += '
' + $(".page-action").html() + '
' + stickyContent += '
' + $(".page-action .small")[0].outerHTML + '
' stickyContent += '
' # console.log stickyContent @@ -28,9 +28,11 @@ $(document).on 'ready page:load', -> if $('#menu_top').find('.sticky-content').length == 0 $('#menu_top').children('.menu-content').after(stickyContent) + $('.sticky-paction .small').after($('.formSubmitr')) else $('#main_nav').removeClass 'sticky' if $('#menu_top').find('.sticky-content').length > 0 + $('.page-action .small').after($('.formSubmitr')) $('.sticky-content').remove() -- cgit v1.2.3