This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.define('Car', { | |
| extend: 'Ext.data.Model', | |
| fields: [ | |
| 'id', | |
| 'brand', | |
| 'model', | |
| {name: 'price', type: 'float'} | |
| ] | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| f1 = Ext.create('Ext.window.Window', { | |
| title: 'Employee Form', | |
| height: 200, | |
| width: 300, | |
| bodyPadding: 10, | |
| items: [ | |
| { | |
| xtype: 'form', | |
| url: '/sagi/service/employees', | |
| defaultType: 'textfield', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.create('Ext.form.Panel', { | |
| title: 'Simple Form with FieldSets', | |
| labelWidth: 75, // label settings here cascade unless overridden | |
| url: 'save-form.php', | |
| frame: true, | |
| bodyStyle: 'padding:5px 5px 0', | |
| width: 550, | |
| renderTo: Ext.get('fs'), | |
| layout: 'column', // arrange fieldsets side by side | |
| defaults: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.create('Ext.form.Panel', { | |
| title : 'Order Form', | |
| width : 300, | |
| bodyPadding: 10, | |
| renderTo : Ext.get('rdg'), | |
| items: [ | |
| { | |
| xtype : 'fieldcontainer', | |
| fieldLabel : 'Size', | |
| defaultType: 'radiofield', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.create('Ext.form.Panel', { | |
| title: 'Checkbox Group', | |
| width: 300, | |
| height: 125, | |
| bodyPadding: 10, | |
| renderTo: Ext.get('cbg'), | |
| items: [{ | |
| xtype: 'checkboxgroup', | |
| fieldLabel: 'Two Columns', | |
| // Arrange checkboxes into two columns, distributed vertically |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mywin = Ext.create('Ext.window.Window', { | |
| title: 'Hello', | |
| height: 400, | |
| width: 400, | |
| layout: { | |
| type: 'table', | |
| columns: 3 | |
| }, | |
| items: [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.define('Counter', { | |
| count: 0, | |
| constructor: function(num) { | |
| this.count = num; | |
| }, | |
| inc: function() { | |
| this.count++; | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| store = Ext.create('Ext.data.Store', { | |
| fields: [ | |
| 'id', | |
| 'model', | |
| 'brand' | |
| ], | |
| proxy: { | |
| type: 'ajax', | |
| url: '/sagi/service/car', | |
| batchActions: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| store = Ext.create('Ext.data.Store', { | |
| fields: [ | |
| 'id', | |
| 'model', | |
| 'brand' | |
| ], | |
| proxy: { | |
| type: 'ajax', | |
| url: '/sagi/service/car', | |
| reader: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var arrayData = [ | |
| ['Camry', 'Toyota'], | |
| ['Yaris', 'Toyota'], | |
| ['Jazz', 'Honda'], | |
| ['Freed', 'Honda'], | |
| ['March', 'Nissan'] | |
| ] | |
| Ext.define('Car', { | |
| extend: 'Ext.data.Model', |