Changeset: f279a0acaebb https://sourceforge.net/p/mrbs/hg-code/ci/f279a0acaebb27b337b77201e7f46dbeb3171f6f Author: John Beranek <jbera...@users.sourceforge.net> Date: Wed Mar 15 00:03:42 2017 +0000 Log message:
Added some CSS classes to the minicals. diffstat: web/mincals.inc | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diffs (46 lines): diff -r c91e26f04d09 -r f279a0acaebb web/mincals.inc --- a/web/mincals.inc Tue Mar 14 16:46:01 2017 +0000 +++ b/web/mincals.inc Wed Mar 15 00:03:42 2017 +0000 @@ -139,13 +139,20 @@ } for ($i = 0; $i < 7; $i++) { + $currentday = gmmktime (12, 0, 0, $this->month, $d, $this->year); + $baseclass = ((date('w', $currentday) == 0) || + (date('w', $currentday) == 6)) ? "day_weekend" : "day_weekday"; $hide_this_day = is_hidden_day(($i + $weekstarts) % 7); - $s .= "<td"; if ($hide_this_day) { - $s .= " class=\"hidden\""; + $baseclass .= " hidden"; } + if (($d < 0) || ($d > $daysInMonth)) + { + $baseclass .= " day_blank"; + } + $s .= "<td class=\"$baseclass\""; // If this cell is the "sticky day" (ie the day passed through in GET parameters) // then assign an id so that we can apply some special styling @@ -307,14 +314,17 @@ { $show = $basetime + ($i * SECONDS_PER_DAY); $fl = utf8_strftime($strftime_format['dayname_cal'], $show); + $baseclass = ((date('w', $show) == 0) || + (date('w', $show) == 6)) ? "day_weekend" : "day_weekday"; + // add a class if it's a hidden day so that we can apply special styling if (is_hidden_day(($i + $weekstarts) % 7)) { - $s .= "<th class=\"hidden\">$fl</th>\n"; + $s .= "<th class=\"$baseclass hidden\">$fl</th>\n"; } else { - $s .= "<th>$fl</th>\n"; + $s .= "<th class=\"$baseclass\">$fl</th>\n"; } } return $s; ------------------------------------------------------------------------------ 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