From ac5bdcced03ef10e4c214685ef4a3c3dc339b321 Mon Sep 17 00:00:00 2001 From: jpl Date: Mon, 27 Mar 2017 11:42:44 +0200 Subject: Tmp disabling of sticky nav --- app/assets/javascripts/forms.coffee | 34 ++++++------ app/assets/javascripts/main_menu.coffee | 92 ++++++++++++++++----------------- 2 files changed, 63 insertions(+), 63 deletions(-) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/forms.coffee b/app/assets/javascripts/forms.coffee index c8dd69581..33da921b6 100644 --- a/app/assets/javascripts/forms.coffee +++ b/app/assets/javascripts/forms.coffee @@ -17,23 +17,23 @@ else labelCont.text(labelCont.data('checkedvalue')) -@submitMover = -> - if $('.page-action').children('.formSubmitr').length > 0 - $('.page-action').children('.formSubmitr').remove() - - $('.formSubmitr').appendTo('.page-action') - - # IE fix - isIE = false || !!document.documentMode - isEdge = !isIE && !!window.StyleMedia - - if isIE || isEdge - $('.formSubmitr').each -> - target = $(this).attr('form') - - $(this).on 'click', -> - $('#' + target).submit() +# @submitMover = -> +# if $('.page-action').children('.formSubmitr').length > 0 +# $('.page-action').children('.formSubmitr').remove() +# +# $('.formSubmitr').appendTo('.page-action') +# +# # IE fix +# isIE = false || !!document.documentMode +# isEdge = !isIE && !!window.StyleMedia +# +# if isIE || isEdge +# $('.formSubmitr').each -> +# target = $(this).attr('form') +# +# $(this).on 'click', -> +# $('#' + target).submit() $(document).on 'ready page:load', togglableFilter -$(document).on 'ready page:load', submitMover +# $(document).on 'ready page:load', submitMover $(document).on 'ready page:load', switchInput diff --git a/app/assets/javascripts/main_menu.coffee b/app/assets/javascripts/main_menu.coffee index dee846ffb..6f882e92c 100644 --- a/app/assets/javascripts/main_menu.coffee +++ b/app/assets/javascripts/main_menu.coffee @@ -1,46 +1,46 @@ -$(document).on 'ready page:load', -> - - link = [] - $(document).on 'page:before-change', -> - link = [] - - $el = $('#main_nav') - # Opening/closing left-side menu - $el.find('.openMenu').on 'click', (e) -> - $(this).parent().addClass 'open' - - $el.find('.closeMenu').on 'click', (e) -> - $(this).closest('.nav-menu').removeClass 'open' - - # Opening menu panel according to current url - selectedItem = $el.find('.active') - selectedItem.closest('.panel-collapse').addClass 'in' - selectedItem.closest('.panel-title').children('a').attr('aria-expanded') == true - - - data = $('.page-action .small')[0].innerHTML - - stickyContent = '