From a0d32fca6602f36f4ab01946c54f541e11ed91e9 Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Tue, 20 Nov 2018 13:41:35 +0100
Subject: [PATCH] Add a javascript link to toffle the sidebar on submission
 pages for admin.

---
 .../funds/applicationsubmission_admin_detail.html   |  1 +
 .../src/javascript/apply/toggle-sidebar.js          | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 opentech/static_src/src/javascript/apply/toggle-sidebar.js

diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html b/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html
index cd4d2e135..47380b0e4 100644
--- a/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html
+++ b/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html
@@ -43,4 +43,5 @@
     <script src="{% static 'js/apply/tabs.js' %}"></script>
     <script src="{% static 'js/apply/toggle-actions-panel.js' %}"></script>
     <script src="{% static 'js/apply/toggle-reviewers.js' %}"></script>
+    <script src="{% static 'js/apply/toggle-sidebar.js' %}"></script>
 {% endblock %}
diff --git a/opentech/static_src/src/javascript/apply/toggle-sidebar.js b/opentech/static_src/src/javascript/apply/toggle-sidebar.js
new file mode 100644
index 000000000..503217d96
--- /dev/null
+++ b/opentech/static_src/src/javascript/apply/toggle-sidebar.js
@@ -0,0 +1,13 @@
+(function ($) {
+
+    'use strict';
+
+    var $sidebar = $('.sidebar');
+    $('.tabs__container').append('<a class="tab__item tab__item--right js-sidebar-toggle" href="#">Toggle sidebar</a>');
+    $('.js-sidebar-toggle').click(function (e) {
+        e.preventDefault();
+        $sidebar.toggleClass('hidden');
+    });
+
+})(jQuery);
+
-- 
GitLab