From 62d07c074357dc48a33deda31520c841d8b18515 Mon Sep 17 00:00:00 2001
From: Chris Lawton <chris.lawton@torchbox.com>
Date: Tue, 27 Feb 2018 16:44:25 +0000
Subject: [PATCH] adding logic to show/hide the actions panel on mobile

---
 opentech/static_src/src/javascript/main.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/opentech/static_src/src/javascript/main.js b/opentech/static_src/src/javascript/main.js
index 07c9e2a85..5f2ec688c 100755
--- a/opentech/static_src/src/javascript/main.js
+++ b/opentech/static_src/src/javascript/main.js
@@ -30,6 +30,13 @@ import MobileSearch from './components/mobile-search';
                 `);
             }
         });
+
+        // Show actions sidebar on mobile
+        $('.js-actions-toggle').click(function(e) {
+            e.preventDefault();
+            this.classList.toggle('is-active');
+            this.nextElementSibling.classList.toggle('is-visible');
+        });
     });
 
     // Add active class to filters - dropdowns are dynamically appended to the dom,
@@ -123,6 +130,8 @@ import MobileSearch from './components/mobile-search';
             $('body').removeClass('no-scroll');
             $('.js-filter-wrapper').removeClass('is-open');
             $('.js-filter-list').removeClass('form__filters--mobile');
+            $('.js-actions-toggle').removeClass('is-active');
+            $('.js-actions-sidebar').removeClass('is-visible');
         }
     }).trigger('resize');
 })(jQuery);
-- 
GitLab