From 7f8aff0942948f7736c51e90b53f185649f30efe Mon Sep 17 00:00:00 2001 From: Noah Manger Date: Tue, 5 May 2015 14:39:22 -0700 Subject: [PATCH 1/4] Hiding the notice reveal link if notice is open --- static/js/init.js | 7 +++++++ static/styles/_components/_header.scss | 8 ++++++++ static/styles/_components/_states.scss | 4 ++++ static/styles/styles.css | 8 ++++++++ 4 files changed, 27 insertions(+) diff --git a/static/js/init.js b/static/js/init.js index 1a5c1ee63..d354c2fe5 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -83,6 +83,7 @@ $(document).ready(function() { if (typeof window.sessionStorage !== 'undefined') { if (window.sessionStorage.getItem('keep-banner-closed') === '1') { $('#notice').attr('aria-hidden', true); + $('#notice-reveal').addClass('visible'); } else { $('#notice').attr('aria-hidden', false); } @@ -90,12 +91,18 @@ $(document).ready(function() { $("#notice-close").on('click keypress', function(e){ if (e.which === 13 || e.type === 'click') { + $('#notice-reveal').addClass('visible'); if (typeof window.sessionStorage !== 'undefined') { window.sessionStorage.setItem('keep-banner-closed', '1'); } } }); + // Hide the notice reveal link if you open it + $('#notice-reveal').click(function(){ + $(this).removeClass('visible'); + }); + // Initialize accordions $(SLT_ACCORDION).each(function() { accordion.init($(this)); diff --git a/static/styles/_components/_header.scss b/static/styles/_components/_header.scss index 289c8e590..393e56163 100644 --- a/static/styles/_components/_header.scss +++ b/static/styles/_components/_header.scss @@ -1,4 +1,12 @@ // MODULE: Header +#notice-reveal { + display: none; + + &.visible { + display: inline; + } +} + .banner { @include font-size(1.2); text-align: center; diff --git a/static/styles/_components/_states.scss b/static/styles/_components/_states.scss index a69e92541..79368512a 100644 --- a/static/styles/_components/_states.scss +++ b/static/styles/_components/_states.scss @@ -3,6 +3,10 @@ display: none; } +.visible { + display: block; +} + @include keyframes(fadeIn) { from { opacity: 0; diff --git a/static/styles/styles.css b/static/styles/styles.css index e621f6bb6..7af6d81fb 100644 --- a/static/styles/styles.css +++ b/static/styles/styles.css @@ -1289,6 +1289,11 @@ body { .side-panel--right { width: 20%; } } +#notice-reveal { + display: none; } + #notice-reveal.visible { + display: inline; } + .banner { font-size: 12px; font-size: 1.2rem; @@ -1663,6 +1668,9 @@ body { .hidden { display: none; } +.visible { + display: block; } + @-webkit-keyframes fadeIn { from { opacity: 0; } From e1f559bb15a91004eea30afaca41f87c607dad38 Mon Sep 17 00:00:00 2001 From: Noah Manger Date: Tue, 5 May 2015 14:39:27 -0700 Subject: [PATCH 2/4] Fixing spelling error --- templates/layouts/main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layouts/main.html b/templates/layouts/main.html index 5b2d471b7..985e1462e 100644 --- a/templates/layouts/main.html +++ b/templates/layouts/main.html @@ -64,7 +64,7 @@

Additional Information

This site is in alpha. Tell us what you think!

This is the first public release of openFEC, a new app for exploring the FEC's disclosure data. OpenFEC uses current campaign finance disclosure data but is not inclusive of all data made available by the FEC and things may not work as expected. Please continue your regular work on the Campaign Finance Disclosure Portal.

-

WWe're working hard to make openFEC a useful addition to the resources available at FEC.gov. Your feedback is important to us as we build this site. Email us and let us know how it’s working for you.

+

We're working hard to make openFEC a useful addition to the resources available at FEC.gov. Your feedback is important to us as we build this site. Email us and let us know how it’s working for you.