From ae0e095995048d717e9b1d4515b36c8f861ec5eb Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 7 Jul 2017 12:57:43 +0200 Subject: [locationinfo] Try working around messy time handling (timezones etc), CSS Webkit/Presto and Blink/Gecko (or rather the corresponding JS engine) disagree about how to handle certain date format strings wrt. time zones. This leads to nasty discrepancies of events being displayed in the calendar. (Unfortunately the students working on this project could not be convinced that properly handling time zones when dealing with time information should be considered important.) Also, some tweaks to CSS/layout have been implemented so the design isn't as messed up on old webkits that don't support flex layout. --- .../locationinfo/frontend/doorsign.html | 29 +++++++++++++++++++--- .../jquery-week-calendar/jquery.weekcalendar.js | 17 +++++++------ 2 files changed, 35 insertions(+), 11 deletions(-) (limited to 'modules-available/locationinfo/frontend') diff --git a/modules-available/locationinfo/frontend/doorsign.html b/modules-available/locationinfo/frontend/doorsign.html index 97504284..8acdb07b 100755 --- a/modules-available/locationinfo/frontend/doorsign.html +++ b/modules-available/locationinfo/frontend/doorsign.html @@ -58,6 +58,14 @@ optional: justify-content: space-between; } + .pull-left { + float: left; + } + + .clearfix { + clear: both; + } + .col { padding: 0 4px; color: white; @@ -67,6 +75,8 @@ optional: } .col-square { + order: 1000; + float: right; width: 46pt; width: 4vw; height: 46pt; @@ -147,6 +157,7 @@ optional: .center { text-align: center; + margin: auto; } .room-layout { @@ -439,7 +450,15 @@ optional: return; } - var time = new Date(result.time); + var time = false; + var p = result.time.split('-'); + if (p.length === 6) { + time = new Date(p[0], p[1], p[2], p[3], p[4], p[5]); + console.log(time); + } + if (time === false || isNaN(time.getTime()) || time.getYear() < 2010) { + time = new Date(result.time); + } if (isNaN(time.getTime()) || time.getYear() < 2010) { time = new Date(); } @@ -587,7 +606,7 @@ optional: $("body").append($loc); room.$.container = $loc; - room.$.locationName = $('