Commit fd347bfb43b405a73ec3687118c4f017a001c28b
1 parent
acb9632b
Exists in
master
and in
39 other branches
Preventing Gitlab to break header and footer links
Showing
2 changed files
with
12 additions
and
1 deletions
Show diff stats
src/proxy/gitlab/templates/proxy/gitlab.html
... | ... | @@ -29,6 +29,17 @@ |
29 | 29 | {% block head_js %} |
30 | 30 | <script type="text/javascript"> |
31 | 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 | 43 | $('div.panel-body div.automerge_widget').removeClass('hide'); |
33 | 44 | }); |
34 | 45 | </script> | ... | ... |
src/templates/base.html
... | ... | @@ -172,7 +172,7 @@ |
172 | 172 | <div class="row"> </div> |
173 | 173 | |
174 | 174 | {% block footer %} |
175 | - <div class="row"> | |
175 | + <div class="footer row"> | |
176 | 176 | <p class="col-lg-12 text-center"> |
177 | 177 | <a href="{% url 'opendata' %}"><img src="{{ STATIC_URL }}img/opendata3.png"/></a> |
178 | 178 | </p> | ... | ... |