Commit 7454454e9e95a12900c610fbbb616516ea3a48d0
1 parent
af5a57c2
Preventing Gitlab to break header and footer links
Showing
2 changed files
with
12 additions
and
1 deletions
Show diff stats
src/proxy/templates/proxy/gitlab.html
@@ -29,6 +29,17 @@ | @@ -29,6 +29,17 @@ | ||
29 | {% block head_js %} | 29 | {% block head_js %} |
30 | <script type="text/javascript"> | 30 | <script type="text/javascript"> |
31 | $(function(){ | 31 | $(function(){ |
32 | + // By Default Gitlab uses an event listener to stop propagation on any links | ||
33 | + // and use HTML5 pseudo navigation. That was causing all links in our | ||
34 | + // headers and footers to send the user to the right location but | ||
35 | + // applying Gitlab CSS everywhere. | ||
36 | + // The workaround below will run before the Gitlab event and will prevent | ||
37 | + // it to work. | ||
38 | + | ||
39 | + $('.navbar a', 'footer').not('.dropdown-toggle').on("click", | ||
40 | + function(evt) { evt.stopPropagation(); } | ||
41 | + ); | ||
42 | + | ||
32 | $('div.panel-body div.automerge_widget').removeClass('hide'); | 43 | $('div.panel-body div.automerge_widget').removeClass('hide'); |
33 | }); | 44 | }); |
34 | </script> | 45 | </script> |
src/templates/base.html
@@ -172,7 +172,7 @@ | @@ -172,7 +172,7 @@ | ||
172 | <div class="row"> </div> | 172 | <div class="row"> </div> |
173 | 173 | ||
174 | {% block footer %} | 174 | {% block footer %} |
175 | - <div class="row"> | 175 | + <div class="footer row"> |
176 | <p class="col-lg-12 text-center"> | 176 | <p class="col-lg-12 text-center"> |
177 | <a href="{% url 'opendata' %}"><img src="{{ STATIC_URL }}img/opendata3.png"/></a> | 177 | <a href="{% url 'opendata' %}"><img src="{{ STATIC_URL }}img/opendata3.png"/></a> |
178 | </p> | 178 | </p> |