diff --git a/index.html b/index.html index ae36a1b..48f6e57 100644 --- a/index.html +++ b/index.html @@ -36,7 +36,7 @@ diff --git a/style.css b/style.css index 5e4383d..d320e0f 100644 --- a/style.css +++ b/style.css @@ -282,7 +282,7 @@ input.activeButton, input[type=button]:active, a.activeButton label { - font-size: 10px; + font-size: 12px; } input[type=number], select @@ -394,14 +394,14 @@ table table th { position: relative; - margin-top: -1px; - margin-bottom: 6px; + margin-bottom: 2px; border-style: solid; border-color: #797979; border-width: 1px; border-collapse: collapse; padding: 4px; border-radius: 4px; + margin-top: 2px } table td @@ -421,7 +421,7 @@ table td grid-gap: 0px; grid-template-rows: 13px 14px 13px; grid-templates-columns: 13px 1fr; - font-size: 12px; + font-size: 14px; line-height: 40px; padding: 4px; } @@ -516,6 +516,29 @@ table td color: black; } +.workingEven +{ + background: #eeffffff !important; +} + +.earlyEven +{ + background: #eeffff33 !important; + color: black; +} + +.lateEven +{ + background: #5b91ecff !important; + color: white; +} + +.weekendEven +{ + background: #ffc94744 !important; + color: black; +} + input[type=button]:disabled { color: #797979; @@ -620,3 +643,8 @@ input.searchResult:focus width: 50px; } +#shareRawText +{ + padding: 8px; + font-size:12px; +} diff --git a/table.js b/table.js index fa75c07..6f4dfda 100644 --- a/table.js +++ b/table.js @@ -300,7 +300,7 @@ table.drawColor = function() if (options.colorCoding) { var rows = $("#zoneTable table tr"); - rows.each(function(){ + rows.filter(":even").each(function(){ $(this).children("td").each(function(){ var time = $(this).children("time").html(); @@ -328,6 +328,36 @@ table.drawColor = function() }) }) + rows.filter(":odd").each(function(){ + + $(this).children("td").each(function(){ + var time = $(this).children("time").html(); + switch (options.formatSelector) + { + case "24H": + $(this).addClass("workingEven"); + if (time.split(":")[0] < 8 && time.split(":")[0] != 0) + $(this).addClass("earlyEven"); + if (time.split(":")[0] >= 17 || time.split(":")[0] == 0) + $(this).addClass("lateEven"); + break; + + case "12H": + $(this).addClass("workingEven"); + if ((time.split(":")[0] < 8 || time.split(":")[0] == 12) && time.split(" ")[1] == "AM") + $(this).addClass("earlyEven") + if ((time.split(":")[0] >= 5 && time.split(" ")[1] == "PM" && time.split(":")[0] != 12) || (time.split(":")[0] == 12 && time.split(" ")[1] == "AM")) + $(this).addClass("lateEven") + break; + } + if ($(this).children(".day").text() == "Sat" || $(this).children(".day").text() == "Sun") + { + $(this).removeClass(); + $(this).addClass("weekendEven"); + } + }) + + }) } else $("#zoneTable table tr td").removeClass(); }