Login.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /**
  2. * 登录页面
  3. */
  4. Ext.define('saas.view.auth.Login', {
  5. extend: 'Ext.container.Container',
  6. xtype: 'login',
  7. requires: [
  8. 'Ext.form.Label',
  9. 'Ext.form.field.Checkbox'
  10. ],
  11. controller: 'login',
  12. cls: 'auth-login',
  13. layout: {
  14. type: 'vbox',
  15. align: 'center',
  16. pack: 'center'
  17. },
  18. defaultFocus: 'authdialog',
  19. items: [
  20. {
  21. xtype: 'authdialog',
  22. reference: 'authdialog',
  23. defaultButton : 'loginButton',
  24. autoComplete: true,
  25. bodyPadding: '20 20',
  26. cls: 'auth-dialog-login',
  27. header: false,
  28. width: 415,
  29. layout: {
  30. type: 'vbox',
  31. align: 'stretch'
  32. },
  33. defaults : {
  34. margin : '5 0'
  35. },
  36. items: [
  37. {
  38. xtype: 'label',
  39. text: '账 户 登 录'
  40. },
  41. {
  42. xtype: 'textfield',
  43. cls: 'auth-textbox',
  44. name: 'username',
  45. bind: '{username}',
  46. height: 55,
  47. hideLabel: true,
  48. allowBlank : false,
  49. emptyText: '账号/邮箱/手机号',
  50. triggers: {
  51. glyphed: {
  52. cls: 'trigger-glyph-noop auth-email-trigger'
  53. }
  54. }
  55. },
  56. {
  57. xtype: 'textfield',
  58. cls: 'auth-textbox',
  59. height: 55,
  60. hideLabel: true,
  61. emptyText: '密码',
  62. inputType: 'password',
  63. name: 'password',
  64. bind: '{password}',
  65. allowBlank : false,
  66. triggers: {
  67. glyphed: {
  68. cls: 'trigger-glyph-noop auth-password-trigger'
  69. }
  70. }
  71. },
  72. {
  73. xtype: 'container',
  74. layout: 'hbox',
  75. items: [
  76. {
  77. xtype: 'checkboxfield',
  78. flex : 1,
  79. cls: 'form-panel-font-color rememberMeCheckbox',
  80. height: 30,
  81. bind: '{persist}',
  82. boxLabel: '记住账户'
  83. },
  84. {
  85. xtype: 'box',
  86. html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  87. }
  88. ]
  89. },
  90. {
  91. xtype: 'button',
  92. reference: 'loginButton',
  93. scale: 'large',
  94. ui: 'soft-green',
  95. iconAlign: 'right',
  96. iconCls: 'x-fa fa-angle-right',
  97. text: '登录',
  98. formBind: true,
  99. listeners: {
  100. click: 'onLoginButton'
  101. }
  102. }
  103. ]
  104. }
  105. ]
  106. });