Skip to content

Commit

Permalink
hide the footerbar when in lobby and fullscreen (re-activate with hover)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tjark Wilhelm Hoeck committed Nov 5, 2016
1 parent e69adcc commit 1563cf9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
30 changes: 30 additions & 0 deletions arsnova.click/client/layout/region_footer/scripts/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ const clickEvents = {
} else if (document.webkitFullscreenElement) {
document.webkitCancelFullScreen();
}

var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");
if (route === "memberlist"){
$('.navbar-footer-placeholder').hide();
$('.navbar-footer').show();
}
} else {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
Expand All @@ -83,6 +90,13 @@ const clickEvents = {
} else if (document.documentElement.webkitRequestFullScreen) {
document.documentElement.webkitRequestFullScreen();
}

var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");
if (route === "memberlist"){
$('.navbar-footer').hide();
$('.navbar-footer-placeholder').show();
}
}
},
"click #import": function () {
Expand Down Expand Up @@ -377,6 +391,22 @@ const defaultBackButtonBehavior = {
Template.footer.events($.extend({}, clickEvents, {
"click #show-more": function () {
Router.go("/" + Router.current().params.quizName + "/showMore");
},
"mouseenter .navbar-footer-placeholder": function () {
var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");
if (window.innerHeight == screen.height && route === "memberlist"){
$('.navbar-footer-placeholder').hide();
$('.navbar-footer').show();
}
},
"mouseleave .navbar-footer": function () {
var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");
if (window.innerHeight == screen.height && route === "memberlist"){
$('.navbar-footer').hide();
$('.navbar-footer-placeholder').show();
}
}
}));

Expand Down
6 changes: 6 additions & 0 deletions arsnova.click/client/layout/region_footer/styles/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
}
}

.navbar-footer-placeholder {
height: 56px;
width: 100%;
display:none;
}

.showMoreCheckboxLabel {
margin-bottom: 0;
line-height: 30px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
{{> hiddenFooterElement}}
{{/each}}
</nav>
<nav class="navbar-footer-placeholder navbar-fixed-bottom">
</nav>
</template>

<template name="hiddenFooterElement">
Expand Down

0 comments on commit 1563cf9

Please sign in to comment.