Page MenuHomePhabricator

D12859.id30931.diff
No OneTemporary

D12859.id30931.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -122,7 +122,7 @@
'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894',
'rsrc/css/phui/calendar/phui-calendar-day.css' => '3b4a65d8',
'rsrc/css/phui/calendar/phui-calendar-list.css' => '840baa8d',
- 'rsrc/css/phui/calendar/phui-calendar-month.css' => '450c37ea',
+ 'rsrc/css/phui/calendar/phui-calendar-month.css' => 'b33a35d9',
'rsrc/css/phui/calendar/phui-calendar.css' => '8345be98',
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
'rsrc/css/phui/phui-action-list.css' => '4f4d09f2',
@@ -763,7 +763,7 @@
'phui-calendar-css' => '8345be98',
'phui-calendar-day-css' => '3b4a65d8',
'phui-calendar-list-css' => '840baa8d',
- 'phui-calendar-month-css' => '450c37ea',
+ 'phui-calendar-month-css' => 'b33a35d9',
'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
--- a/src/view/phui/calendar/PHUICalendarMonthView.php
+++ b/src/view/phui/calendar/PHUICalendarMonthView.php
@@ -294,16 +294,36 @@
'tr',
array('class' => 'phui-calendar-day-of-week-header'),
array(
- phutil_tag('th', array(), pht('Sun')),
- phutil_tag('th', array(), pht('Mon')),
- phutil_tag('th', array(), pht('Tue')),
- phutil_tag('th', array(), pht('Wed')),
- phutil_tag('th', array(), pht('Thu')),
- phutil_tag('th', array(), pht('Fri')),
- phutil_tag('th', array(), pht('Sat')),
+ $this->getDayHeader(pht('Sun'), pht('Sunday')),
+ $this->getDayHeader(pht('Mon'), pht('Monday')),
+ $this->getDayHeader(pht('Tue'), pht('Tuesday')),
+ $this->getDayHeader(pht('Wed'), pht('Wednesday')),
+ $this->getDayHeader(pht('Thu'), pht('Thursday')),
+ $this->getDayHeader(pht('Fri'), pht('Friday')),
+ $this->getDayHeader(pht('Sat'), pht('Saturday')),
));
}
+ private function getDayHeader($short, $long) {
+ $day = array();
+ $day[] = phutil_tag(
+ 'span',
+ array(
+ 'class' => 'long-weekday-name',
+ ),
+ $long);
+ $day[] = phutil_tag(
+ 'span',
+ array(
+ 'class' => 'short-weekday-name',
+ ),
+ $short);
+ return phutil_tag(
+ 'th',
+ array(),
+ $day);
+ }
+
private function renderCalendarHeader(DateTime $date) {
$button_bar = null;
diff --git a/webroot/rsrc/css/phui/calendar/phui-calendar-month.css b/webroot/rsrc/css/phui/calendar/phui-calendar-month.css
--- a/webroot/rsrc/css/phui/calendar/phui-calendar-month.css
+++ b/webroot/rsrc/css/phui/calendar/phui-calendar-month.css
@@ -10,12 +10,28 @@
tr.phui-calendar-day-of-week-header th {
text-align: center;
- font-size: 11px;
+ font-size: 13px;
padding: 3px;
color: {$lightbluetext};
background: {$lightgreybackground};
}
+tr.phui-calendar-day-of-week-header th .long-weekday-name {
+ display: block;
+}
+
+.device tr.phui-calendar-day-of-week-header th .long-weekday-name {
+ display: none;
+}
+
+tr.phui-calendar-day-of-week-header th .short-weekday-name {
+ display: none;
+}
+
+.device tr.phui-calendar-day-of-week-header th .short-weekday-name {
+ display: block;
+}
+
table.phui-calendar-view td {
border: solid #dfdfdf;
border-width: 1px 1px 0 1px;

File Metadata

Mime Type
text/plain
Expires
Fri, May 17, 4:41 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6298270
Default Alt Text
D12859.id30931.diff (3 KB)

Event Timeline