source: trunk/web/addons/job_monarch/lib/extjs/examples/form/anchoring.js @ 619

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

lib/:

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