Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14027327
D12859.id30929.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D12859.id30929.diff
View Options
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
@@ -148,13 +148,15 @@
$rows[] = phutil_tag('tr', array(), $cells);
}
- $header = $this->getDayNamesHeader();
+ // $header_short = $this->getShortDayNamesHeader();
+ $header_long = $this->getLongDayNamesHeader();
$table = phutil_tag(
'table',
array('class' => 'phui-calendar-view'),
array(
- $header,
+ // $header_short,
+ $header_long,
$rows,
));
@@ -289,21 +291,41 @@
null);
}
- private function getDayNamesHeader() {
+ private function getLongDayNamesHeader() {
return phutil_tag(
'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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 6:34 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6725327
Default Alt Text
D12859.id30929.diff (4 KB)
Attached To
Mode
D12859: Week day names in Calendar month view should be full names on desktop and short names on device
Attached
Detach File
Event Timeline
Log In to Comment