Advertisement
Guest User

Untitled

a guest
Oct 11th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ext.define('Whatever.view.LoginFormPanel', {
  2.     extend: 'Ext.window.Window',
  3.     requires: [
  4.         'Whatever.controller.LoginController'
  5.     ],
  6.     controller: 'loginController',
  7.     closable: false,
  8.     height: 215,
  9.     width: 370,
  10.     layout: {
  11.         type: 'vbox',
  12.         align: 'left'
  13.     },
  14.     bodyBorder: true,
  15.     bodyPadding: '15 10',
  16.     resizable: false,
  17.     title: ' ',
  18.     modal: true,
  19.     cls: 'x-login',
  20.    
  21.     header: {
  22.        
  23.         xtype: 'toolbar',
  24.         height: 35,
  25.         items: [
  26.             { xtype: 'image', src: '/cms/extjs/resources/img/ww-logo.png', height: 28, width: 134, margin: '0 5 0 5' },
  27.             { xtype: 'image', src: '/cms/extjs/resources/img/extjs/wwfr_logo.png', height: 28, width: 60 },
  28.             { xtype: 'label', text: 'User Authentication', cls: 'x-login-header-user-auth', flex: 1},
  29.         ]
  30.     },
  31.    
  32.     initComponent: function() {
  33.         var me = this;
  34.  
  35.         console.log(me);
  36.         Ext.apply(me, {
  37.            
  38.             bodyStyle: 'padding: 15 10',
  39.            
  40.             items: [
  41.                 {
  42.                     xtype: 'label',
  43.                     text: 'You are currently not logged in.',
  44.                     width: 340
  45.                 },
  46.                 {
  47.                     xtype: 'label',
  48.                     text: 'Please enter your Network User ID and Password:',
  49.                     width: 340
  50.                 },
  51.                 {
  52.                     xtype: 'container',
  53.                     itemId: 'placeholder',
  54.                     flex: 1
  55.                 },
  56.                 {
  57.                     xtype: 'textfield',
  58.                     reference: 'logonField',
  59.                     fieldLabel: 'User ID',
  60.                     labelWidth: 65,
  61.                     height: 22,
  62.                     width: 305,
  63.                     listeners: {
  64.                         afterrender: function(field){
  65.                             field.focus(false, 500);
  66.                         }
  67.                     }
  68.                 },
  69.                 {
  70.                     xtype: 'textfield',
  71.                     reference: 'passwordField',
  72.                     inputType: 'password',
  73.                     fieldLabel: 'Password',
  74.                     labelWidth: 65,
  75.                     height: 22,
  76.                     width: 305
  77.                 }
  78.             ],
  79.             dockedItems: [
  80.                  {
  81.                     xtype: 'toolbar',
  82.                     flex: 1,
  83.                     dock: 'bottom',
  84.                     height: 50,
  85.                     items: [
  86.                         {
  87.                             xtype: 'button',
  88.                             reference: 'loginButton',
  89.                             handler: 'onLoginButtonClick',
  90.                             text: 'Login',
  91.                             icon: '/cms/extjs/resources/img/green_pipe.png',
  92.                             height: 30,
  93.                             margin: '0 0 0 10'
  94.                         }
  95.                     ]
  96.                 }
  97.             ]
  98.         });
  99.         console.log(me);
  100.         me.callParent(arguments);
  101.     },
  102.    
  103.     focus: Ext.emptyFn
  104.  
  105. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement