Mar 15, 2013, 3:37 PM
[CLOSED] Adding a tooltip to calendar Events inside a month-details-panel
Hi,
I successfully managed to add a tooltip on my calendar events by following the example given in http://forums.ext.net/showthread.php...for-the-Events. Here's the code:
Thank you.
I successfully managed to add a tooltip on my calendar events by following the example given in http://forums.ext.net/showthread.php...for-the-Events. Here's the code:
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.Net Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" Namespace="CompanyX" />
<ext:Viewport runat="server" Layout="fit">
<Items>
<ext:CalendarPanel ID="CalendarPanel1" runat="server">
<EventStore runat="server">
<Events>
<ext:Event
EventId="0"
Title="My event 1"
StartDate="2011/5/15"
EndDate="2011/5/18"
CalendarId="1" />
<ext:Event
EventId="1"
Title="My event 2"
StartDate="2011/5/15"
EndDate="2011/5/15"
CalendarId="2" />
<ext:Event
EventId="2"
Title="A"
StartDate="2011/5/15"
EndDate="2011/5/15"
CalendarId="2" />
<ext:Event
EventId="3"
Title="B"
StartDate="2011/5/15"
EndDate="2011/5/15"
CalendarId="2" />
</Events>
</EventStore>
</ext:CalendarPanel>
</Items>
</ext:Viewport>
<ext:ToolTip
runat="server"
Target="={#{CalendarPanel1}.body}"
Delegate=".ext-cal-evt"
Calendar="={#{CalendarPanel1}}">
<Listeners>
<Show Handler="var reg = /[a-z\ ]?CalendarPanel1\-[a-z\-]+\-evt\-(\d+)/,
cls = Ext.fly(this.triggerElement).dom.className,
eventId = reg.exec(cls)[1],
recordIndex = this.calendar.eventStore.find('EventId', parseInt(eventId)),
eventData = this.calendar.eventStore.getAt(recordIndex).data;
this.body.dom.innerHTML = Ext.encode(eventData.Title);" />
</Listeners>
</ext:ToolTip>
</form>
</body>
</html>
Now I would also like to add the same tooltip on each event of the list that shows up whenever I click the "+X more..." label in the MonthView on any day that has more than two events (such as 2011/5/15 in the above example). Is it possible?Thank you.
Last edited by Daniil; Mar 26, 2013 at 4:14 AM.
Reason: [CLOSED]