diff --git a/resources/celerity/map.php b/resources/celerity/map.php index c20eeda15f..9c0d2186ad 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -122,7 +122,7 @@ return array( 'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894', 'rsrc/css/phui/calendar/phui-calendar-day.css' => '38891735', 'rsrc/css/phui/calendar/phui-calendar-list.css' => 'c1d0ca59', - 'rsrc/css/phui/calendar/phui-calendar-month.css' => '873e00da', + 'rsrc/css/phui/calendar/phui-calendar-month.css' => '4c39f6d9', 'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e', 'rsrc/css/phui/phui-action-header-view.css' => '89c497e7', 'rsrc/css/phui/phui-action-list.css' => '4f4d09f2', @@ -779,7 +779,7 @@ return array( 'phui-calendar-css' => '8675968e', 'phui-calendar-day-css' => '38891735', 'phui-calendar-list-css' => 'c1d0ca59', - 'phui-calendar-month-css' => '873e00da', + 'phui-calendar-month-css' => '4c39f6d9', 'phui-crumbs-view-css' => '594d719e', 'phui-document-view-css' => '94d5dcd8', 'phui-feed-story-css' => 'c9f3a0b5', diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php index 6752637b09..407df512fb 100644 --- a/src/view/phui/calendar/PHUICalendarMonthView.php +++ b/src/view/phui/calendar/PHUICalendarMonthView.php @@ -75,7 +75,7 @@ final class PHUICalendarMonthView extends AphrontView { $empty_cell = array( 'list' => null, 'date' => null, - 'class' => 'phui-calendar-empty', + 'class' => null, ); for ($ii = 0; $ii < $empty; $ii++) { @@ -91,10 +91,6 @@ final class PHUICalendarMonthView extends AphrontView { $class = 'phui-calendar-month-day'; $weekday = $day->format('w'); - if ($day_number == $this->day) { - $class .= ' phui-calendar-today'; - } - if ($holiday || $weekday == 0 || $weekday == 6) { $class .= ' phui-calendar-not-work-day'; } @@ -188,16 +184,33 @@ final class PHUICalendarMonthView extends AphrontView { 'href' => $uri, ), $cell_day->format('j')); + } else { $cell_day = null; } + if ($cell['date'] && $cell['date']->format('j') == $this->day) { + $today_class = 'phui-calendar-today-slot phui-calendar-today'; + } else { + $today_class = 'phui-calendar-today-slot'; + } + + $today_slot = phutil_tag ( + 'div', + array( + 'class' => $today_class, + ), + null); + $cells[] = phutil_tag( 'td', array( 'class' => 'phui-calendar-date-number-container '.$class, ), - $cell_day); + array( + $cell_day, + $today_slot, + )); } $table[] = phutil_tag('tr', array(), $cells); } diff --git a/webroot/rsrc/css/phui/calendar/phui-calendar-month.css b/webroot/rsrc/css/phui/calendar/phui-calendar-month.css index bd99ebf925..b4d1faa8fa 100644 --- a/webroot/rsrc/css/phui/calendar/phui-calendar-month.css +++ b/webroot/rsrc/css/phui/calendar/phui-calendar-month.css @@ -32,14 +32,10 @@ table.phui-calendar-view .phui-calendar-event-list { table.phui-calendar-view a.phui-calendar-date-number { color: {$lightgreytext}; - border-color: {$thinblueborder}; - border-style: solid; - border-width: 1px 0 0 1px; - padding: 4px; + padding: 0 4px; display: inline-block; min-width: 16px; text-align: center; - background-color: #ffffff; } table.phui-calendar-view td.phui-calendar-date-number-container { @@ -53,12 +49,16 @@ table.phui-calendar-view td.phui-calendar-date-number-container { background-color: {$lightgreybackground}; } -.phui-calendar-today { - background-color: {$lightgreen}; +.phui-calendar-today-slot { + display: block; + width: 100%; + height: 4px; + padding: 0; + margin: 0; } -.phui-calendar-empty { - background-color: {$greybackground}; +.phui-calendar-today-slot.phui-calendar-today { + background-color: {$lightblueborder}; } .phui-calendar-event-empty {