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:
parent
7ef8da8259
commit
8e9ee86357
3 changed files with 30 additions and 17 deletions
|
@ -122,7 +122,7 @@ return array(
|
||||||
'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' => '38891735',
|
'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' => '4c39f6d9',
|
||||||
'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e',
|
'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e',
|
||||||
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
|
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
|
||||||
'rsrc/css/phui/phui-action-list.css' => '4f4d09f2',
|
'rsrc/css/phui/phui-action-list.css' => '4f4d09f2',
|
||||||
|
@ -779,7 +779,7 @@ return array(
|
||||||
'phui-calendar-css' => '8675968e',
|
'phui-calendar-css' => '8675968e',
|
||||||
'phui-calendar-day-css' => '38891735',
|
'phui-calendar-day-css' => '38891735',
|
||||||
'phui-calendar-list-css' => 'c1d0ca59',
|
'phui-calendar-list-css' => 'c1d0ca59',
|
||||||
'phui-calendar-month-css' => '873e00da',
|
'phui-calendar-month-css' => '4c39f6d9',
|
||||||
'phui-crumbs-view-css' => '594d719e',
|
'phui-crumbs-view-css' => '594d719e',
|
||||||
'phui-document-view-css' => '94d5dcd8',
|
'phui-document-view-css' => '94d5dcd8',
|
||||||
'phui-feed-story-css' => 'c9f3a0b5',
|
'phui-feed-story-css' => 'c9f3a0b5',
|
||||||
|
|
|
@ -75,7 +75,7 @@ final class PHUICalendarMonthView extends AphrontView {
|
||||||
$empty_cell = array(
|
$empty_cell = array(
|
||||||
'list' => null,
|
'list' => null,
|
||||||
'date' => null,
|
'date' => null,
|
||||||
'class' => 'phui-calendar-empty',
|
'class' => null,
|
||||||
);
|
);
|
||||||
|
|
||||||
for ($ii = 0; $ii < $empty; $ii++) {
|
for ($ii = 0; $ii < $empty; $ii++) {
|
||||||
|
@ -91,10 +91,6 @@ final class PHUICalendarMonthView extends AphrontView {
|
||||||
$class = 'phui-calendar-month-day';
|
$class = 'phui-calendar-month-day';
|
||||||
$weekday = $day->format('w');
|
$weekday = $day->format('w');
|
||||||
|
|
||||||
if ($day_number == $this->day) {
|
|
||||||
$class .= ' phui-calendar-today';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($holiday || $weekday == 0 || $weekday == 6) {
|
if ($holiday || $weekday == 0 || $weekday == 6) {
|
||||||
$class .= ' phui-calendar-not-work-day';
|
$class .= ' phui-calendar-not-work-day';
|
||||||
}
|
}
|
||||||
|
@ -188,16 +184,33 @@ final class PHUICalendarMonthView extends AphrontView {
|
||||||
'href' => $uri,
|
'href' => $uri,
|
||||||
),
|
),
|
||||||
$cell_day->format('j'));
|
$cell_day->format('j'));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$cell_day = null;
|
$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(
|
$cells[] = phutil_tag(
|
||||||
'td',
|
'td',
|
||||||
array(
|
array(
|
||||||
'class' => 'phui-calendar-date-number-container '.$class,
|
'class' => 'phui-calendar-date-number-container '.$class,
|
||||||
),
|
),
|
||||||
$cell_day);
|
array(
|
||||||
|
$cell_day,
|
||||||
|
$today_slot,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
$table[] = phutil_tag('tr', array(), $cells);
|
$table[] = phutil_tag('tr', array(), $cells);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,14 +32,10 @@ table.phui-calendar-view .phui-calendar-event-list {
|
||||||
|
|
||||||
table.phui-calendar-view a.phui-calendar-date-number {
|
table.phui-calendar-view a.phui-calendar-date-number {
|
||||||
color: {$lightgreytext};
|
color: {$lightgreytext};
|
||||||
border-color: {$thinblueborder};
|
padding: 0 4px;
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px 0 0 1px;
|
|
||||||
padding: 4px;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 16px;
|
min-width: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table.phui-calendar-view td.phui-calendar-date-number-container {
|
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};
|
background-color: {$lightgreybackground};
|
||||||
}
|
}
|
||||||
|
|
||||||
.phui-calendar-today {
|
.phui-calendar-today-slot {
|
||||||
background-color: {$lightgreen};
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 4px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phui-calendar-empty {
|
.phui-calendar-today-slot.phui-calendar-today {
|
||||||
background-color: {$greybackground};
|
background-color: {$lightblueborder};
|
||||||
}
|
}
|
||||||
|
|
||||||
.phui-calendar-event-empty {
|
.phui-calendar-event-empty {
|
||||||
|
|
Loading…
Reference in a new issue