From c296efdbc83186f6e5bdcdd3a09b862f819dfb6d Mon Sep 17 00:00:00 2001 From: the_mgt Date: Wed, 18 May 2011 18:23:40 +0200 Subject: [PATCH] Removed "style" from extra_hour and hour in view_calendar.c in order to let the css kick in for events_of_the_day. Modified according css so that it looks as it as intended. The hardcoded style overwrote the stuff in css (we have a few of these cases in calendar) and made the view stick to top:0 and left:0, which looked wrong. Also made the td.events_of_the_day 50% width, works better for small and large viewports. Additionally, made a:visited in .calendar look like unvisited links, since i think there is no real use for the difference. --- webcit/calendar_view.c | 24 +++--------------------- webcit/static/styles/webcit.css | 15 +++++++++------ 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 7e5a869fd..c7af4b607 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -1183,13 +1183,7 @@ void calendar_day_view(int year, int month, int day) { if (hourlabel > (timeline - 2)) hourlabel = timeline - 2; for (hour = 0; hour < daystart; ++hour) { /* could do HEIGHT=xx */ - wc_printf("
" + wc_printf("
" "", (hour * extratimeline ), @@ -1214,13 +1208,7 @@ void calendar_day_view(int year, int month, int day) { gap = daystart * extratimeline; for (hour = daystart; hour <= dayend; ++hour) { /* could do HEIGHT=xx */ - wc_printf("
" + wc_printf("
" "", gap + ((hour - daystart) * timeline ), @@ -1245,13 +1233,7 @@ void calendar_day_view(int year, int month, int day) { gap = gap + ((dayend - daystart + 1) * timeline); for (hour = (dayend + 1); hour < 24; ++hour) { /* could do HEIGHT=xx */ - wc_printf("
" + wc_printf("
" "", gap + ((hour - dayend - 1) * extratimeline ), diff --git a/webcit/static/styles/webcit.css b/webcit/static/styles/webcit.css index 16bbd5ed3..0c767d73d 100644 --- a/webcit/static/styles/webcit.css +++ b/webcit/static/styles/webcit.css @@ -348,7 +348,7 @@ var sub { font-style: normal } a { text-decoration: none } -a:link { color: #0e73e3 } /*color: #2F65DD;*/ +a:link, .calendar a:visited { color: #0e73e3 } /*color: #2F65DD;*/ a:active { color: #3E65AF } @@ -859,15 +859,17 @@ ul.tabbed_dialog li { background-color: #424b52; border-color: #424b52; } -td.events_of_the_day { width: 500px } +#inner_day { padding: 0.2em; } + +td.events_of_the_day { width: 50% } .events_of_the_day dl { margin: 0; - padding: 0; +/* padding: 0; position: absolute; top: 0; - left:0; - width: 500px; + left:0; */ + width: 100%; } .events_of_the_day dl dt { @@ -897,11 +899,12 @@ td.events_of_the_day { width: 500px } text-align: left; } +.extra_events { border: 1px solid #ccc } .extra_events ul { list-style: none; - margin: 0; padding: 0; + margin: 0; } .extra_events ul li { margin: 4px } -- 2.39.2