PDA

View Full Version : [CLOSED] Show notifications without spaces between Notifications



supera
Feb 20, 2012, 1:37 PM
Hi

There are any mode to show the ext.net.Notifications without spaces between notifications? (automated mode, preferably)
I create the notifications as follow:



<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Teste10.aspx.vb" Inherits="WebApplication3.Teste10" %>
<%@ 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">

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ntf As Ext.Net.Notification
Dim ntfConf As Ext.Net.NotificationConfig = New Ext.Net.NotificationConfig

ntfConf.HideDelay = 8000 'close after 8 seconds
ntfConf.ShowPin = True
ntfConf.Title = "BirthDay"
ntfConf.Icon = Ext.Net.Icon.Information
ntfConf.Html = "<b>Supera</b></br>Birth date: fev/25/1978</br><b><font color:blue>5 days</font>"
ntf = New Ext.Net.Notification()
ntf.Show(ntfConf)

ntfConf.HideDelay = 8000 'close after 8 seconds
ntfConf.ShowPin = True
ntfConf.Title = "BirthDay"
ntfConf.Icon = Ext.Net.Icon.Information
ntfConf.Html = "<b>Jorge Henrique</b></br>Birth date: fev/22/1965</br><b><font color:blue>2 days</font>"
ntf = New Ext.Net.Notification()
ntf.Show(ntfConf)

ntfConf.HideDelay = 8000 'close after 8 seconds
ntfConf.ShowPin = True
ntfConf.Title = "BirthDay"
ntfConf.Icon = Ext.Net.Icon.Information
ntfConf.Html = "<b>Ronaldo 9</b></br>Birth date: fev/21/1965</br><b><font color:blue>1 days</font>"
ntf = New Ext.Net.Notification()
ntf.Show(ntfConf)

End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<div>

</div>
</form>
</body>
</html>


3845

Daniil
Feb 20, 2012, 4:13 PM
Hi,

Please set up a respective "offset" for the "alignToCfg" config option. Defaults to "[-20, -20]".

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
NotificationConfig cfg = new NotificationConfig()
{
Title = "Title",
Html = "Hello World!",
CustomConfig =
{
new ConfigItem("alignToCfg", "{ el : document, position : 'br-br', offset : [-20, 0]}", ParameterMode.Raw)
}
};
Notification.Show(cfg);
Notification.Show(cfg);
Notification.Show(cfg);
}
</script>

<!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 v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
</form>
</body>
</html>

supera
Feb 20, 2012, 4:24 PM
Works fine!

Thanks a lot, Daniil.