* $Id$
*
* Handles the HTML display of calendar items.
+ *
+ * Copyright (c) 1996-2010 by the citadel.org team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "webcit.h"
);
}
+
wc_printf("<font size=\"-1\">"
"<a class=\"event%s\" href=\"display_edit_event?"
- "msgnum=%ld?calview=month?year=%d?month=%d?day=%d\""
- " btt_tooltext=\"",
+ "msgnum=%ld?calview=month?year=%d?month=%d?day=%d\">"
+ ,
(Cal->unread)?"_unread":"_read",
Cal->cal_msgnum,
year, month, day
- );
+ );
+
+ escputs((char *) icalproperty_get_comment(p));
+
+ wc_printf("<span class=\"tooltip\"><span class=\"btttop\"></span><span class=\"bttmiddle\">");
wc_printf("<i>%s: %s</i><br />", _("From"), Cal->from);
wc_printf("<i>%s</i> ", _("Summary:"));
wc_printf("<br />");
}
- wc_printf("\">");
- escputs((char *)
- icalproperty_get_comment(p));
+ wc_printf("</span><span class=\"bttbottom\"></span></span>");
wc_printf("</a></font><br />\n");
if (all_day_event) {
wc_printf("</table>" /* end of inner table */
"</td></tr></table>" /* end of outer table */
"</div>\n");
-
- /*
- * Initialize the bubble tooltips.
- *
- * Yes, this is as stupid as it looks. Instead of just making the call
- * to btt_enableTooltips() straight away, we have to create a timer event
- * and let it initialize as an event after 1 millisecond. This is to
- * work around a bug in Internet Explorer that causes it to crash if we
- * manipulate the innerHTML of various DOM nodes while the page is still
- * being rendered. See http://www.shaftek.org/blog/archives/000212.html
- * for more information.
- */
- StrBufAppendPrintf(WC->trailing_javascript,
- " setTimeout(\"btt_enableTooltips('inner_month')\", 1); \n"
- );
}
/*
wc_printf("<li class=\"event_framed%s\"> "
"<a href=\"display_edit_event?"
"msgnum=%ld?calview=day?year=%d?month=%d?day=%d\" "
- " class=\"event_title\" "
- " btt_tooltext=\"",
+ " class=\"event_title\">"
+ ,
(Cal->unread)?"_unread":"_read",
- Cal->cal_msgnum, year, month, day);
+ Cal->cal_msgnum, year, month, day
+ );
+ escputs((char *) icalproperty_get_comment(p));
+ wc_printf("<span class=\"tooltip\"><span class=\"btttop\"></span><span class=\"bttmiddle\">");
wc_printf("<i>%s</i><br />", _("All day event"));
wc_printf("<i>%s: %s</i><br />", _("From"), Cal->from);
wc_printf("<i>%s</i> ", _("Summary:"));
escputs((char *)icalproperty_get_comment(q));
wc_printf("<br />");
}
- wc_printf("\">");
- escputs((char *) icalproperty_get_comment(p));
+ wc_printf("</span><span class=\"bttbottom\"></span></span>");
wc_printf("</a> <span>(");
wc_printf(_("All day event"));
wc_printf(")</span></li>\n");
wc_printf("<li class=\"event_framed%s\"> "
"<a href=\"display_edit_event?"
"msgnum=%ld&calview=day?year=%d?month=%d?day=%d\" "
- " class=\"event_title\" "
- "btt_tooltext=\"",
+ " class=\"event_title\">"
+ ,
(Cal->unread)?"_unread":"_read",
- Cal->cal_msgnum, year, month, day);
+ Cal->cal_msgnum, year, month, day
+ );
+ escputs((char *) icalproperty_get_comment(p));
+ wc_printf("<span class=\"tooltip\"><span class=\"btttop\"></span><span class=\"bttmiddle\">");
wc_printf("<i>%s</i><br />", _("Ongoing event"));
wc_printf("<i>%s: %s</i><br />", _("From"), Cal->from);
wc_printf("<i>%s</i> ", _("Summary:"));
escputs((char *)icalproperty_get_comment(q));
wc_printf("<br />");
}
- wc_printf("\">");
- escputs((char *) icalproperty_get_comment(p));
+ wc_printf("</span><span class=\"bttbottom\"></span></span>");
wc_printf("</a> <span>(");
wc_printf(_("Ongoing event"));
wc_printf(")</span></li>\n");
);
wc_printf("<a href=\"display_edit_event?"
"msgnum=%ld?calview=day?year=%d?month=%d?day=%d?hour=%d\" "
- "class=\"event_title\" "
- "btt_tooltext=\"",
- Cal->cal_msgnum, year, month, day, t.hour);
+ "class=\"event_title\">"
+ ,
+ Cal->cal_msgnum, year, month, day, t.hour
+ );
+ escputs((char *) icalproperty_get_comment(p));
+ wc_printf("<span class=\"tooltip\"><span class=\"btttop\"></span><span class=\"bttmiddle\">");
wc_printf("<i>%s: %s</i><br />", _("From"), Cal->from);
wc_printf("<i>%s</i> ", _("Summary:"));
escputs((char *) icalproperty_get_comment(p));
escputs((char *)icalproperty_get_comment(q));
wc_printf("<br />");
}
- wc_printf("\">");
-
- escputs((char *) icalproperty_get_comment(p));
+ wc_printf("</span><span class=\"bttbottom\"></span></span>");
wc_printf("</a></dd>\n");
}
}
wc_printf("</table>" /* end of inner table */
"</div>");
-
- StrBufAppendPrintf(WC->trailing_javascript,
- " setTimeout(\"btt_enableTooltips('inner_day')\", 1); \n"
- );
}
p = icalproperty_new_summary(_("Untitled Task"));
icalcomponent_add_property(Cal->cal, p);
}
- if (p != NULL) {
-
-
- if (WCC->wc_view == VIEW_TASKS) {
+ if (p != NULL)
+ {
+ if (WCC->CurRoom.view == VIEW_TASKS) {
wc_printf("<a href=\"display_edit_task"
"?msgnum=%ld"
"?return_to_summary=1"
"?gotofirst=",
Cal->cal_msgnum
);
- escputs(ChrPtr(WCC->wc_roomname));
+ escputs(ChrPtr(WCC->CurRoom.name));
wc_printf("\">");
}
else {
today_tm.tm_mon + 1,
today_tm.tm_mday
);
- escputs(ChrPtr(WCC->wc_roomname));
+ escputs(ChrPtr(WCC->CurRoom.name));
wc_printf("\">");
}
escputs((char *) icalproperty_get_comment(p));
char *cmd,
long len)
{
+ wcsession *WCC = WC;
calview *c;
time_t now;
struct tm tm;
c->view = calview_day;
}
else {
- if (WC->wc_view == VIEW_CALBRIEF) {
+ if (WCC->CurRoom.view == VIEW_CALBRIEF) {
c->view = calview_brief;
}
else {
void **ViewSpecific,
long oper)
{
+ wcsession *WCC = WC;
calview *c = (calview*) *ViewSpecific;
if (c->view == calview_day) {
calendar_week_view(c->year, c->month, c->day);
}
else {
- if (WC->wc_view == VIEW_CALBRIEF) {
+ if (WCC->CurRoom.view == VIEW_CALBRIEF) {
calendar_brief_month_view(c->year, c->month, c->day);
}
else {