Open marceloavilaoliveira opened 5 years ago
The header_include
part is a dup of #2841 - the workaround is to avoid putting too high elements in the include.
The long xref is the biggest problem I think.
What do you mean by "too high elements" in the include? I got the same issue if I simply put the following in the header_include:
<a href="https://opengrok.cpqd.com.br">
<img src="/images/opengrok.png"/>
</a>
Could you point to a header_include example which works?
single line of text works for me.
Actually, even just a single line with a tiny font doesn't work pretty well:
Anyway just one line in the header isn't good enough :-(
Following change can resolve the issue:
diff --git a/opengrok-web/src/main/webapp/default/style.css b/opengrok-web/src/main/webapp/default/style.css
index e66842c..8a28a51 100644
--- a/opengrok-web/src/main/webapp/default/style.css
+++ b/opengrok-web/src/main/webapp/default/style.css
@@ -276,7 +276,7 @@ html.diff #whole_header {
position: fixed;
top: 0;
background: #ffffff;
- height: 70px;
+ margin-bottom: 5px;
width: 100%;
}
@@ -473,7 +473,7 @@ html.xref #content,
html.diff #content,
html.more #content,
html.history #content{
- margin-top: 70px;
+ display: none;
}
/* *** help page *** */
diff --git a/opengrok-web/src/main/webapp/js/utils-0.0.31.js b/opengrok-web/src/main/webapp/js/utils-0.0.31.js
index 4a17bd8..440ff9b 100644
--- a/opengrok-web/src/main/webapp/js/utils-0.0.31.js
+++ b/opengrok-web/src/main/webapp/js/utils-0.0.31.js
@@ -2429,3 +2429,9 @@ function getCookie(cname) {
}
return "";
}
+
+$(document).ready(function() {
+ whole_header_bottom = $('#whole_header').position().top + $('#whole_header').outerHeight(true);
+ $('#content').css('margin-top', whole_header_bottom);
+ $('#content').show();
+});
Following change can resolve the issue:
I made these changes up to the 1.2.25 version but the result was not good. The overlap issue wasn't fixed and the URL line anchors in the search results aren't working anymore.
For example, if we click on the link below
https://OPENGROK-SERVER/source/xref/PROJECT/PATH/FILENAME#28
The browser doesn't go to the line 28 of the filename.
This is the correct way OpenGrok shows the results:
But the search window overlaps the menu if something is added to data/header_include file:
The same happens if the xref line is too long and/or the window is too short: