Merge branch 'master' into legislation-module-stable

This commit is contained in:
Amaia Castro
2017-01-18 17:35:15 +01:00
6 changed files with 91 additions and 21 deletions

View File

@@ -46,6 +46,7 @@
//= require valuation_budget_investment_form
//= require valuation_spending_proposal_form
//= require embed_video
//= require fixed_bar
//= require banners
//= require social_share
//= require markdown-it
@@ -77,6 +78,7 @@ var initialize_modules = function() {
App.ValuationBudgetInvestmentForm.initialize();
App.ValuationSpendingProposalForm.initialize();
App.EmbedVideo.initialize();
App.FixedBar.initialize();
App.Banners.initialize();
App.SocialShare.initialize();
App.MarkdownEditor.initialize();

View File

@@ -0,0 +1,13 @@
App.FixedBar =
initialize: ->
$('[data-fixed-bar]').each ->
$this = $(this)
fixedBarTopPosition = $this.offset().top
$(window).on 'scroll', ->
if $(window).scrollTop() > fixedBarTopPosition
$this.addClass('is-fixed')
$("#check-ballot").css({ 'display': "inline-block" });
else
$this.removeClass('is-fixed')
$("#check-ballot").hide()