Removed "style" from extra_hour and hour in view_calendar.c in order to let the css...
authorthe_mgt <themgt@uncensored.citadel.org>
Wed, 18 May 2011 16:23:40 +0000 (18:23 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 20:45:58 +0000 (20:45 +0000)
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
webcit/static/styles/webcit.css

index 7e5a869fd92a4762fcc51545512eedf08deaa3eb..c7af4b607304d5f1678d861ecfa8341acc0eb6bd 100644 (file)
@@ -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("<dt class=\"extrahour\"      "
-                       "style=\"               "
-                       "position: absolute;    "
-                       "top: %dpx; left: 0px;  "
-                       "height: %dpx;          "
-                       "font-size: %dpx;       "
-                       "\" >                   "
+               wc_printf("<dt class=\"extrahour\">"
                        "<a href=\"display_edit_event?msgnum=0"
                        "?calview=day?year=%d?month=%d?day=%d?hour=%d?minute=0\">",
                        (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("<dt class=\"hour\"     "
-                        "style=\"               "
-                        "position: absolute;    "
-                        "top: %ldpx; left: 0px; "
-                        "height: %dpx;          "
-                       "font-size: %dpx;       "
-                        "\" >                   "
+                wc_printf("<dt class=\"hour\">"
                         "<a href=\"display_edit_event?msgnum=0?calview=day"
                         "?year=%d?month=%d?day=%d?hour=%d?minute=0\">",
                         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("<dt class=\"extrahour\"     "
-                        "style=\"               "
-                        "position: absolute;    "
-                        "top: %ldpx; left: 0px; "
-                        "height: %dpx;          "
-                       "font-size: %dpx;       "
-                        "\" >                   "
+                wc_printf("<dt class=\"extrahour\">"
                         "<a href=\"display_edit_event?msgnum=0?calview=day"
                         "?year=%d?month=%d?day=%d?hour=%d?minute=0\">",
                         gap + ((hour - dayend - 1) * extratimeline ),
index 16bbd5ed3bed00e80bda79b434c3a3c590d4b5ab..0c767d73d0b4893da747c3b32f7b9d9d8da1ef4a 100644 (file)
@@ -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 }