aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorjpl2017-03-27 11:42:44 +0200
committerjpl2017-03-27 11:42:44 +0200
commitac5bdcced03ef10e4c214685ef4a3c3dc339b321 (patch)
treee9194ee64e20f7d906ebd1c8bff1c4dcb2f88363 /app/assets/javascripts
parent2c21e6dbbd2ed85070ee1ebdd26ee97882f424dd (diff)
downloadchouette-core-ac5bdcced03ef10e4c214685ef4a3c3dc339b321.tar.bz2
Tmp disabling of sticky nav
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/forms.coffee34
-rw-r--r--app/assets/javascripts/main_menu.coffee92
2 files changed, 63 insertions, 63 deletions
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 = '<div class="sticky-content">'
- stickyContent += '<div class="sticky-ptitle">' + $(".page-title").html() + '</div>'
- stickyContent += '<div class="sticky-paction"><div class="small">' + data + '</div></div>'
- stickyContent += '</div>'
-
- # Sticky behavior
- $(document).on 'scroll', ->
- limit = 51
-
- if $(window).scrollTop() >= limit
- $('#main_nav').addClass 'sticky'
-
- if $('#menu_top').find('.sticky-content').length == 0
- $('#menu_top').children('.menu-content').after(stickyContent)
- if link.length == 0
- link = $('.page-action .small').next()
- $('.sticky-paction .small').after(link)
-
- else
- $('#main_nav').removeClass 'sticky'
-
- if $('#menu_top').find('.sticky-content').length > 0
- $('.page-action .small').after(link)
- $('.sticky-content').remove()
+# $(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 = '<div class="sticky-content">'
+# stickyContent += '<div class="sticky-ptitle">' + $(".page-title").html() + '</div>'
+# stickyContent += '<div class="sticky-paction"><div class="small">' + data + '</div></div>'
+# stickyContent += '</div>'
+#
+# # Sticky behavior
+# $(document).on 'scroll', ->
+# limit = 51
+#
+# if $(window).scrollTop() >= limit
+# $('#main_nav').addClass 'sticky'
+#
+# if $('#menu_top').find('.sticky-content').length == 0
+# $('#menu_top').children('.menu-content').after(stickyContent)
+# if link.length == 0
+# link = $('.page-action .small').next()
+# $('.sticky-paction .small').after(link)
+#
+# else
+# $('#main_nav').removeClass 'sticky'
+#
+# if $('#menu_top').find('.sticky-content').length > 0
+# $('.page-action .small').after(link)
+# $('.sticky-content').remove()