[CLOSED] Notification auto height

  1. #1

    [CLOSED] Notification auto height

    I would like to know whether it's possible to define a Notification with auto height.

    I found an 1.x example that shows this feature:
    http://forums.ext.net/showthread.php...-X-Msg-Alert()

    Thanks in advance
    Last edited by Daniil; Dec 04, 2012 at 5:05 AM. Reason: [CLOSED]
  2. #2
    The following example works on version 1.x. I would like to know if the AutoHeight is absent on version 2.x or if it's a bug

    <!DOCTYPE>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <script type="text/javascript">
            var notify = function () {
                Ext.net.Notification.show({
                    iconCls: 'icon-error',
                    html: 'BEGIN Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net END',
                    title: 'Ext.Net',
                    autoHeight: true
                });
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Button Text="Notify" runat="server">
            <Listeners>
                <Click Handler="notify();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
  3. #3
    Hi Raphael,

    The AutoHeight option has been removed on ExtJS site.

    A substitution in your case is:
    bodyStyle: "height: auto;"
  4. #4
    Where do i have to set that configuration?

    Line 6 - It does not work
    var notify = function () {
        Ext.net.Notification.show({
            iconCls: 'icon-error',
            html: 'BEGIN Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net END',
            title: 'Ext.Net',
            bodyStyle: "height: auto;"
        });
    }
    Line 6 - It increases the height but not enought
    var notify = function () {
        Ext.net.Notification.show({
            iconCls: 'icon-error',
            html: 'BEGIN Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net END',
            title: 'Ext.Net',
            height: 'auto'
        });
    }
  5. #5
    Indeed. For now please set up:
    height: null,
    bodyStyle: "height: auto;"
  6. #6
    I will test it and keep you posted
  7. #7
    Thank you Daniil, it worked like a charm.

    I just would like to know if the approach provided above is an workaround or a permanent way to accomplish it?

    If it is a permanent, please mark this thread as closed.
  8. #8
    i just would like to inform that if the header is set to false (Line 9) it's not necessary to set bodyStyle and the height can be set to auto (Line 10), as shown below:

    <!DOCTYPE>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head2" runat="server">
        <script type="text/javascript">
            var notify = function () {
                Ext.net.Notification.show({
                    iconCls: 'icon-error',
                    html: 'BEGIN Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net END',
                    header: false,
                    height: 'auto'
                });
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager2" runat="server" />
        <ext:Button ID="Button1" Text="Notify" runat="server">
            <Listeners>
                <Click Handler="notify();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
  9. #9
    Quote Originally Posted by RCN View Post
    Thank you Daniil, it worked like a charm.

    I just would like to know if the approach provided above is an workaround or a permanent way to accomplish it?
    It was a workaround. After updating form SVN you can remove "height: null". The bodyStyle option will be enough.

    Quote Originally Posted by RCN View Post
    i just would like to inform that if the header is set to false (Line 9) it's not necessary to set bodyStyle and the height can be set to auto (Line 10), as shown below:

    <!DOCTYPE>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head2" runat="server">
        <script type="text/javascript">
            var notify = function () {
                Ext.net.Notification.show({
                    iconCls: 'icon-error',
                    html: 'BEGIN Ext Net Ext Net Ext Net Ext Net Ext Net Ext  Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext  Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext  Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext  Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext  Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext Net Ext  Net Ext Net Ext Net Ext Net END',
                    header: false,
                    height: 'auto'
                });
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager2" runat="server" />
        <ext:Button ID="Button1" Text="Notify" runat="server">
            <Listeners>
                <Click Handler="notify();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
    A good finding! But I think it is rather a trick. I would not use in production.
  10. #10
    A good finding! But I think it is rather a trick. I would not use in production.
    Yes, it's a trick.

    Thank you Daniil

Similar Threads

  1. Replies: 4
    Last Post: Nov 07, 2012, 3:18 AM
  2. Vertical Auto Height
    By Zdenek in forum 1.x Help
    Replies: 5
    Last Post: Dec 01, 2011, 8:34 PM
  3. problem with ext panel auto height
    By venu.sn2009 in forum 1.x Help
    Replies: 2
    Last Post: Aug 10, 2011, 8:12 AM
  4. How to set auto height for a panel?
    By ganesh.tony in forum 1.x Help
    Replies: 0
    Last Post: Jul 01, 2011, 5:26 AM
  5. [CLOSED] Auto Height
    By speedstepmem4 in forum 1.x Premium Help
    Replies: 3
    Last Post: Nov 19, 2008, 6:43 AM

Posting Permissions