Form.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Ext.define('erp.view.common.labelButton.Form',{
  2. extend: 'Ext.form.Panel',
  3. alias: 'widget.erpLabelButtonFormPanel',
  4. id: 'labelbuttonform',
  5. region: 'center',
  6. frame : true,
  7. autoScroll : true,
  8. defaultType : 'textfield',
  9. labelSeparator : ':',
  10. fieldDefaults : {
  11. margin : '2 2 2 2',
  12. fieldStyle : "background:#FFFAFA;color:#515151;",
  13. labelAlign : "right",
  14. blankText : $I18N.common.form.blankText
  15. },
  16. FormUtil: Ext.create('erp.util.FormUtil'),
  17. buttonAlign: 'center',
  18. buttons: [{
  19. name: 'confirm',
  20. text: $I18N.common.button.erpConfirmButton,
  21. iconCls: 'x-button-icon-confirm',
  22. cls: 'x-btn-gray',
  23. style: {
  24. marginLeft: '10px'
  25. }
  26. },'-','-',{
  27. text: $I18N.common.button.erpCloseButton,
  28. iconCls: 'x-button-icon-close',
  29. cls: 'x-btn-gray',
  30. handler: function(){
  31. var main = parent.Ext.getCmp("content-panel");
  32. main.getActiveTab().close();
  33. }
  34. }],
  35. confirmUrl:confirmUrl,
  36. initComponent : function(){
  37. var param = {caller: caller, condition: ''};
  38. this.FormUtil.getItemsAndButtons(this, 'common/singleFormItems.action', param);
  39. this.callParent(arguments);
  40. //this.initFields(this);
  41. }
  42. });