[Bps-public-commit] rtx-calendar branch allow-custom-field-based-events updated. 1.05-26-gde4b3af

BPS Git Server git at git.bestpractical.com
Mon Aug 28 20:03:12 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, allow-custom-field-based-events has been updated
       via  de4b3af487295bcab4cdcf804495f0db9be19620 (commit)
       via  0d8087cdc0347e300f994f00757fc9976cfa69a1 (commit)
      from  3e1525d20291db2752441e694ffd9297b0f814af (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 de4b3af487295bcab4cdcf804495f0db9be19620
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Mon Aug 28 17:01:26 2023 -0300

    Move Filter on Status to the Sidebar
    
    Since some days might have lots of events, the Filter that was on the
    bottom could be hard to find.  Move it to the sidebar where it is
    easier to find.

diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index 971e5b2..0629a06 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -25,6 +25,31 @@ $FilterOnStatusClear => undef
 <div class="calendar-sidebar-toggle-content">
 <a title="Toggle Filter" href="javascript:;" class="calendar-toggle-sidebar"></a>
 <div class="calendar-sidebar">
+  <&| /Widgets/TitleBox,
+    title => loc('Filter on Status'),
+    &>
+
+  <form id="FilterOnStatusForm"
+  action="<%$RT::WebPath%>/Search/Calendar.html?<%$QueryString%>" method="post">
+  <input type="hidden" name="BaseQuery" value="<%$BaseQuery%>" />
+  <select name="FilterOnStatus" id="FilterOnStatus"
+    class="selectpicker 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]) {
+      <% (grep { $Status eq $_ } @FilterOnStatus) ? 'selected="selected"':''%>
+% }
+      ><% loc($Status) %></option>
+% }
+  </select>
+  <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>
+  </div>
+</form>
+</&>
+
   <&| /Widgets/TitleBox,
      title => loc('Event Types'),
      &>
@@ -173,31 +198,6 @@ foreach my $TranslatedLegend (sort keys %CalendarIconsTranslated) {
 </tr>
 </table>
 
-<table width="100%">
-<tr>
-<td valign="top" align="center">
-  <form id="FilterOnStatusForm"
-  action="<%$RT::WebPath%>/Search/Calendar.html?<%$QueryString%>" method="post">
-  <input type="hidden" name="BaseQuery" value="<%$BaseQuery%>" />
-  <% loc( 'Filter on [_1]', loc('Status') ) %>:
-  <select name="FilterOnStatus" id="FilterOnStatus"
-    class="selectpicker" multiple="multiple" size="6">
-% for my $Status (sort {loc($a) cmp loc($b)} @{RT->Config->Get('CalendarFilterStatuses')}) {
-    <option value="<% $Status %>"
-% if (@FilterOnStatus && $FilterOnStatus[0]) {
-      <% (grep { $Status eq $_ } @FilterOnStatus) ? 'selected="selected"':''%>
-% }
-      ><% loc($Status) %></option>
-% }
-  </select>
-  <input type="submit" value="<% loc('Filter') %>" class="button btn btn-primary" />
-  <button type="submit" id="FilterOnStatusClear" name="FilterOnStatusClear"
-    value="1" class="button btn btn-primary"><% loc('Clear Filter') %></button>
-</form>
-</td>
-</tr>
-</table>
-
 </&>
 
 <&| /Widgets/TitleBox, title => loc('Help') &>

commit 0d8087cdc0347e300f994f00757fc9976cfa69a1
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Mon Aug 28 16:47:07 2023 -0300

    Add toggle to show/hide calendar sidebar

diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index e1fa580..971e5b2 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -22,6 +22,8 @@ $FilterOnStatusClear => undef
     <& /Elements/Tabs &>
 % }
 
+<div class="calendar-sidebar-toggle-content">
+<a title="Toggle Filter" href="javascript:;" class="calendar-toggle-sidebar"></a>
 <div class="calendar-sidebar">
   <&| /Widgets/TitleBox,
      title => loc('Event Types'),
@@ -67,6 +69,7 @@ foreach my $TranslatedLegend (sort keys %CalendarIconsTranslated) {
 % }
 </&>
 
+</div>
 </div>
 
 <div class="calendar-content">
@@ -237,6 +240,16 @@ portlet by saving a query with the name <code>calendar</code> in the [_1].
 </&>
 </div>
 
+<script type="text/javascript">
+  jQuery(document).ready(function() {
+    jQuery('.calendar-toggle-sidebar').click(function() {
+      jQuery('.calendar-sidebar').toggle();
+      jQuery('.calendar-sidebar-toggle-content,.calendar-toggle-sidebar').toggleClass('sidebar-off');
+      jQuery('.calendar-content').toggleClass('sidebar-off');
+    });
+  });
+</script>
+
 <%INIT>
 if ($FilterOnStatusClear) {
   $Query = $BaseQuery if $BaseQuery;
diff --git a/static/css/calendar.css b/static/css/calendar.css
index e59427d..9e859c6 100644
--- a/static/css/calendar.css
+++ b/static/css/calendar.css
@@ -74,9 +74,7 @@ table.rtxcalendar td.aweekago {
 }
 
 .calendar-sidebar {
-    float: left;
-    width: 15%;
-    padding-right: 1.5rem;
+    padding-right: 0.5rem;
 }
 
 .calendar-content {
@@ -95,4 +93,40 @@ table.rtxcalendar td.aweekago {
     display: table-row;
 }
 
-
+a.calendar-toggle-sidebar,
+a.calendar-toggle-sidebar.off {
+    background: none !important;
+    width: 0px !important;
+    position: relative;
+    float: right;
+    top: 300px;
+}
+a.calendar-toggle-sidebar::before {
+    content: '';
+    display: block;
+    width: 8px;
+    height: 8px;
+    border: solid #B0B3BC;
+    border-width: 0 2px 2px 0;
+    -webkit-transform: rotate(135deg);
+    -ms-transform: rotate(135deg);
+    transform: rotate(135deg);
+    transition: transform .25s;
+    position: absolute;
+    top: 1.2em;
+}
+a.calendar-toggle-sidebar.sidebar-off::before {
+    transform: rotate(315deg);
+}
+.calendar-sidebar-toggle-content {
+    float: left;
+    width: 14%;
+}
+.calendar-sidebar-toggle-content.sidebar-off {
+    width:unset;
+}
+.calendar-content.sidebar-off {
+    width: 100%;
+    float: left;
+    margin-left: 20px;
+}

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

Summary of changes:
 html/Search/Calendar.html | 63 ++++++++++++++++++++++++++++-------------------
 static/css/calendar.css   | 42 ++++++++++++++++++++++++++++---
 2 files changed, 76 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
rtx-calendar


More information about the Bps-public-commit mailing list