[CLOSED] Need to show the login window to the right side and need to show static message to the left.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Need to show the login window to the right side and need to show static message to the left.

    Hi all,

    when i open the application i need to show a login window to the right side and need to show static message to the left.
    Please see the attachment(Login.jpg).

    Right now i am using the below code to which login window centers to the panel with out static message.

    <ext:Panel ID="pnlLogin" runat="server" Region="Center">
                    <Listeners>
                        <Resize Handler="CenterWindowOnResize();" />
                    </Listeners>
                    <Items>
                        <nxtwc:NxtWindow ID="loginWindow" runat="server" Closable="false" Resizable="false" Height="200"
                            Icon="Lock" Title="Login" Draggable="false" Width="450" Modal="false" BodyBorder="false"
                            Padding="10" Shadow="None">
                            <Items>
                            </Items>
                       </nxtwc:NxtWindow>
                    </Items>
                </ext:Panel>
    var CenterWindowOnResize = function () {
                if (loginWindow.hidden == false)
                    loginWindow.el.center(pnlLogin.body);
                if (forgotPasswordWindow.hidden == false)
                    forgotPasswordWindow.el.center(pnlLogin.body);
                if (changePasswordWindow.hidden == false)
                    changePasswordWindow.el.center(pnlLogin.body);
    
            }
    Please help me with this. Thank You.
    Attached Thumbnails Click image for larger version. 

Name:	Login.jpg 
Views:	102 
Size:	62.7 KB 
ID:	3773  
    Last edited by Daniil; Jan 31, 2012 at 6:11 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I would implement it this way.

    Example
    <%@ 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>
    
        <script type="text/javascript">
            var onForgot = function () {
                var win = this;
                win.layout.setActiveItem(1);
                win.setTitle("Recovery");
            };
    
            var onBack = function (win) {
                win.layout.setActiveItem(0);
                win.setTitle("Login");    
            };
        </script>
    
        <style type="text/css">
            .forgot {
                color: blue;
                text-decoration: underline;
                padding-right: 20px;
            }
            
            .forgot:hover {
                cursor: pointer;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server">
                <Listeners>
                    <DocumentReady Handler="Window1.alignTo(Ext.getBody(), 'r-r');" />
                    <WindowResize Handler="Window1.alignTo(Ext.getBody(), 'r-r');" />
                </Listeners>
            </ext:ResourceManager>
            <ext:Viewport runat="server" Layout="VBoxLayout">
                <LayoutConfig>
                    <ext:VBoxLayoutConfig Pack="Center" />
                </LayoutConfig>
                <Items>
                    <ext:Container runat="server" Html="Hello World!" />
                </Items>
            </ext:Viewport>
            <ext:Window
                ID="Window1"
                runat="server" 
                Title="Login" 
                Width="300" 
                Height="140"
                Layout="CardLayout"
                ActiveIndex="0">
                <Items>
                    <ext:Container runat="server" Layout="VBoxLayout">
                        <LayoutConfig>
                            <ext:VBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
                            <ext:FormPanel 
                                runat="server" 
                                Height="60" 
                                BodyStyle="background-color: transparent;" 
                                Border="false"
                                Margins="10"
                                DefaultAnchor="100%">
                                <Items>
                                    <ext:TextField runat="server" FieldLabel="User" />
                                    <ext:TextField runat="server" FieldLabel="Password" />
                                </Items>
                            </ext:FormPanel>
                            <ext:Container runat="server" Layout="HBoxLayout" Height="50">
                                <LayoutConfig>
                                    <ext:HBoxLayoutConfig Pack="End" />
                                </LayoutConfig>
                                <Items>
                                    <ext:DisplayField runat="server" Text="Forgot?" Cls="forgot">
                                        <Listeners>
                                            <Render Handler="this.el.on('click', onForgot, Window1);" />
                                        </Listeners>
                                    </ext:DisplayField>
                                </Items>
                            </ext:Container>
                        </Items>
                    </ext:Container>
                    <ext:Container runat="server">
                        <Items>
                            <ext:DisplayField runat="server" Text="Recovery credentials." />
                            <ext:Button runat="server" Text="Back">
                                <Listeners>
                                    <Click Handler="onBack(Window1);" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Container>
                </Items>
            </ext:Window>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] How to show message prompt with window 'Hide' listener?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Jul 13, 2012, 2:51 PM
  2. Replies: 2
    Last Post: Jul 12, 2012, 2:06 PM
  3. Replies: 3
    Last Post: Mar 19, 2012, 12:35 PM
  4. Can't show a static text-string ...
    By andersgunnare in forum 1.x Help
    Replies: 0
    Last Post: Jun 09, 2011, 8:49 AM
  5. How to show window in UserControl on client side?
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 20, 2009, 7:08 PM

Posting Permissions