Under the app/view
directory, we will create a new file named Login.js
. In this file, we will implement all the code that the user is going to see on the screen.
Inside the Login.js
file, we will implement the following code:
Ext.define('Packt.view.Login', { // #1 extend: 'Ext.window.Window', // #2 alias: 'widget.login', // #3 autoShow: true, // #4 height: 170, // #5 width: 360, // #6 layout: { type: 'fit' // #7 }, iconCls: 'key', // #8 title: "Login", // #9 closeAction: 'hide', // #10 closable: false // #11 });
On the first line (#1
) we have the definition of the class. To define a class we use Ext.define
, followed by parentheses (()
), and inside the parentheses we first declare the name of the class, followed by a comma ("
) and curly brackets ({}
), and at the end a semicolon. All the configurations and...