提交 eb9cabb3 编写于 作者: NoSubject's avatar NoSubject

Merge remote-tracking branch 'origin/master'

...@@ -3,5 +3,8 @@ MWF.xDesktop.requireApp("process.FormDesigner", "Module.Documenteditor", null, f ...@@ -3,5 +3,8 @@ MWF.xDesktop.requireApp("process.FormDesigner", "Module.Documenteditor", null, f
MWF.xDesktop.requireApp("cms.FormDesigner", "Property", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Property", null, false);
MWF.xApplication.cms.FormDesigner.Module.Documenteditor = MWF.CMSFCDocumenteditor = new Class({ MWF.xApplication.cms.FormDesigner.Module.Documenteditor = MWF.CMSFCDocumenteditor = new Class({
Extends: MWF.FCDocumenteditor, Extends: MWF.FCDocumenteditor,
Implements : [MWF.CMSFCMI] Implements : [MWF.CMSFCMI],
options: {
"propertyPath": "../x_component_cms_FormDesigner/Module/Documenteditor/documenteditor.html"
}
}); });
\ No newline at end of file
MWF.xDesktop.requireApp("process.Xform", "Documenteditor", null, false); MWF.xDesktop.requireApp("process.Xform", "Documenteditor", null, false);
MWF.xApplication.cms.Xform.Documenteditor = MWF.CMSDocumenteditor = new Class({ MWF.xApplication.cms.Xform.Documenteditor = MWF.CMSDocumenteditor = new Class({
Extends: MWF.APPDocumenteditor Extends: MWF.APPDocumenteditor,
loadDocumentEditor: function(callback){
this._loadToolbars();
this._loadFiletextPage(function(){
this._singlePage();
this.form.addEvent("beforeSave", function(){
this.getData();
this.checkSaveNewEdition();
}.bind(this));
if (this.json.toWord=="y"){
if (this.json.toWordTrigger=="open") this.docToWord();
if (this.json.toWordTrigger=="save") {
if (!this.form.toWordSaveList) this.form.toWordSaveList = [];
this.form.toWordSaveList.push(this);
}
if (this.json.toWordTrigger=="submit") {
if (!this.form.toWordSubmitList) this.form.toWordSubmitList = [];
this.form.toWordSubmitList.push(this);
}
}
//if (!layout.mobile) this.loadSideToolbar();
o2.load("../o2_lib/diff-match-patch/diff_match_patch.js");
// if (this.form.businessData.data["$work"]){
// var id = this.form.businessData.data["$work"].job;
// o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.listWithJobCategory(id, this.json.id, function(json){
// this.historyDocumentList = json.data;
// if (this.historyDocumentList.length){
// o2.Actions.load("x_processplatform_assemble_surface").DocumentVersionAction.get(this.historyDocumentList[this.historyDocumentList.length-1].id, function(json){
// var data = JSON.parse(json.data.data);
// this.originaHistoryData = data.data;
// }.bind(this));
// }
// }.bind(this));
// }
if (callback) callback();
}.bind(this));
if (!this.form.documenteditorList) this.form.documenteditorList=[];
this.form.documenteditorList.push(this);
},
_isAllowHistory: function(){
return false;
// if (this.json.allowHistory=="n") return false;
// if (this.json.allowHistory=="s"){
// if (this.json.allowHistoryScript && this.json.allowHistoryScript.code){
// return !!this.form.Macro.exec(this.json.allowHistoryScript.code, this);
// }
// }
// return true;
},
}); });
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册