Commit 59c9f1e7 authored by Romain Loth's avatar Romain Loth

function to shift page lower when many topbar filters

parent 20ac2f9c
......@@ -400,7 +400,7 @@ div.ccsection-footer {
/*in directory view*/
.full-directory {
margin: 70 25 0 25;
margin: 45 25 0 25;
}
.container.inner {
width: 100%;
......
......@@ -97,6 +97,7 @@ whoswho = (function(ww) {
$("" + id1).hide();
show("#" + id1);
$("#" + id2).focus();
whoswho.shiftPage()
return false;
};
......@@ -108,7 +109,7 @@ whoswho = (function(ww) {
// start transition
tgtBox.style.opacity = 0
// remove box
setTimeout(function(){tgtBox.remove()}, 500)
setTimeout(function(){tgtBox.remove(); whoswho.shiftPage();}, 500)
return true
}
else {
......@@ -117,6 +118,22 @@ whoswho = (function(ww) {
}
}
// call it to adjust page position if topbar becomes thick
ww.shiftPage = function() {
console.log("SHIFT PAGE")
var topbar = document.getElementsByClassName('topbar')[0]
var page = document.getElementsByClassName('page')[0]
if (!page) {
page = document.getElementsByClassName('full-directory')[0]
}
if (topbar && page) {
var topContainer = topbar.querySelector('.container-fluid')
if (topContainer && topContainer.offsetHeight) {
page.style.marginTop = topContainer.offsetHeight
}
}
}
return ww;
})(whoswho);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment