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 { ...@@ -400,7 +400,7 @@ div.ccsection-footer {
/*in directory view*/ /*in directory view*/
.full-directory { .full-directory {
margin: 70 25 0 25; margin: 45 25 0 25;
} }
.container.inner { .container.inner {
width: 100%; width: 100%;
......
...@@ -97,6 +97,7 @@ whoswho = (function(ww) { ...@@ -97,6 +97,7 @@ whoswho = (function(ww) {
$("" + id1).hide(); $("" + id1).hide();
show("#" + id1); show("#" + id1);
$("#" + id2).focus(); $("#" + id2).focus();
whoswho.shiftPage()
return false; return false;
}; };
...@@ -108,7 +109,7 @@ whoswho = (function(ww) { ...@@ -108,7 +109,7 @@ whoswho = (function(ww) {
// start transition // start transition
tgtBox.style.opacity = 0 tgtBox.style.opacity = 0
// remove box // remove box
setTimeout(function(){tgtBox.remove()}, 500) setTimeout(function(){tgtBox.remove(); whoswho.shiftPage();}, 500)
return true return true
} }
else { else {
...@@ -117,6 +118,22 @@ whoswho = (function(ww) { ...@@ -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; return ww;
})(whoswho); })(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