MailForm.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Ext.define('erp.view.oa.mail.MailForm',{
  2. extend: 'Ext.form.Panel',
  3. alias: 'widget.erpMailFormPanel',
  4. id: 'form',
  5. region: 'center',
  6. frame : true,
  7. height: 'auto',
  8. fieldDefaults: {
  9. labelWidth: 55
  10. },
  11. layout: {
  12. type: 'vbox',//hbox水平盒布局
  13. align: 'stretch' // Child items are stretched to full width子面板高度充满父容器
  14. },
  15. items: [{
  16. xtype: 'textfield',
  17. fieldLabel: '收件人',
  18. msgTarget: 'side',
  19. allowBlank: true,
  20. blankText : '收件人不能为空',
  21. id:'receAddr',
  22. name: 'receAddr'
  23. }, {
  24. xtype: 'textfield',
  25. fieldLabel: '主题',
  26. name: 'subject',
  27. id: 'subject'
  28. },{
  29. xtype: 'filefield',
  30. fieldLabel: '附件',
  31. id: 'attach',
  32. name: 'file',
  33. msgTarget: 'side',
  34. allowBlank: false,
  35. buttonText: '浏览...'
  36. },{
  37. xtype: 'displayfield',
  38. id: 'attachs',
  39. cls: 'mail-attach',
  40. height: 'auto'
  41. },{
  42. xtype: 'htmleditor',
  43. fieldLabel: '',
  44. height: 600,
  45. name: 'context',
  46. id: 'context',
  47. anchor: '100%'//添加编辑框******
  48. }],
  49. buttonAlign: 'center',
  50. buttons: [{
  51. id: 'post',
  52. text: '发送',
  53. iconCls: 'x-button-icon-save',
  54. cls: 'x-btn-gray'
  55. },{
  56. id: 'save',
  57. text: '保存草稿',
  58. width: 120,
  59. iconCls: 'x-button-icon-change',
  60. cls: 'x-btn-gray'
  61. },{
  62. id: 'close',
  63. text: '取消',
  64. iconCls: 'x-button-icon-close',
  65. cls: 'x-btn-gray'
  66. }],
  67. initComponent : function(){
  68. this.callParent(arguments);
  69. }
  70. });