Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17773701
D12969.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12969.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
@@ -123,7 +123,7 @@
'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894',
'rsrc/css/phui/calendar/phui-calendar-day.css' => 'c0cf782a',
'rsrc/css/phui/calendar/phui-calendar-list.css' => 'c1c7f338',
- 'rsrc/css/phui/calendar/phui-calendar-month.css' => '94b1750a',
+ 'rsrc/css/phui/calendar/phui-calendar-month.css' => '476be7e0',
'rsrc/css/phui/calendar/phui-calendar.css' => 'ccabe893',
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
'rsrc/css/phui/phui-action-list.css' => '4f4d09f2',
@@ -767,7 +767,7 @@
'phui-calendar-css' => 'ccabe893',
'phui-calendar-day-css' => 'c0cf782a',
'phui-calendar-list-css' => 'c1c7f338',
- 'phui-calendar-month-css' => '94b1750a',
+ 'phui-calendar-month-css' => '476be7e0',
'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
@@ -117,8 +117,10 @@
foreach ($cell_lists_by_week as $week_of_cell_lists) {
$cells = array();
+ $max_count = $this->getMaxDailyEventsForWeek($week_of_cell_lists);
+
foreach ($week_of_cell_lists as $cell_list) {
- $cells[] = $this->getEventListCell($cell_list);
+ $cells[] = $this->getEventListCell($cell_list, $max_count);
}
$rows[] = phutil_tag('tr', array(), $cells);
@@ -153,7 +155,19 @@
return $box;
}
- private function getEventListCell($event_list) {
+ private function getMaxDailyEventsForWeek($week_of_cell_lists) {
+ $max_count = 0;
+
+ foreach ($week_of_cell_lists as $cell_list) {
+ if ($cell_list['count'] > $max_count) {
+ $max_count = $cell_list['count'];
+ }
+ }
+
+ return $max_count;
+ }
+
+ private function getEventListCell($event_list, $max_count = 0) {
$list = $event_list['list'];
$class = $event_list['class'];
$uri = $event_list['uri'];
@@ -162,7 +176,7 @@
$viewer_is_invited = $list->getIsViewerInvitedOnList();
$event_count_badge = $this->getEventCountBadge($count, $viewer_is_invited);
- $cell_day_secret_link = $this->getHiddenDayLink($uri);
+ $cell_day_secret_link = $this->getHiddenDayLink($uri, $max_count, 125);
$cell_data_div = phutil_tag(
'div',
@@ -191,7 +205,7 @@
if ($date) {
$uri = $event_list['uri'];
- $cell_day_secret_link = $this->getHiddenDayLink($uri);
+ $cell_day_secret_link = $this->getHiddenDayLink($uri, 0, 25);
$cell_day = phutil_tag(
'a',
@@ -291,11 +305,16 @@
$event_count);
}
- private function getHiddenDayLink($uri) {
+ private function getHiddenDayLink($uri, $count, $max_height) {
+ // approximately the height of the tallest cell
+ $height = 18 * $count + 5;
+ $height = ($height > $max_height) ? $height : $max_height;
+ $height_style = 'height: '.$height.'px';
return phutil_tag(
'a',
array(
'class' => 'phui-calendar-month-secret-link',
+ 'style' => $height_style,
'href' => $uri,
),
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
@@ -54,9 +54,6 @@
position: absolute;
left: 0;
right: 0;
- top: 0;
- bottom: 0;
- outline: 0;
}
table.phui-calendar-view tr td:first-child {
@@ -149,7 +146,8 @@
background: transparent;
}
-.phui-calendar-view .phui-calendar-list {
+.phui-calendar-view .phui-calendar-list,
+.phui-calendar-view .phui-calendar-month-list {
padding: 1px;
width: auto;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 24, 5:58 PM (6 h, 44 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8596882
Default Alt Text
D12969.diff (3 KB)
Attached To
Mode
D12969: Possible fix for month view day deadzone
Attached
Detach File
Event Timeline
Log In to Comment