Login.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /**
  2. * 登录页面
  3. */
  4. Ext.define('school.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: 'component',
  39. height: 50,
  40. html:'<div class="auth-title"><img class="x-logo-text" style="" src="resources/images/login-text-img.png" alt=""><div>',
  41. },
  42. {
  43. xtype: 'label',
  44. style: {
  45. 'font-size': '18px',
  46. 'text-align': 'center',
  47. 'color': '#676565',
  48. 'font-weight': 'bold'
  49. },
  50. text: '账户登录'
  51. },
  52. {
  53. xtype: 'textfield',
  54. cls: 'auth-textbox',
  55. name: 'username',
  56. bind: '{username}',
  57. height: 40,
  58. hideLabel: true,
  59. allowBlank : false,
  60. emptyText: '用户名'
  61. },
  62. {
  63. xtype: 'textfield',
  64. cls: 'auth-textbox',
  65. height: 40,
  66. hideLabel: true,
  67. emptyText: '密码',
  68. inputType: 'password',
  69. name: 'password',
  70. bind: '{password}',
  71. allowBlank : false
  72. },
  73. {
  74. xtype: 'container',
  75. layout: 'hbox',
  76. items: [
  77. {
  78. xtype: 'checkboxfield',
  79. flex : 1,
  80. cls: 'form-panel-font-color rememberMeCheckbox',
  81. height: 30,
  82. bind: '{persist}',
  83. boxLabel: '记住账户'
  84. },
  85. {
  86. xtype: 'box',
  87. html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  88. }
  89. ]
  90. },
  91. {
  92. xtype: 'button',
  93. height: 40,
  94. reference: 'loginButton',
  95. // scale: 'large',
  96. // ui: 'soft-green',
  97. // iconAlign: 'right',
  98. // iconCls: 'x-fa fa-angle-right',
  99. text: '登录',
  100. formBind: true,
  101. listeners: {
  102. click: 'onLoginButton'
  103. }
  104. }
  105. ]
  106. }
  107. ]
  108. });