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