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

Merge branch 'fix/doc_templete' into 'wrdp'

公文模板附注部分的绑定修复

See merge request o2oa/o2oa!4639
......@@ -261,6 +261,11 @@
</tr>
</table>
</div>
<div class="doc_block">
<p class=MsoNormal>
<span style='mso-bidi-font-size:16.0pt;font-family:仿宋;'>  </span><span class="doc_layout_annotation" style='font-size:16.0pt;font-family:仿宋;letter-spacing:-0.4pt'></span>
</p>
</div>
<div class="doc_block doc_layout_editionArea">
<P class=MsoNormal style='font-size:16.0pt;font-family:仿宋'><span>&nbsp</span></P>
......
......@@ -224,6 +224,11 @@
data-mso-position-horizontal-relative="margin" data-mso-position-vertical-relative="paragraph"
style="border:1px solid #cccccc; border-radius: 100px; position: absolute; top:-88pt; left:290pt;">
</p>
<div class="doc_block">
<p class=MsoNormal>
<span style='mso-bidi-font-size:16.0pt;font-family:仿宋;'>  </span><span class="doc_layout_annotation" style='font-size:16.0pt;font-family:仿宋;letter-spacing:-0.4pt'></span>
</p>
</div>
</div>
......@@ -281,6 +281,11 @@ AAAAAAAAAAAAAAAnBAAAZHJzL2Rvd25yZXYueG1sUEsFBgAAAAAEAAQA8wAAAC4FAAAAAA==
</tr>
</table>
</div>
<div class="doc_block">
<p class=MsoNormal>
<span style='mso-bidi-font-size:16.0pt;font-family:仿宋;'>  </span><span class="doc_layout_annotation" style='font-size:16.0pt;font-family:仿宋;letter-spacing:-0.4pt'></span>
</p>
</div>
<div class="doc_block doc_layout_editionArea">
<P class=MsoNormal style='font-size:16.0pt;font-family:仿宋'><span>&nbsp</span></P>
......
......@@ -283,6 +283,12 @@
</tr>
</table>
</div>
<div class="doc_block">
<p class=MsoNormal>
<span style='mso-bidi-font-size:16.0pt;font-family:仿宋;'>  </span><span class="doc_layout_annotation" style='font-size:16.0pt;font-family:仿宋;letter-spacing:-0.4pt'></span>
</p>
</div>
<div class="doc_block doc_layout_editionArea">
<P class=MsoNormal style='font-size:16.0pt;font-family:仿宋'><span>&nbsp</span></P>
......
......@@ -2679,6 +2679,15 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this[dom].set("html", (this.data[name] || ""));
}else if (dom=="layout_attachment"){
this.setAttachmentData();
}else if (dom=="layout_annotation"){
var annotation = this.data[name];
if (annotation){
if (annotation.substring(0, 1)!=="") annotation = ""+annotation;
if (annotation.substring(annotation.length-1, annotation.length)!=="") annotation = annotation+"";
this[dom].set("text", annotation);
}else{
this[dom].set("text", " ");
}
}else{
this[dom].set("text", this.data[name]|| "");
}
......@@ -2969,7 +2978,12 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
if (this.layout_issuanceUnit) this.data.issuanceUnit = this.layout_issuanceUnit.get("html");
if (this.layout_issuanceDate) this.data.issuanceDate = this.layout_issuanceDate.get("text");
if (this.layout_annotation) this.data.annotation = this.layout_annotation.get("text");
if (this.layout_annotation){
var annotation = this.layout_annotation.get("text");
if (annotation.substring(0,1)=="") annotation = annotation.substring(1, annotation.length);
if (annotation.substring(annotation.length-1, annotation.length)=="") annotation = annotation.substring(0, annotation.length-1);
this.data.annotation = annotation;
}
if (this.layout_copytoTitle) this.data.copytoTitle = this.layout_copytoTitle.get("text");
if (this.layout_copytoContent) this.data.copyto = this.layout_copytoContent.get("text");
if (this.layout_copyto2Title) this.data.copyto2Title = this.layout_copyto2Title.get("text");
......@@ -3093,7 +3107,16 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if (this.layout_issuanceUnit) this.layout_issuanceUnit.set("html", data.issuanceUnit || " ");
if (this.layout_issuanceDate) this.layout_issuanceDate.set("text", data.issuanceDate || " ");
if (this.layout_annotation) this.layout_annotation.set("text", data.annotation || " ");
if (this.layout_annotation){
var annotation = data.annotation;
if (annotation){
if (annotation.substring(0, 1)!=="") annotation = ""+annotation;
if (annotation.substring(annotation.length-1, annotation.length)!=="") annotation = annotation+"";
this.layout_annotation.set("text", annotation);
}else{
this.layout_annotation.set("text", " ");
}
}
if (this.layout_copytoTitle) this.layout_copytoTitle.set("text", data.copytoTitle || " ");
if (this.layout_copytoContent) this.layout_copytoContent.set("text", data.copyto || " ");
if (this.layout_copyto2Title) this.layout_copyto2Title.set("text", data.copyto2Title || " ");
......
......@@ -897,54 +897,85 @@ bind.parameters = {
}
};
//bind.parameters = this.parameters || null;
bind.response = (function(){
var _self = this;
if (this.jaxrsResponse){
if (this.jaxrsResponse.get()){
var value = this.jaxrsResponse.get();
if (JSON.validate(value)){
return {
"status": this.jaxrsResponse.status,
"value": JSON.decode(value),
"get": function(){ JSON.decode(value) }
};
}else{
return {
"status": this.jaxrsResponse.status,
"value": value,
"get": function(){ return value; }
};
}
}else{
return {
"status": this.jaxrsResponse.status,
"value": this.jaxrsResponse.value,
"get": function(){ return _self.jaxrsResponse.value; }
};
var response = {};
Object.defineProperty(response, "status", {enumerable: true,configurable: true,
get: function(){ return _self.jaxrsResponse.status; }
});
Object.defineProperty(response, "value", {enumerable: true,configurable: true,
get: function(){
if (_self.jaxrsResponse){
return _self.jaxrsResponse.get();
}else if(_self.jaxwsResponse){
return _self.jaxwsResponse;
}
}else{
return {
"get": function(){
return _self.jaxwsResponse || null;
// if (_self.jaxwsResponse && _self.jaxwsResponse.get()){
// if (JSON.validate(_self.jaxwsResponse.get())){
// return {
// "status": _self.jaxwsResponse.status,
// "value": JSON.decode(_self.jaxwsResponse.get())
// };
// }else{
// return {
// "status": _self.jaxwsResponse.status,
// "value": _self.jaxwsResponse.value
// };
// }
// }else{
// return {"status": _self.jaxwsResponse.status};
// }
}
});
Object.defineProperty(response, "get", {enumerable: true,configurable: true,
get: function(){
return function(){
if (_self.jaxrsResponse){
var value = _self.jaxrsResponse.get();
if (JSON.validate(value)){
return JSON.decode(value);
}
return value;
}else if(_self.jaxwsResponse){
return _self.jaxwsResponse || null
}
}
};
}
}).apply(this);
});
bind.response = response;
// bind.response = (function(){
// // var _self = this;
// // if (this.jaxrsResponse){
// if (this.jaxrsResponse.get()){
// var value = this.jaxrsResponse.get();
// if (JSON.validate(value)){
// return {
// "status": this.jaxrsResponse.status,
// "value": JSON.decode(value),
// "get": function(){ JSON.decode(value) }
// };
// }else{
// return {
// "status": this.jaxrsResponse.status,
// "value": value,
// "get": function(){ return value; }
// };
// }
// }else{
// return {
// "status": this.jaxrsResponse.status,
// "value": this.jaxrsResponse.value,
// "get": function(){ return _self.jaxrsResponse.value; }
// };
// }
// }else{
// return {
// "get": function(){
// return _self.jaxwsResponse || null;
// // if (_self.jaxwsResponse && _self.jaxwsResponse.get()){
// // if (JSON.validate(_self.jaxwsResponse.get())){
// // return {
// // "status": _self.jaxwsResponse.status,
// // "value": JSON.decode(_self.jaxwsResponse.get())
// // };
// // }else{
// // return {
// // "status": _self.jaxwsResponse.status,
// // "value": _self.jaxwsResponse.value
// // };
// // }
// // }else{
// // return {"status": _self.jaxwsResponse.status};
// // }
// }
// }
// }
// }).apply(this);
bind.assginData = {
"data": null,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册