source: trunk/web/addons/job_monarch/lib/extjs-30/examples/form/absform.js @ 625

Last change on this file since 625 was 625, checked in by ramonb, 15 years ago

lib/extjs-30:

  • new ExtJS 3.0
File size: 1.4 KB
Line 
1/*!
2 * Ext JS Library 3.0.0
3 * Copyright(c) 2006-2009 Ext JS, LLC
4 * licensing@extjs.com
5 * http://www.extjs.com/license
6 */
7Ext.onReady(function() {
8    var form = new Ext.form.FormPanel({
9        baseCls: 'x-plain',
10        layout:'absolute',
11        url:'save-form.php',
12        defaultType: 'textfield',
13
14        items: [{
15            x: 0,
16            y: 5,
17            xtype:'label',
18            text: 'Send To:'
19        },{
20            x: 60,
21            y: 0,
22            name: 'to',
23            anchor:'100%'  // anchor width by percentage
24        },{
25            x: 0,
26            y: 35,
27            xtype:'label',
28            text: 'Subject:'
29        },{
30            x: 60,
31            y: 30,
32            name: 'subject',
33            anchor: '100%'  // anchor width by percentage
34        },{
35            x:0,
36            y: 60,
37            xtype: 'textarea',
38            name: 'msg',
39            anchor: '100% 100%'  // anchor width and height
40        }]
41    });
42
43    var window = new Ext.Window({
44        title: 'Resize Me',
45        width: 500,
46        height:300,
47        minWidth: 300,
48        minHeight: 200,
49        layout: 'fit',
50        plain:true,
51        bodyStyle:'padding:5px;',
52        buttonAlign:'center',
53        items: form,
54
55        buttons: [{
56            text: 'Send'
57        },{
58            text: 'Cancel'
59        }]
60    });
61
62    window.show();
63});
Note: See TracBrowser for help on using the repository browser.