display webcit calendar day view with dayend parameter
authorThierry Pasqualier <thierry@uncensored.citadel.org>
Sun, 7 Oct 2007 07:36:26 +0000 (07:36 +0000)
committerThierry Pasqualier <thierry@uncensored.citadel.org>
Sun, 7 Oct 2007 07:36:26 +0000 (07:36 +0000)
webcit/calendar_view.c
webcit/static/webcit.css

index 86acbb41684c8c41b55ed32d08fca134c136f827..c02e0d2d05a635ae76df26b625666fd1b4f4815f 100644 (file)
@@ -787,8 +787,20 @@ void calendar_day_view(int year, int month, int day) {
        wprintf("<table class=\"calendar\"><tr> \n");
 
        /** Innermost cell (contains hours etc.) */
-       wprintf("<td width=60%%>");
-               wprintf("<dl class=\"middle_of_the_day\">");
+       wprintf("<td class=\"middle_of_the_day\">");
+               wprintf("<dl style=\" "
+               "       padding:0 ;"
+               "       margin: 0;"
+               "       position: absolute ;"
+               "       top: 0;"
+               "        left: 0;"
+               "        width: 500px;"
+               "        clip: rect(0px 500px %dpx 0px);"
+               "        clip: rect(0px, 500px, %dpx, 0px);"
+               "\">",
+       (dayend - daystart) * 30,
+       (dayend - daystart) * 30
+       ); 
        /** Now the middle of the day... */     
        for (hour = 0; hour <= dayend; ++hour) {        /* could do HEIGHT=xx */
                if (hour >= daystart) {
@@ -819,7 +831,7 @@ void calendar_day_view(int year, int month, int day) {
        wprintf("</td>");                       /* end of innermost table */
 
        /** Extra events on the middle */
-        wprintf("<td width=20%% class=\"extra_events\">");
+        wprintf("<td class=\"extra_events\">");
 
         wprintf("<dl>");
 
index abc68d6baed9b560870ac4f80f95fff7edf9d5fd..1caa35bd710c6a93548d99c07cf4a322bbaa0f05 100644 (file)
@@ -1117,18 +1117,14 @@ ul.tabbed_dialog li {
        height: 302px;
 }
 
-dl.middle_of_the_day {
-       padding:0 ;
-       margin: 0;
-        position: absolute ;
-        top: 0;
-        left: 0;
+td.middle_of_the_day {
         width: 500px;
-        clip: rect(0px 500px 300px 0px); 
-        clip: rect(0px, 500px, 300px, 0px); 
 }
 
-.middle_of_the_day dt {
+.middle_of_the_day dl {
+}
+
+.middle_of_the_day dl dt {
        background-color: #FFFFFF;
        padding:0 ;
         width: 100%;