Skip to content

Commit

Permalink
code styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Tjark Wilhelm Hoeck committed Nov 5, 2016
1 parent 1563cf9 commit ee08b00
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions arsnova.click/client/layout/region_footer/scripts/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ const clickEvents = {
}
},
"click #fullscreen, switchChange.bootstrapSwitch .bootstrap-switch-id-fullscreen_switch ": function () {
var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");

if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) {
if (document.cancelFullScreen) {
document.cancelFullScreen();
Expand All @@ -76,9 +79,7 @@ const clickEvents = {
document.webkitCancelFullScreen();
}

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

var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");
if (route === "memberlist"){
if (route === "memberlist") {
$('.navbar-footer').hide();
$('.navbar-footer-placeholder').show();
}
Expand Down Expand Up @@ -393,17 +392,17 @@ Template.footer.events($.extend({}, clickEvents, {
Router.go("/" + Router.current().params.quizName + "/showMore");
},
"mouseenter .navbar-footer-placeholder": function () {
var route = Router.current().route.getName();
var route = Router.current().route.getName();
route = route.replace(/(:quizName.)*(.:id)*/g, "");
if (window.innerHeight == screen.height && route === "memberlist"){
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"){
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

0 comments on commit ee08b00

Please sign in to comment.