In month view, sort events on a day by starttime so that an event that
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 10 Sep 2003 16:00:27 +0000 (16:00 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 10 Sep 2003 16:00:27 +0000 (16:00 +0000)
starts at 9 is not displayed below one that starts at 17. Include the
time in the tooltips. Remove some E_ALL notices. This whole calendarcode
needs some serious maintentance, but that's for later.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5673 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/calendar/calendar.php
plugins/calendar/calendar_data.php
plugins/calendar/event_edit.php

index 4d4d9ba2a031ef792ed8a911460c7931d7676175..881cd9d692437f053da250daea8f387be27dbf45 100644 (file)
@@ -116,7 +116,8 @@ function drawmonthview() {
                 $i=0;
                 while ($calfoo = each($calendardata[$cdate])) {
                     $calbar = $calendardata[$cdate][$calfoo['key']];
-                    echo ($calbar['priority']==1) ? "<a href=\"#\" style=\"text-decoration:none; color: $color[1]\" title=\"$calbar[message]\">$calbar[title]</a><br>\n" : "<a href=\"#\" style=\"text-decoration:none; color: $color[6]\" title=\"$calbar[message]\">$calbar[title]</a><br>\n";
+                    $title = '['. $calfoo['key']. '] ' .$calbar['message'];
+                    echo ($calbar['priority']==1) ? "<a href=\"#\" style=\"text-decoration:none; color: $color[1]\" title=\"$title\">$calbar[title]</a><br>\n" : "<a href=\"#\" style=\"text-decoration:none; color: $color[6]\" title=\"$title\">$calbar[title]</a><br>\n";
                     $i=$i+1;
                     if($i==2){
                         break;
index 82e16b860460787db81b19c572d193f15ddcac62..1f7025850a99776da52e267711a10b953d9b9b7d 100644 (file)
@@ -40,6 +40,11 @@ function readcalendardata() {
                                                             'reminder' => $fdata[6] );
             }
             fclose ($fp);
+            // this is to sort the events within a day on starttime
+            foreach($calendardata as $day => $data) {
+                ksort($data, SORT_NUMERIC);
+                $calendardata[$day] = $data;
+            }
         }
     }
 }
index e96abba913d872b9ebf4d445aac4f3762e2bacdb..533ce66337f47f628d8b771a6fd7be8eaeb14171 100644 (file)
@@ -186,15 +186,15 @@ function confirm_update() {
                 ) .
                 html_tag( 'tr',
                     html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" .
-                    html_tag( 'td', $tmparray[priority] , 'left', $color[4] ) ."\n"
+                    html_tag( 'td', $tmparray['priority'] , 'left', $color[4] ) ."\n"
                 ) .
                 html_tag( 'tr',
                     html_tag( 'td', _("Title:") , 'right', $color[4] ) ."\n" .
-                    html_tag( 'td', $tmparray[title] , 'left', $color[4] ) ."\n"
+                    html_tag( 'td', $tmparray['title'] , 'left', $color[4] ) ."\n"
                 ) .
                 html_tag( 'tr',
                     html_tag( 'td', _("Message:") , 'right', $color[4] ) ."\n" .
-                    html_tag( 'td', $tmparray[message] , 'left', $color[4] ) ."\n"
+                    html_tag( 'td', $tmparray['message'] , 'left', $color[4] ) ."\n"
                 ) .
                 html_tag( 'tr',
                     html_tag( 'th', _("to:") . "<br>\n", '', $color[4], 'colspan="2"' ) ."\n"