+
+ /**
+ * Basic Window
+ */
+ Ext.createWidget('window', {
+ x: 690, y: 1290,
+
+ width : 450,
+ // height : 360,
+ minWidth: 450,
+
+ title: 'Window',
+
+ bodyPadding: '5 5 0 5',
+
+ collapsible: true,
+ closable : false,
+ draggable : false,
+ resizable: { handles: 's' },
+ animCollapse: true,
+
+ items: [
+ {
+ xtype : 'fieldset',
+ title : 'Plain Fieldset',
+ items: [
+ {
+ fieldLabel: 'TextField',
+ xtype : 'textfield',
+ name : 'someField',
+ emptyText : 'Enter a value',
+ anchor : '100%'
+ },
+ {
+ fieldLabel: 'ComboBox',
+ xtype : 'combo',
+ store : ['Foo', 'Bar'],
+ anchor : '100%'
+ },
+ {
+ fieldLabel: 'DateField',
+ xtype : 'datefield',
+ name : 'date',
+ anchor : '100%'
+ },
+ {
+ fieldLabel: 'TimeField',
+ name : 'time',
+ xtype : 'timefield',
+ anchor : '100%'
+ },
+ {
+ fieldLabel: 'NumberField',
+ xtype : 'numberfield',
+ name : 'number',
+ emptyText : '(This field is optional)',
+ allowBlank: true,
+ anchor : '100%'
+ },
+ {
+ fieldLabel: 'TextArea',
+ xtype : 'textareafield',
+ name : 'message',
+ cls : 'x-form-valid',
+ value : 'This field is hard-coded to have the "valid" style (it will require some code changes to add/remove this style dynamically)',
+ anchor : '100%'
+ },
+ {
+ fieldLabel: 'Checkboxes',
+ xtype: 'checkboxgroup',
+ columns: [100,100],
+ items: [
+ {boxLabel: 'Foo', checked: true,id:'fooChk1',inputId:'fooChkInput1'},
+ {boxLabel: 'Bar'}
+ ]
+ },
+ {
+ xtype: 'radiogroup',
+ columns: [100,100],
+ fieldLabel: 'Radio Group',
+ items: [
+ {boxLabel: 'Radio A', checked: true, name: 'radiogrp2'},
+ {boxLabel: 'Radio B', name: 'radiogrp2'}
+ ]
+ }
+ ]
+ }
+ ],
+
+ buttons: [
+ {
+ text : 'Submit',
+ handler: function() {
+ Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?');
+ }
+ }
+ ]
+ }).show();