WpsOffice2.js 826 B

1234567891011121314151617181920212223
  1. MWF.xDesktop.requireApp("process.Xform", "WpsOffice2", null, false);
  2. MWF.xApplication.cms.Xform.WpsOffice2 = MWF.CMSWpsOffice2 = new Class({
  3. Extends: MWF.APPWpsOffice2,
  4. createDocument : function (callback){
  5. var json = {};
  6. if(this.json.template !== ""){
  7. json.templateId = this.json.template;
  8. this.json.officeType = "word";
  9. }
  10. if(this.json.fileName !== ""){
  11. json.fileName = this.json.fileName;
  12. }
  13. json.category = "document";
  14. json.docId = this.form.businessData.document.id;
  15. this.action.CustomAction.createFileBlank(this.json.officeType,json, function( json ){
  16. this.documentId = json.data.docId;
  17. this.setData();
  18. if (callback) callback();
  19. }.bind(this),null, false);
  20. },
  21. });