Changeset:
ea8fb568b958
https://sourceforge.net/p/mrbs/hg-code/ci/ea8fb568b9583e0b51584e85b3f1992936197721
Author:
Campbell Morrison <[email protected]>
Date:
Mon Apr 03 17:17:38 2017 +0100
Log message:
Commit before change of approach for grid.
diffstat:
web/css/mrbs.css.php | 20 ++++++++++++++++++--
web/index.php | 28 +++++++++++++++++++++++++++-
2 files changed, 45 insertions(+), 3 deletions(-)
diffs (86 lines):
diff -r 1049e51c426a -r ea8fb568b958 web/css/mrbs.css.php
--- a/web/css/mrbs.css.php Sun Apr 02 18:36:28 2017 +0100
+++ b/web/css/mrbs.css.php Mon Apr 03 17:17:38 2017 +0100
@@ -1433,7 +1433,7 @@
border-collapse: collapse;
}
-.main_view table td {
+.main_view td {
padding: 0;
}
@@ -1458,7 +1458,7 @@
border-top: 1px solid <?php echo $body_background_color ?>;
}
-.main_view a {
+.main_view a, .main_view .grid span {
display: block;
width: 100%;
white-space: nowrap;
@@ -1483,3 +1483,19 @@
.main_view_data td.continuation a {
color: transparent;
}
+
+td.data {
+ position: relative;
+}
+
+.grid {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ border: 1px solid red;
+}
+
+.main_view .grid td {
+ border-top-color: transparent;
+}
diff -r 1049e51c426a -r ea8fb568b958 web/index.php
--- a/web/index.php Sun Apr 02 18:36:28 2017 +0100
+++ b/web/index.php Mon Apr 03 17:17:38 2017 +0100
@@ -296,6 +296,32 @@
return $html;
}
+
+function get_grid($map)
+{
+ $html = '';
+
+ $html .= "<table class=\"grid\">\n";
+
+ $slots = array_keys(current($map));
+ $n_rooms = count($map);
+
+ for ($i=0; $i<$n_rooms; $i++)
+ {
+ $html .= "<tr>\n";
+ foreach ($slots as $slot)
+ {
+ $html .= "<td><span> </span></td>\n";
+ }
+ $html .= "</tr>\n";
+ }
+
+ $html .= "</table>\n";
+
+ return $html;
+}
+
+
function get_table($map)
{
$html = '';
@@ -305,7 +331,7 @@
$html .= "<table class=\"main_view\">\n";
$html .= "<tr>\n";
$html .= "<td>" . get_row_labels_table($map) . "</td>\n";
- $html .= "<td>" . get_row_data_table($map) . " </td>\n";
+ $html .= "<td class=\"data\">" . get_row_data_table($map) . get_grid($map) .
" </td>\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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits