Changeset:
f579e2084d16
https://sourceforge.net/p/mrbs/hg-code/ci/f579e2084d16bcef2471eac82b819ead2543e9a8
Author:
Campbell Morrison <[email protected]>
Date:
Fri Nov 11 16:15:18 2016 +0000
Log message:
Moved the width for monthly bookings out from a style attribute to the CSS file
diffstat:
web/css/mrbs.css.php | 37 +++++++++++++++++++++++++++++++++----
web/month.php | 6 +++---
2 files changed, 36 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r 51db18c07be9 -r f579e2084d16 web/css/mrbs.css.php
--- a/web/css/mrbs.css.php Fri Nov 11 15:34:46 2016 +0000
+++ b/web/css/mrbs.css.php Fri Nov 11 16:15:18 2016 +0000
@@ -338,10 +338,39 @@
#month_main div.cell_header a.monthday {font-size: medium} /* the date in the
top left corner */
#month_main div.cell_header a.week_number {opacity: 0.5; padding: 2px 4px 0
4px}
-div.booking_list {position: relative; z-index: 20; /*
contains the list of bookings */
- max-height: 80%; font-size: x-small; /*
needs to be above new_booking */
- overflow: <?php echo ($month_cell_scrolling ? 'auto' : 'visible') ?>}
-.booking_list a {font-size: x-small}
+div.booking_list {
+ position: relative; /* contains the list of bookings */
+ z-index: 20; /* needs to be above new_booking */
+ max-height: 80%;
+ font-size: x-small;
+ overflow: <?php echo ($month_cell_scrolling ? 'auto' : 'visible') ?>;
+}
+
+<?php
+// We need to set the width of the bookings to be 50%. However because of the
way
+// different browsers round, we need to set it just below 50%, because if they
round up,
+// as some do, then two divs won't fit on a line and they will wrap.
+?>
+
+div.description, div.slot {
+ width: 49.9%; <?php // Fallback for browsers that don't support calc() ?>
+}
+
+div.description:nth-child(odd), div.slot:nth-child(odd) {
+ width: calc(50%);
+}
+
+div.description:nth-child(even), div.slot:nth-child(even) {
+ width: calc(50% - 1px);
+}
+
+div.both {
+ width: 100%;
+}
+
+.booking_list a {
+ font-size: x-small;
+}
<?php
diff -r 51db18c07be9 -r f579e2084d16 web/month.php
--- a/web/month.php Fri Nov 11 15:34:46 2016 +0000
+++ b/web/month.php Fri Nov 11 16:15:18 2016 +0000
@@ -326,9 +326,9 @@
if ($confirmation_enabled && ($d[$cday]["status"][$i] &
STATUS_TENTATIVE))
{
$class .= " tentative";
- }
- $html .= "<div class=\"" . $class . "\"" .
- " style=\"width: " . (($monthly_view_entries_details == "both") ?
'100%' : '49.9%') . "\">\n";
+ }
+ $class .= " $monthly_view_entries_details";
+ $html .= "<div class=\"" . $class . "\">\n";
$booking_link = "view_entry.php?id=" . $d[$cday]["id"][$i] .
"&day=$cday&month=$month&year=$year";
$slot_text = $d[$cday]["data"][$i];
$description_text = utf8_substr($d[$cday]["shortdescrip"][$i], 0,
255);
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits