[Bps-public-commit] rtx-calendar branch multiple-days-events updated. 1.05-37-gb5c9d29

BPS Git Server git at git.bestpractical.com
Fri Sep 29 15:14:31 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rtx-calendar".

The branch, multiple-days-events has been updated
       via  b5c9d29eef73606975dbcd732deedae75eacbe07 (commit)
      from  ebbe1024d1635e3c2b894ac36ae050c88b583bfb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b5c9d29eef73606975dbcd732deedae75eacbe07
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Fri Sep 29 12:14:00 2023 -0300

    Add Dark Mode to the Calendar

diff --git a/html/Elements/Calendar b/html/Elements/Calendar
index b87cd78..8de3932 100644
--- a/html/Elements/Calendar
+++ b/html/Elements/Calendar
@@ -165,13 +165,13 @@ while ($date <= $end) {
 <td valign="top" align="center">
 <form method="post" class="changeCalendarMonth" onsubmit="changeCalendarMonth()">
 
-<select name="Month" class="selectpicker">
+<select name="Month" class="selectpicker form-control col-3">
 % for (0..11) {
 <option value="<%$_%>" <% $_ == $Month ? 'selected' : ''%> ><%$rtdate->GetMonth($_)%></option>
 % }
 </select>
 % my $year = (localtime)[5] + 1900;
-<select name="Year" class="selectpicker">
+<select name="Year" class="selectpicker form-control col-3">
 % for ( ($year-5) .. ($year+5)) {
 <option value="<%$_%>" <% $_ == $Year ? 'selected' : ''%>><%$_%></option>
 % }
diff --git a/html/Elements/CalendarEvent b/html/Elements/CalendarEvent
index 5f018b3..df500b9 100644
--- a/html/Elements/CalendarEvent
+++ b/html/Elements/CalendarEvent
@@ -35,9 +35,12 @@ if ( ( !grep { $_ eq $TicketId } @$spanning_tickets_for_tomorrow ) ) {
 % if ( $first_day_of_the_event || $DayOfWeek eq 1 ) {
     first-day
 % }
+% my $status_class = 'event-status-'.$status;
+% $status_class =~ s/\s+/-/g;
+<% $status_class %>
 " style="
 % if ( $CalendarStatusColorMap{$status} ) {
-    background-color: <%$CalendarStatusColorMap{$status}%>;
+    background-color: <%$CalendarStatusColorMap{$status}%> !important;
 % }
 % # We need to decrease the z-index of the spanning days of an event
 % # so the event title (which is placed on the div of the first day of the
diff --git a/html/Elements/CalendarSidebar b/html/Elements/CalendarSidebar
index b1f96ce..db84e96 100644
--- a/html/Elements/CalendarSidebar
+++ b/html/Elements/CalendarSidebar
@@ -13,7 +13,7 @@
     <form id="FilterOnStatusForm"
      method="post">
       <select name="NewFilterOnStatus" id="NewFilterOnStatus"
-        class="selectpicker filteronstatus mt-3 mb-3" multiple="multiple" size="6">
+        class="selectpicker form-control filteronstatus mt-3 mb-3" multiple="multiple" size="6">
 % for my $Status (sort {loc($a) cmp loc($b)} @{RT->Config->Get('CalendarFilterStatuses')}) {
         <option value="<% $Status %>"
 % if (@FilterOnStatus && $FilterOnStatus[0]) {
@@ -25,7 +25,7 @@
       <div class="text-center">
         <input type="submit" value="<% loc('Filter') %>" class="mr-2 button btn btn-primary" />
         <button type="submit" id="FilterOnStatusClear" name="FilterOnStatusClear"
-          value="1" class="button btn btn-primary"><% loc('Clear Filter') %></button>
+          value="1" class="button btn btn-primary form-control"><% loc('Clear Filter') %></button>
       </div>
     </form>
     </&>
@@ -52,7 +52,7 @@
      &>
 % my %ColorStatusMap = RT->Config->Get('CalendarStatusColorMap');
 % foreach my $Status (sort { lc($a) cmp lc($b) } keys %ColorStatusMap) {
-    <span style="color: <% $ColorStatusMap{$Status} %>"><% $Status %><span><br />
+    <span style="color: <% $ColorStatusMap{$Status} %> !important;"><% $Status %></span><br />
 % }
 </&>
 
diff --git a/static/css/calendar.css b/static/css/calendar.css
index 915a0b0..83b740c 100644
--- a/static/css/calendar.css
+++ b/static/css/calendar.css
@@ -180,3 +180,17 @@ table.rtxcalendar .day.first-day.last-day {
 .calendar-container {
     display: flow-root;
 }
+
+.darkmode table.rtxcalendar * {
+    background: unset !important;
+}
+
+.darkmode table.rtxcalendar div.day div.event-info:hover span.tip{
+    border: 1px solid #555;
+    background-color: #2C3539 !important;
+    color: #fff !important;
+}
+
+.darkmode table.rtxcalendar div.day a {
+    color: #fff !important;
+}

-----------------------------------------------------------------------

Summary of changes:
 html/Elements/Calendar        |  4 ++--
 html/Elements/CalendarEvent   |  5 ++++-
 html/Elements/CalendarSidebar |  6 +++---
 static/css/calendar.css       | 14 ++++++++++++++
 4 files changed, 23 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
rtx-calendar


More information about the Bps-public-commit mailing list