From 58fd85f571ae7f6481c9a2fd8134d0cb5df8bdcc Mon Sep 17 00:00:00 2001
From: vimal1083 <vimal1083@gmail.com>
Date: Mon, 24 Aug 2020 12:21:46 +0530
Subject: [PATCH] Display link icon on hover

---
 .../templates/stream_forms/heading_field.html      |  2 ++
 .../apply/application-form-links-new-window.js     |  2 +-
 .../src/sass/public/components/_section.scss       | 14 ++++++++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/hypha/apply/stream_forms/templates/stream_forms/heading_field.html b/hypha/apply/stream_forms/templates/stream_forms/heading_field.html
index a61ebc28c..a54563e41 100644
--- a/hypha/apply/stream_forms/templates/stream_forms/heading_field.html
+++ b/hypha/apply/stream_forms/templates/stream_forms/heading_field.html
@@ -1,3 +1,4 @@
+<div class="section-head">
 {% if self.size == 'h2' %}
         <h2 id="{{ value.heading_text|slugify }}">{{ value.heading_text }}
             <a href="#{{ value.heading_text|slugify }}">
@@ -25,3 +26,4 @@
             </a>
         </h4>
 {% endif %}
+</div>
diff --git a/hypha/static_src/src/javascript/apply/application-form-links-new-window.js b/hypha/static_src/src/javascript/apply/application-form-links-new-window.js
index 17f405a50..f705e4808 100644
--- a/hypha/static_src/src/javascript/apply/application-form-links-new-window.js
+++ b/hypha/static_src/src/javascript/apply/application-form-links-new-window.js
@@ -3,7 +3,7 @@
     'use strict';
 
     // Make links on application forms open in a new window/tab.
-  $('.application-form').find('a').not('h2 > a').not('h3 > a').not('h4 > a').attr({
+  $('.application-form').find('a').not('.section-head a').attr({
         target: '_blank',
         rel: 'noopener noreferrer'
     });
diff --git a/hypha/static_src/src/sass/public/components/_section.scss b/hypha/static_src/src/sass/public/components/_section.scss
index 6cd88e5ef..28b264d1f 100644
--- a/hypha/static_src/src/sass/public/components/_section.scss
+++ b/hypha/static_src/src/sass/public/components/_section.scss
@@ -34,3 +34,17 @@
         }
     }
 }
+
+.section-head{
+    a {
+       display : none;
+       line-height: 30px;
+       vertical-align: middle;
+    }
+
+    &:hover {
+        a {
+        display: inline;
+        }
+    }
+}
-- 
GitLab