Browse Source

登录界面

zhuth 7 years ago
parent
commit
a3ad451e3c
1 changed files with 80 additions and 116 deletions
  1. 80 116
      frontend/saas-web/app/view/auth/Login.js

+ 80 - 116
frontend/saas-web/app/view/auth/Login.js

@@ -21,124 +21,88 @@ Ext.define('saas.view.auth.Login', {
     },
     defaultFocus: 'authdialog',
 
-    items: [
-        {
-            xtype: 'authdialog',
-            reference: 'authdialog',
-            defaultButton : 'loginButton',
-            autoComplete: true,
-            bodyPadding: '20 20',
-            cls: 'auth-dialog-login',
-            header: false,
-            width: 415,
-            layout: {
-                type: 'vbox',
-                align: 'stretch'
-            },
+    items: [{
+        xtype: 'authdialog',
+        reference: 'authdialog',
+        defaultButton: 'loginButton',
+        autoComplete: true,
+        bodyPadding: '20 20',
+        cls: 'auth-dialog-login',
+        header: false,
+        width: 415,
+        layout: {
+            type: 'vbox',
+            align: 'stretch'
+        },
 
-            defaults : {
-                margin : '5 0'
+        defaults: {
+            margin: '5 0'
+        },
+        items: [{
+                xtype: 'label',
+                text: '账 户 登 录'
             },
-            items: [
-                {
-                    xtype: 'label',
-                    text: '账 户 登 录'
-                },
-                {
-                    xtype: 'textfield',
-                    cls: 'auth-textbox',
-                    name: 'username',
-                    bind: '{username}',
-                    height: 55,
-                    hideLabel: true,
-                    allowBlank : false,
-                    emptyText: '账号/邮箱/手机号',
-                    triggers: {
-                        glyphed: {
-                            cls: 'trigger-glyph-noop auth-email-trigger'
-                        }
-                    }
-                },
-                {
-                    xtype: 'textfield',
-                    cls: 'auth-textbox',
-                    height: 55,
-                    hideLabel: true,
-                    emptyText: '密码',
-                    inputType: 'password',
-                    name: 'password',
-                    bind: '{password}',
-                    allowBlank : false,
-                    triggers: {
-                        glyphed: {
-                            cls: 'trigger-glyph-noop auth-password-trigger'
-                        }
-                    }
-                },
-                {
-                    xtype: 'container',
-                    layout: 'hbox',
-                    items: [
-                        {
-                            xtype: 'checkboxfield',
-                            flex : 1,
-                            cls: 'form-panel-font-color rememberMeCheckbox',
-                            height: 30,
-                            bind: '{persist}',
-                            boxLabel: '记住账户'
-                        },
-                        {
-                            xtype: 'box',
-                            html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
-                        }
-                    ]
-                },
-                {
-                    xtype: 'button',
-                    reference: 'loginButton',
-                    scale: 'large',
-                    ui: 'soft-green',
-                    iconAlign: 'right',
-                    iconCls: 'x-fa fa-angle-right',
-                    text: '登录',
-                    formBind: true,
-                    listeners: {
-                        click: 'onLoginButton'
+            {
+                xtype: 'textfield',
+                cls: 'auth-textbox',
+                name: 'username',
+                bind: '{username}',
+                height: 55,
+                hideLabel: true,
+                allowBlank: false,
+                emptyText: '账号/邮箱/手机号',
+                triggers: {
+                    glyphed: {
+                        cls: 'trigger-glyph-noop auth-email-trigger'
                     }
-                },
-                {
-                    xtype: 'box',
-                    html: '<div class="outer-div"><div class="seperator">或</div></div>',
-                    margin: '10 0'
-                },
-                {
-                    xtype: 'button',
-                    scale: 'large',
-                    ui: 'weixin',
-                    iconAlign: 'right',
-                    iconCls: 'x-fa fa-weixin',
-                    text: '微信登录',
-                    listeners: {
-                        click: 'onWeixinLogin'
+                }
+            },
+            {
+                xtype: 'textfield',
+                cls: 'auth-textbox',
+                height: 55,
+                hideLabel: true,
+                emptyText: '密码',
+                inputType: 'password',
+                name: 'password',
+                bind: '{password}',
+                allowBlank: false,
+                triggers: {
+                    glyphed: {
+                        cls: 'trigger-glyph-noop auth-password-trigger'
                     }
-                },
-                {
-                    xtype: 'box',
-                    html: '<div class="outer-div"><div class="seperator">或</div></div>',
-                    margin: '10 0'
-                },
-                {
-                    xtype: 'button',
-                    scale: 'large',
-                    ui: 'gray',
-                    iconAlign: 'right',
-                    iconCls: 'x-fa fa-user-plus',
-                    text: '创建账户',
-                    listeners: {
-                        click: 'onNewAccount'
+                }
+            },
+            {
+                xtype: 'container',
+                layout: 'hbox',
+                items: [{
+                        xtype: 'checkboxfield',
+                        flex: 1,
+                        cls: 'form-panel-font-color rememberMeCheckbox',
+                        height: 30,
+                        bind: '{persist}',
+                        boxLabel: '记住账户'
+                    },
+                    {
+                        xtype: 'box',
+                        html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
                     }
-                }                
-            ]
-        }
-    ]
-});
+                ]
+            },
+            {
+                xtype: 'button',
+                reference: 'loginButton',
+                scale: 'large',
+                ui: 'soft-green',
+                iconAlign: 'right',
+                iconCls: 'x-fa fa-angle-right',
+                text: '登录',
+                formBind: true,
+                listeners: {
+                    click: 'onLoginButton'
+                }
+            }
+        ]
+    }]
+});