3121d9f59c08f321ec27be0da2f5bb3da3d9185d.svn-base 1.2 KB

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