From e7ed0c68ceef4e00ac9b577ab928958dc1001c0b Mon Sep 17 00:00:00 2001 From: Michael Scherle Date: Wed, 15 Mar 2017 01:51:18 +0100 Subject: frontend: fixed loading bar in mode 4, mode 4 now supports up to 4 rooms, font scaling for 1-4 rooms --- .../locationinfo/frontend/doorsign.html | 85 +++++++++++++++------- 1 file changed, 60 insertions(+), 25 deletions(-) (limited to 'modules-available/locationinfo/frontend') diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html index 378dbc69..e628b00d 100755 --- a/modules-available/locationinfo/frontend/doorsign.html +++ b/modules-available/locationinfo/frontend/doorsign.html @@ -43,9 +43,11 @@ optional: height: 100%; float: left; box-sizing: border-box; - display: flex; + background-color: #cacaca; overflow: hidden; + position: absolute; + display: table; } @@ -71,7 +73,7 @@ optional: height: 2px; position: absolute; background-color: red; - bottom: 0px; + bottom: 2px; z-index: 1; } @@ -114,6 +116,7 @@ optional: .roompadding { float: left; + position: relative; } .room { @@ -185,7 +188,6 @@ optional: position: absolute; left: 0; bottom: 0; - display: inline-block; width: 100%; height: 100%; display: table; @@ -520,19 +522,8 @@ optional: var obj = document.getElementById("roompadding_" + rooms[property].id); - if (roomsToshow > 1) { - obj.style.padding = "5px"; - if (i != 0) { - obj.style.paddingLeft = "0px"; - } - } - /* - obj.style.width = width; obj.style.height = height; - */ - obj.setAttribute("style","width:"+width); - obj.setAttribute("style","height:"+height); - + obj.style.width = width; text = "
"; $("#roompadding_" + rooms[property].id).append(text); @@ -556,11 +547,39 @@ optional: } if (roomsToshow == 2) { - document.getElementById("square_" + rooms[property].id).style.width = "8vw"; - document.getElementById("square_" + rooms[property].id).style.height = "8vw"; - document.getElementById("roomHeader_" + rooms[property].id).style.fontSize = "2vw"; - document.getElementById("freeSeatsHeader_" + rooms[property].id).style.fontSize = "5vw"; - document.getElementById("courseHeading_" + rooms[property].id).style.fontSize = "2vw"; + document.getElementById("square_" + rooms[property].id).style.width = "6vw"; + document.getElementById("square_" + rooms[property].id).style.height = "6vw"; + document.getElementById("roomHeader_" + rooms[property].id).style.fontSize = "1.8vw"; + document.getElementById("freeSeatsHeader_" + rooms[property].id).style.fontSize = "4.5vw"; + document.getElementById("courseHeading_" + rooms[property].id).style.fontSize = "1.8vw"; + var headers = document.getElementsByClassName('header'); + for(var j=0; j 1) { clientHeight -= 5; } @@ -1287,7 +1315,14 @@ optional: } function generateOffsetAndScale(room) { - var clientHeight = ($(window).height() - document.getElementById('header_' + room.id).clientHeight - 5); + + + var clientHeight = $(window).height(); + if(roomsToshow == 4) { + clientHeight = clientHeight/2; + } + + clientHeight = clientHeight- document.getElementById('header_' + room.id).clientHeight - 5; if (roomsToshow > 1) { clientHeight -= 5; -- cgit v1.2.3-55-g7522