Changeset: 3ba10665cc7c https://sourceforge.net/p/mrbs/hg-code/ci/3ba10665cc7cd02cd351322cd932d17b3239625b Author: Campbell Morrison <cimorri...@hg.code.sf.net> Date: Thu Apr 06 20:29:18 2017 +0100 Log message:
Changed the slot grid so that it's just a single row, thereby improving rendering performance. diffstat: web/css/mrbs.css.php | 5 +++++ web/index.php | 27 ++++++++++----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diffs (71 lines): diff -r c6dd493ed02c -r 3ba10665cc7c web/css/mrbs.css.php --- a/web/css/mrbs.css.php Thu Apr 06 17:59:13 2017 +0100 +++ b/web/css/mrbs.css.php Thu Apr 06 20:29:18 2017 +0100 @@ -1486,19 +1486,24 @@ td.data { position: relative; + height: 100%; } .grid { position: absolute; top: 0; left: 0; + height: 100%; } .main_view .grid td { border-top-color: transparent; + height: 100%; } .grid span { + height: 100%; + line-height: 100vh; border-left: 1px dotted #788d9c; } diff -r c6dd493ed02c -r 3ba10665cc7c web/index.php --- a/web/index.php Thu Apr 06 17:59:13 2017 +0100 +++ b/web/index.php Thu Apr 06 20:29:18 2017 +0100 @@ -318,29 +318,22 @@ $date->modify('+1 day'); } while (get_end_last_slot($n, $j, $Y) < $interval['end']); - // Get the number of rooms - $rooms = get_rooms($area); - $n_rooms = count($rooms); - - for ($i=0; $i<$n_rooms; $i++) + $html .= "<tr>\n"; + foreach ($days as $day) { - $html .= "<tr>\n"; - foreach ($days as $day) + $first_slot = true; + foreach ($day as $slot) { - $first_slot = true; - foreach ($day as $slot) + $html .= "<td"; + if ($first_slot) { - $html .= "<td"; - if ($first_slot) - { - $html .= " class=\"first_slot_of_day\""; - $first_slot = false; - } - $html .= "><span> </span></td>\n"; + $html .= " class=\"first_slot_of_day\""; + $first_slot = false; } + $html .= "><span> </span></td>\n"; } - $html .= "</tr>\n"; } + $html .= "</tr>\n"; $html .= "</table>\n"; ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mrbs-commits mailing list Mrbs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mrbs-commits