1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

Fix footer including waitqueue

Signed-off-by: Marco Dickert <marco@misterunknown.de>
This commit is contained in:
Marco Dickert
2020-07-18 17:40:03 +02:00
parent 61acea2c0a
commit d286c0a07c
4 changed files with 33 additions and 27 deletions

View File

@@ -1390,20 +1390,19 @@ function IFM(params) {
if( ! document.querySelector( "footer" ) ) {
var newFooter = self.getNodeFromString( Mustache.render( self.templates.footer, { i18n: self.i18n } ) );
newFooter.addEventListener( 'click', function( e ) {
if( e.target.name == 'showAll' ) {
if( newFooter.style.maxHeight == '80%' ) {
newFooter.style.maxHeight = '6em';
newFooter.style.overflow = 'hidden';
newFooter.hidden = true;
if( e.target.name == 'showAll' || e.target.parentElement.name == "showAll" ) {
wq = newFooter.children.wq_container.children[0].children.waitqueue;
if( wq.style.maxHeight == '70vh' ) {
wq.style.maxHeight = '6rem';
wq.style.overflow = 'hidden';
} else {
newFooter.style.maxHeight = '80%';
newFooter.style.overflow = 'scroll';
newFooter.hidden = false;
wq.style.maxHeight = '70vh';
wq.style.overflow = 'auto';
}
}
});
document.body.appendChild( newFooter );
document.body.style.paddingBottom = '6em';
document.body.style.paddingBottom = '9rem';
}
task.id = "wq-"+task.id;
task.type = task.type || "info";

View File

@@ -3,6 +3,10 @@ body {
overflow-y: scroll !important;
}
main {
margin-bottom: 1rem;
}
a {
cursor: pointer !important;
}
@@ -94,10 +98,13 @@ footer {
background-color: #EEE;
bottom: 0;
width: 100%;
max-height: 6em;
overflow: hidden;
}
#waitqueue {
max-height: 6rem;
}
#waitqueue .progress {
position: relative;
margin-bottom: 0;

View File

@@ -1,11 +1,11 @@
<footer class="footer mt-auto py-3">
<div class="container">
<div class="row">
<div class="col-1">
<a type="button" class="btn btn-light" name="showAll">{{i18n.tasks}} <span class="badge badge-secondary" name="taskCount">1</span></a>
</div>
<div id="waitqueue" class="col-11">
</div>
</div>
</div>
</footer>
<div id="wq_container" class="container">
<div class="row">
<div class="col-md-2 mb-1">
<a type="button" class="btn btn-light btn-block" name="showAll">{{i18n.tasks}} <span class="badge badge-secondary" name="taskCount">1</span></a>
</div>
<div id="waitqueue" class="col-md-10">
</div>
</div>
</div>
</footer>

View File

@@ -1,9 +1,9 @@
<div id="{{id}}" class="card">
<div class="card-body">
<div class="progress">
<div class="progress-bar bg-{{type}} progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemax="100" style="width:100%">
{{name}}
</div>
<div id="{{id}}" class="card mb-1">
<div class="card-body">
<div class="progress">
<div class="progress-bar bg-{{type}} progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemax="100" style="width:100%">
{{name}}
</div>
</div>
</div>
</div>
</div>