[CLOSED] [1.0] Notification - AutoHide and CloseVisible

  1. #1

    [CLOSED] [1.0] Notification - AutoHide and CloseVisible

    Do you know whether it's possible to allow Notifications to have both the "close" button and auto-hide set?

    i.e. I'd like the Notification to close after 10 seconds, but also show the "Close" button if the user wishes to close the notification before that time.

    The Close button doesn't become visible unless I disable AutoHide.

    Any suggestions welcomed!

    Thanks

    Dan

    <%@ Page Language="C#" %>
    <%@ Import Namespace="Ext.Net.Utilities" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Notification.Show(new NotificationConfig
            {
                Title = "Example title",
                Html = "<p>This is the message</p>",
                Icon = Icon.Information,
                Height = 150,
                AutoHide = true,
                CloseVisible = true,
                HideDelay = 10000
            });
        }
    </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 id="Head1" runat="server">
    </head>
    <body>
    
    <form id="Form1" runat="server">    
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        
        
    </form>
    </body>
    </html>

  2. #2

    RE: [CLOSED] [1.0] Notification - AutoHide and CloseVisible

    Hi,

    Try the following sample
    <%@ Page Language="C#" %>
    <%@ Import Namespace="Ext.Net.Utilities" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Notification.Show(new NotificationConfig
            {
                Title = "Example title",
                Html = "<p>This is the message</p>",
                Icon = Icon.Information,
                Height = 150,
                AutoHide = true,
                HideDelay = 10000,
                Listeners =
                    {
                        BeforeShow =
                            {
                                Handler = "this.addClass('showCloseTool');"
                            }
                    }
            });
        }
    </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 id="Head1" runat="server">
        <title></title>
        
        <style type="text/css">
            .x-window.showCloseTool .x-tool-close, .ext-ie6 .showCloseTool .x-tool-close{
                display: inline !important;
            }
        </style>
    </head>
    <body>
    
    <form id="Form1" runat="server">    
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        
        
    </form>
    </body>
    </html>
  3. #3

    RE: [CLOSED] [1.0] Notification - AutoHide and CloseVisible

    Hi,

    Please note that should not be space between '.x-window' and '.showCloseTool' (as one solid word)
    .x-window.showCloseTool
  4. #4

    RE: [CLOSED] [1.0] Notification - AutoHide and CloseVisible

    Hi Vladimir,

    Many thanks - works perfectly.

    Dan

Similar Threads

  1. [CLOSED] RegisterClientStyleInclude on Ext.Net.Notification
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 25, 2011, 1:44 PM
  2. [CLOSED] Closable Autohide Notification
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 22, 2011, 11:25 AM
  3. [CLOSED] Message notification
    By majunior in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 15, 2011, 1:37 PM
  4. [CLOSED] Notification isue
    By majestic in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 13, 2010, 11:03 AM
  5. [CLOSED] Notification: hide close button when AutoHide = false
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 16, 2009, 3:10 PM

Posting Permissions