Subject: | suggestions for displaying calendar |
hi,
Here are some ideas about calendar display.
I've tried to write code to show what I want, and I'm
glad if you consider to implement some of them in sophisticated
way :)
1. Make tickets distinguishable when multiple tickets are
displayed on the same day.
--- calendar.css.orig 2012-02-13 19:02:20.000000000 +0900
+++ calendar.css 2012-02-13 17:36:36.000000000 +0900
@@ -1,4 +1,4 @@
-.tooltip{position:relative;z-index:1;padding:6px;
margin-bottom:6px;border: 1px solid #d7d7d7;}
+.tooltip{position:relative;z-index:1; background:#ffffdd; padding:6px;
margin-bottom:6px;border: 1px solid #d7d7d7;}
.tooltip:hover{z-index:5;color:#000;}
.tooltip span.tip{display: none; text-align:left;}
2. Give a display class to td cell of days ...
--- Calendar.pm.orig 2012-02-13 19:03:06.000000000 +0900
+++ Calendar.pm 2012-02-13 18:18:23.000000000 +0900
@@ -6,6 +6,17 @@
our $VERSION = "0.10";
+sub DateClass {
+ my $date = shift;
+ #@holidays = (qw( 2012-01-01 2012-01-02 ... )); # in siteconfig
+ #return ' holiday' if $date in @holidays ....
+
+ return ' holiday' if $date->day_of_week() == 7;
+ return ' saturday' if $date->day_of_week() == 6;
+
+ return '';
+}
+
sub FirstMonday {
my ($year, $month) = (shift, shift);
my $set = DateTime::Set->from_recurrence(
--- Calendar.html.orig 2012-02-13 15:12:27.000000000 +0900
+++ Calendar.html 2012-02-13 17:33:04.000000000 +0900
@@ -63,7 +63,7 @@
% if ( $date->day_of_week == 1) {
<th><% $date->week_number %></th>
% }
-<td class="<% $date->month != ($Month + 1) ? 'oddline' : '' %>"
+<td class="<% $date->month != ($Month + 1) ? 'oddline' : '' %><%
RTx::Calendar::DateClass($date) %>"
style="width:14%;<% DateTime->compare($today, $date) == 0 ?
'background:#f6f7f8;' : '' %>"
Show quoted text
>
<p class="date"><%$date->day%></p>
... and, users can customize their calendar simply
with css.
--- calendar.css.orig 2012-02-13 19:02:20.000000000 +0900
+++ calendar.css 2012-02-13 17:36:36.000000000 +0900
@@ -27,6 +27,19 @@
table.rtxcalendar td {
border: 1px solid #d7d7d7;
vertical-align: top;
+ background:#ffffff;
+}
+
+table.rtxcalendar td.holiday {
+ background:#ffe4e1;
+}
+
+table.rtxcalendar td.saturday {
+ background:#ccffff;
+}
+
+table.rtxcalendar td.oddline {
+ background: #d7d7d7
}
table.rtxcalendar th {
regards,
--
KURASHIKI Satoru