1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Calendar month view "today" indicator should be a blue bar across the bottom of the day cell

Summary: Ref T4392, Calendar month view "today" indicator should be a blue bar across the bottom of the day cell

Test Plan: Open month view of Calendar, today should have a blue bar across the bottom of the day cell

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4392

Differential Revision: https://secure.phabricator.com/D12815
This commit is contained in:
lkassianik 2015-05-12 13:21:57 -07:00
parent 7ef8da8259
commit 8e9ee86357
3 changed files with 30 additions and 17 deletions

View file

@ -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',

View file

@ -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);
}

View file

@ -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 {