Fix sidebar collapse/expand
This commit is contained in:
parent
7e37879836
commit
db5f45934a
@ -1,6 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
// side navigation bar
|
// side navigation bar
|
||||||
function toggleSidebar() {
|
function toggleSidebar() {
|
||||||
document.getElementById("side-nav").classList.toggle("toggle-active");
|
document.getElementById("side-nav").classList.toggle("toggle-active");
|
||||||
@ -69,14 +68,14 @@ $(document).ready(function () {
|
|||||||
btn.html('Expand <i class="fas fa-angle-down"></i>');
|
btn.html('Expand <i class="fas fa-angle-down"></i>');
|
||||||
$(".hide").css("max-height", "150");
|
$(".hide").css("max-height", "150");
|
||||||
$(".white-shadow").css({
|
$(".white-shadow").css({
|
||||||
background:
|
background: "linear-gradient(transparent 50%, rgba(255,255,255,.8) 80%)",
|
||||||
"linear-gradient(transparent 50%, rgba(255,255,255,.8) 80%)",
|
|
||||||
"z-index": "2",
|
"z-index": "2",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
collapsed = !collapsed;
|
collapsed = !collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
$("#primary-search").focus(function () {
|
$("#primary-search").focus(function () {
|
||||||
$("#top-navbar").attr("class", "dim");
|
$("#top-navbar").attr("class", "dim");
|
||||||
$("#side-nav").css("pointer-events", "none");
|
$("#side-nav").css("pointer-events", "none");
|
||||||
|
|||||||
@ -59,15 +59,15 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-screen {
|
.expand {
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
top: 3rem;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
-ms-flex: 0 0 100%;
|
-ms-flex: 0 0 100%;
|
||||||
flex: 0 0 100%;
|
flex: 0 0 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -80,7 +80,7 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-screen .fa-expand-alt {
|
.expand .fa-expand-alt {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,12 +571,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('.fa-expand-alt').click(function () {
|
$('.fa-expand-alt').click(function () {
|
||||||
if ($(this).parent('.chart-wrap').parent('.col-md-6').hasClass('full-screen')) {
|
if ($(this).parent('.chart-wrap').parent('.col-md-6').hasClass('expand')) {
|
||||||
$('.col-md-6.full-screen').removeClass('full-screen');
|
$('.col-md-6.expand').removeClass('expand');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('.col-md-6.full-screen')?.removeClass('full-screen');
|
$('.col-md-6.expand')?.removeClass('expand');
|
||||||
$(this).parent('.chart-wrap').parent('.col-md-6').addClass('full-screen');
|
$(this).parent('.chart-wrap').parent('.col-md-6').addClass('expand');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user