From aec0e2f8f98fc7399c53c5f5940e89f515c4f13f Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 28 May 2013 16:52:53 -0700 Subject: [PATCH] Highlight today on Calendar/Conpherence Summary: Highlights which day is today on the calendar list in conpherence. Fixes T3254 Test Plan: Made sure today was Tuesday. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T3254 Differential Revision: https://secure.phabricator.com/D6065 --- src/__celerity_resource_map__.php | 2 +- .../ConpherenceWidgetController.php | 8 ++++- .../application/conpherence/widget-pane.css | 31 +++++++++++++------ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index f20f491c2a..d2f4de11ca 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -945,7 +945,7 @@ celerity_register_resource_map(array( ), 'conpherence-widget-pane-css' => array( - 'uri' => '/res/d3829b07/rsrc/css/application/conpherence/widget-pane.css', + 'uri' => '/res/6f836b19/rsrc/css/application/conpherence/widget-pane.css', 'type' => 'css', 'requires' => array( diff --git a/src/applications/conpherence/controller/ConpherenceWidgetController.php b/src/applications/conpherence/controller/ConpherenceWidgetController.php index bd5d94cd27..7415cb8407 100644 --- a/src/applications/conpherence/controller/ConpherenceWidgetController.php +++ b/src/applications/conpherence/controller/ConpherenceWidgetController.php @@ -200,10 +200,16 @@ final class ConpherenceWidgetController extends $one_day = 24 * 60 * 60; foreach ($weekstamps as $time => $day) { // build a header for the new day + if ($day->format('w') == $today->format('w')) { + $active_class = 'today'; + } else { + $active_class = ''; + } + $content[] = phutil_tag( 'div', array( - 'class' => 'day-header' + 'class' => 'day-header '.$active_class ), array( phutil_tag( diff --git a/webroot/rsrc/css/application/conpherence/widget-pane.css b/webroot/rsrc/css/application/conpherence/widget-pane.css index 8b5fd6acb7..2862828a3b 100644 --- a/webroot/rsrc/css/application/conpherence/widget-pane.css +++ b/webroot/rsrc/css/application/conpherence/widget-pane.css @@ -186,27 +186,37 @@ background-color: rgb(102, 204, 255); } .conpherence-widget-pane #widgets-calendar .aphront-multi-column-view -.aphront-multi-column-column .day-name { + .day-name { padding: 5px 0px 0px 0px; font-size: 12px; } .conpherence-widget-pane #widgets-calendar .aphront-multi-column-view -.aphront-multi-column-column .day-number { + .day-number { font-size: 16px; - padding: 5px 0px 5px 0px; + padding: 0 0 5px 0; } + .conpherence-widget-pane #widgets-calendar .day-header { overflow: hidden; - background-color: #d8dce2; - border-top: 1px solid #bfbfbf; - border-bottom: 1px solid #bfbfbf; + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + border-top: 1px solid #e7e7e7; + border-bottom: 1px solid #d7d7d7; padding: 5px 10px 5px 10px; - width: 220px; } -.device .conpherence-widget-pane #widgets-calendar .day-header { - width: 98%; - padding: 5px 1% 5px 1%; + +.conpherence-widget-pane #widgets-calendar .day-header.today { + background-image: linear-gradient(to bottom, #3b86c4, #2b628f); + background-image: -webkit-linear-gradient(top, #3b86c4, #2b628f); + border-top: none; + border-bottom: none; } + +.conpherence-widget-pane #widgets-calendar .day-header.today .day-name, +.conpherence-widget-pane #widgets-calendar .day-header.today .day-date { + color: #fff; +} + .conpherence-widget-pane #widgets-calendar .day-header .day-name { float: left; color: #555759; @@ -214,6 +224,7 @@ text-transform: uppercase; font-size: 11px; } + .conpherence-widget-pane #widgets-calendar .day-header .day-date { float: right; color: #555759;