Oct 23, 2009, 2:35 PM
[CLOSED] [1.0] Notifications
On occasion, Notifcations will throw a Javascript error when you mover over a visible Notification. The error thrown is on:
aw.manager.bringToFront(aw)
I'm finding that it is sporadic when this happens, but happens more often than note.Example code:
.aspx:
<ext:Panel ID="pStatus" runat="server" Height="28" BodyCssClass="x-hidden">
<TopBar>
<ext:StatusBar ID="sbMain" runat="server">
<Items>
<ext:ToolbarFill />
<ext:ToolbarSeparator />
<ext:Button ID="bUsers" runat="server" Icon="User" Text="Users (0)">
<DirectEvents>
<Click OnEvent="bUsers_Click" />
</DirectEvents>
</ext:Button>
</Items>
</ext:StatusBar>
</TopBar>
</ext:Panel>
<div id="users" class="x-hidden" style="text-align:left">
<ext:Hidden ID="sessionId" runat="server" />
<ext:Panel runat="server" Height="262" Width="200" Border="true" Layout="Fit">
<Content>
<ext:GridPanel ID="gpUsers" runat="server" Title="" StoreID="strUsers" HideHeaders="true" AutoExpandColumn="FullName" Border="false">
<ColumnModel runat="server">
<Columns>
<ext:ImageCommandColumn Width="20" Fixed="true" Resizable="false">
<Commands>
<ext:ImageCommand CommandName="sessionStart" Icon="StatusOnline" />
</Commands>
</ext:ImageCommandColumn>
<ext:Column ColumnID="FullName" Header="User" DataIndex="FullName" Align="Left" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel runat="server" SingleSelect="true" />
</SelectionModel>
<Listeners>
<Command Handler="Manager.startSession(record, command);" />
</Listeners>
</ext:GridPanel>
</Content>
</ext:Panel>
.aspx.cs:protected void bUsers_Click(object sender, DirectEventArgs e) {
NotificationAlignConfig align = new NotificationAlignConfig();
align.ElementAnchor = AnchorPoint.BottomRight;
align.TargetAnchor = AnchorPoint.TopRight;
align.OffsetX = 0;
align.OffsetY = 0;
align.El = "bUsers";
Ext.Net.Notification.Show(new NotificationConfig
{
Title = "Users Online",
Icon = Icon.User,
HideDelay = 1000,
CloseVisible = true,
Height = 300,
Width = 220,
ContentEl = "users",
PinEvent = "none",
AlignCfg = align
});
}