diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 9e18b8b5cc..642c17dea8 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -120,7 +120,7 @@ return array( 'rsrc/css/layout/phabricator-hovercard-view.css' => '44394670', 'rsrc/css/layout/phabricator-side-menu-view.css' => 'c1db9e9c', 'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894', - 'rsrc/css/phui/calendar/phui-calendar-day.css' => '49037167', + '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.css' => '8675968e', @@ -777,7 +777,7 @@ return array( 'phui-box-css' => '7b3a2eed', 'phui-button-css' => 'de610129', 'phui-calendar-css' => '8675968e', - 'phui-calendar-day-css' => '49037167', + 'phui-calendar-day-css' => '38891735', 'phui-calendar-list-css' => 'c1d0ca59', 'phui-calendar-month-css' => '873e00da', 'phui-crumbs-view-css' => '594d719e', diff --git a/src/view/phui/calendar/PHUICalendarDayView.php b/src/view/phui/calendar/PHUICalendarDayView.php index 7fdf44d297..35b41ffa52 100644 --- a/src/view/phui/calendar/PHUICalendarDayView.php +++ b/src/view/phui/calendar/PHUICalendarDayView.php @@ -268,7 +268,8 @@ final class PHUICalendarDayView extends AphrontView { } private function renderSidebarBox($events, $title) { - $widget = new PHUICalendarWidgetView(); + $widget = id(new PHUICalendarWidgetView()) + ->addClass('calendar-day-view-sidebar'); $list = id(new PHUICalendarListView()) ->setUser($this->user); @@ -276,7 +277,8 @@ final class PHUICalendarDayView extends AphrontView { if (count($events) == 0) { $list->showBlankState(true); } else { - foreach ($events as $event) { + $sorted_events = msort($events, 'getEpochStart'); + foreach ($sorted_events as $event) { $list->addEvent($event); } } @@ -388,7 +390,7 @@ final class PHUICalendarDayView extends AphrontView { $name = phutil_tag( 'a', array( - 'class' => 'all-day', + 'class' => 'day-view-all-day', 'href' => $event->getURI(), ), $event->getName()); diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php index 7e8aa956e0..fc40d87745 100644 --- a/src/view/phui/calendar/PHUICalendarListView.php +++ b/src/view/phui/calendar/PHUICalendarListView.php @@ -4,18 +4,12 @@ final class PHUICalendarListView extends AphrontTagView { private $events = array(); private $blankState; - private $isDayView = false; public function addEvent(AphrontCalendarEventView $event) { $this->events[] = $event; return $this; } - public function setIsDayView($is_day_view) { - $this->isDayView = $is_day_view; - return $this; - } - public function showBlankState($state) { $this->blankState = $state; return $this; diff --git a/webroot/rsrc/css/phui/calendar/phui-calendar-day.css b/webroot/rsrc/css/phui/calendar/phui-calendar-day.css index 1b8b887199..11f4045fe1 100644 --- a/webroot/rsrc/css/phui/calendar/phui-calendar-day.css +++ b/webroot/rsrc/css/phui/calendar/phui-calendar-day.css @@ -49,7 +49,7 @@ color: {$greytext}; } -.all-day { +.day-view-all-day { border: 1px solid {$blueborder}; height: 12px; margin: 0; @@ -60,7 +60,7 @@ color: {$greytext}; } -.phui-calendar-day-event + .phui-calendar-day-event .all-day { +.phui-calendar-day-event + .phui-calendar-day-event .day-view-all-day { border-top-style: none; border-top-width: 0; }