1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-18 02:31:10 +01:00

Cleaning up day view sidebar css

Summary: Cleaning up day view sidebar css

Test Plan: All day events in day view sidebar should look like links, not boxes

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12801
This commit is contained in:
lkassianik 2015-05-11 18:35:41 -07:00
parent c4dfc097c8
commit 8465ef779e
4 changed files with 9 additions and 13 deletions

View file

@ -120,7 +120,7 @@ return array(
'rsrc/css/layout/phabricator-hovercard-view.css' => '44394670', 'rsrc/css/layout/phabricator-hovercard-view.css' => '44394670',
'rsrc/css/layout/phabricator-side-menu-view.css' => 'c1db9e9c', 'rsrc/css/layout/phabricator-side-menu-view.css' => 'c1db9e9c',
'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894', '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-list.css' => 'c1d0ca59',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '873e00da', 'rsrc/css/phui/calendar/phui-calendar-month.css' => '873e00da',
'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e', 'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e',
@ -777,7 +777,7 @@ return array(
'phui-box-css' => '7b3a2eed', 'phui-box-css' => '7b3a2eed',
'phui-button-css' => 'de610129', 'phui-button-css' => 'de610129',
'phui-calendar-css' => '8675968e', 'phui-calendar-css' => '8675968e',
'phui-calendar-day-css' => '49037167', 'phui-calendar-day-css' => '38891735',
'phui-calendar-list-css' => 'c1d0ca59', 'phui-calendar-list-css' => 'c1d0ca59',
'phui-calendar-month-css' => '873e00da', 'phui-calendar-month-css' => '873e00da',
'phui-crumbs-view-css' => '594d719e', 'phui-crumbs-view-css' => '594d719e',

View file

@ -268,7 +268,8 @@ final class PHUICalendarDayView extends AphrontView {
} }
private function renderSidebarBox($events, $title) { private function renderSidebarBox($events, $title) {
$widget = new PHUICalendarWidgetView(); $widget = id(new PHUICalendarWidgetView())
->addClass('calendar-day-view-sidebar');
$list = id(new PHUICalendarListView()) $list = id(new PHUICalendarListView())
->setUser($this->user); ->setUser($this->user);
@ -276,7 +277,8 @@ final class PHUICalendarDayView extends AphrontView {
if (count($events) == 0) { if (count($events) == 0) {
$list->showBlankState(true); $list->showBlankState(true);
} else { } else {
foreach ($events as $event) { $sorted_events = msort($events, 'getEpochStart');
foreach ($sorted_events as $event) {
$list->addEvent($event); $list->addEvent($event);
} }
} }
@ -388,7 +390,7 @@ final class PHUICalendarDayView extends AphrontView {
$name = phutil_tag( $name = phutil_tag(
'a', 'a',
array( array(
'class' => 'all-day', 'class' => 'day-view-all-day',
'href' => $event->getURI(), 'href' => $event->getURI(),
), ),
$event->getName()); $event->getName());

View file

@ -4,18 +4,12 @@ final class PHUICalendarListView extends AphrontTagView {
private $events = array(); private $events = array();
private $blankState; private $blankState;
private $isDayView = false;
public function addEvent(AphrontCalendarEventView $event) { public function addEvent(AphrontCalendarEventView $event) {
$this->events[] = $event; $this->events[] = $event;
return $this; return $this;
} }
public function setIsDayView($is_day_view) {
$this->isDayView = $is_day_view;
return $this;
}
public function showBlankState($state) { public function showBlankState($state) {
$this->blankState = $state; $this->blankState = $state;
return $this; return $this;

View file

@ -49,7 +49,7 @@
color: {$greytext}; color: {$greytext};
} }
.all-day { .day-view-all-day {
border: 1px solid {$blueborder}; border: 1px solid {$blueborder};
height: 12px; height: 12px;
margin: 0; margin: 0;
@ -60,7 +60,7 @@
color: {$greytext}; 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-style: none;
border-top-width: 0; border-top-width: 0;
} }