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

修复公文编辑器copyto和附件的显示问题

上级 a74ba4ae
......@@ -201,6 +201,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if (this.json.documentTempleteType=="cus"){
pageContentNode.loadHtml(o2.filterUrl(this.json.documentTempleteUrl), function(){
this._clearCopytoTrs();
if (this.json.toWordPageNumber=="y") this.doPageStyles(pageContentNode);
if (this.attachmentTemplete){
......@@ -213,6 +214,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}.bind(this));
}else{
this.getTempleteJson(function(){
this._clearCopytoTrs();
var templete = this.json.documentTempleteName || "standard";
pageContentNode.loadHtml(o2.filterUrl("../x_component_process_FormDesigner/Module/Documenteditor/templete/"+this.templeteJson[templete].file), function(){
if (this.json.toWordPageNumber=="y") this.doPageStyles(pageContentNode);
......@@ -228,6 +230,24 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}.bind(this));
}
},
_clearCopytoTrs: function(){
if (this.layout_copytoContentTr){
this.layout_copytoContentTr.destroy();
this.layout_copytoContentTr = null;
}
if (this.layout_copytoContentTrP){
this.layout_copytoContentTrP.destroy();
this.layout_copytoContentTrP = null;
}
if (this.layout_copyto2ContentTr){
this.layout_copyto2ContentTr.destroy();
this.layout_copyto2ContentTr = null;
}
if (this.layout_copyto2ContentTrP){
this.layout_copyto2ContentTrP.destroy();
this.layout_copyto2ContentTrP = null;
}
},
doPageStyles: function(pageContentNode){
var style = pageContentNode.getLast("style");
if (style){
......@@ -814,9 +834,9 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if (!control.secret) n++;
if (!control.priority) n++;
if (this.layout_copiesSecretPriority_blank){
this.layout_copiesSecretPriority_blank.empty();
while (n>0){
this.layout_copiesSecretPriority_blank.empty();
this.layout_copiesSecretPriority_blank.appendHTML("<span style='font-size:16.0pt'>&nbsp;</span>");
this.layout_copiesSecretPriority_blank.appendHTML("<p class=\"MsoNormal\"><span style='font-size:16.0pt'>&nbsp;</span></p>");
n--;
}
}
......@@ -2845,6 +2865,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this.data[name] = v + "";
break;
case "copyto":
case "copyto2":
this.data[name] = v + "";
break;
default:
......@@ -2909,6 +2930,7 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this.data[name] = strs.join("") + "";
break;
case "copyto":
case "copyto2":
this.data[name] = strs.join("") + "";
break;
default:
......
......@@ -483,9 +483,11 @@ o2.xApplication.process.Xform.widget.OOXML.WordprocessingML = o2.OOXML.WML = new
node = node.firstChild;
while (node){
if (node.nodeType===Node.TEXT_NODE){
if (node.nodeValue) this.processRun(node.parentElement || node.parentNode, oo_p, p, node.nodeValue);
if (node.nodeValue.trim()) this.processRun(node.parentElement || node.parentNode, oo_p, p, node.nodeValue);
}else if (node.nodeType===Node.ELEMENT_NODE){
if (node.tagName.toLowerCase() === "span") {
if (node.getStyle("display") === "none") {
continue;
}else if (node.tagName.toLowerCase() === "span") {
this.processRun(node, oo_p, p);
}else if (node.tagName.toLowerCase() === "br") {
if (node.nextSibling) this.processRun(node, oo_p, p, "", "br");
......@@ -511,7 +513,7 @@ o2.xApplication.process.Xform.widget.OOXML.WordprocessingML = o2.OOXML.WML = new
this.processParagraphRun(node, oo_p, p, oo_body, append, ilvl);
}
}else{
this.processParagraphRun(node, oo_p, p, oo_body, append, ilvl);
this.processParagraphRun(node, oo_p, p, oo_body, append, ilvl);
}
node = node.nextSibling;
}
......@@ -830,7 +832,9 @@ o2.xApplication.process.Xform.widget.OOXML.WordprocessingML = o2.OOXML.WML = new
dom = dom.firstChild;
while (dom){
if (dom.nodeType===Node.ELEMENT_NODE){
if (dom.hasClass("doc_layout_filetext")){
if (dom.getStyle("display") === "none") {
continue;
}else if (dom.hasClass("doc_layout_filetext")){
this.processFiletext(dom, oo_body, append);
}else if (dom.tagName.toLowerCase() === "p" || ((!!divAsP || !!this.options.divAsP) && dom.tagName.toLowerCase() === "div")){
this.processParagraph(dom, oo_body, append);
......@@ -1862,7 +1866,9 @@ debugger;
var node = span.firstChild;
while (node){
if (node.nodeType===Node.ELEMENT_NODE){
if (node.tagName.toLowerCase() === "span"){
if (node.getStyle("display") === "none") {
continue;
}else if (node.tagName.toLowerCase() === "span"){
this.processRunSpan(node, oo_p, runPrs);
}else if (node.tagName.toLowerCase() === "br"){
runPrs.br = "br";
......
......@@ -838,6 +838,8 @@ var _cmsActions = new _Action("x_cms_assemble_control", {
var _portalActions = new _Action("x_portal_assemble_surface", {
"getScript": {"uri": "/jaxrs/script/portal/{portal}/name/{ }","method": "POST"}
});
bind.processActions = _processActions;
bind.cmsActions = _cmsActions;
//include 引用脚本
//optionsOrName : {
......@@ -1006,7 +1008,8 @@ var _createDict = function(application){
};
bind.exec = _exec;
bind.include = _include;
bind.Dict = _createDict();
var work = wrapWorkContext.getWork();
bind.Dict = _createDict((work) ? work.application : "");
try{
oPrint = oPrint;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册