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

版式正文编辑标题和发文单位时,不允许为空

上级 87fa3359
......@@ -866,18 +866,41 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
if (this.layout_subject){
if (!this.json.subjectValueData && this.json.subjectValueType=="data"){
this.layout_subject.set("contenteditable", control.subject);
this.layout_subject.addEvent("blur", function(){
this.getData();
}.bind(this))
// this.layout_subject.addEvent("blur", function(){
// this.getData();
// }.bind(this))
this.layout_subject.addEvent("blur", function(e){
var subject = this.layout_subject.get("text");
if (!subject){
this.layout_subject.set("html", this.data.subject);
this.form.app.notice(MWF.xApplication.process.Xform.LP.subjectEmpty, "error", this.layout_subject, {"x": "center","y":"top"}, {"x": 0,"y":60});
e.preventDefault();
e.stopPropagation();
}else{
this.getData();
}
}.bind(this));
}
}
if (this.layout_issuanceUnit){
if (!this.json.issuanceUnitValueData && this.json.issuanceUnitValueType=="data"){
this.layout_issuanceUnit.set("contenteditable", control.issuanceUnit);
this.layout_issuanceUnit.addEvent("blur", function(){
this.getData();
}.bind(this))
// this.layout_issuanceUnit.addEvent("blur", function(){
// this.getData();
// }.bind(this))
this.layout_issuanceUnit.addEvent("blur", function(e){
var issuanceUnit = this.layout_issuanceUnit.get("text");
if (!issuanceUnit){
this.layout_issuanceUnit.set("html", this.data.issuanceUnit);
this.form.app.notice(MWF.xApplication.process.Xform.LP.issuanceUnitEmpty, "error", this.layout_issuanceUnit, {"x": "center","y":"top"}, {"x": 0,"y":60});
e.preventDefault();
e.stopPropagation();
}else{
this.getData();
}
}.bind(this));
}
}
......
......@@ -233,6 +233,8 @@ MWF.xApplication.process.Xform.LP = {
"original": "原始版本",
"nodiff": "目前还没有历史修改信息"
},
"subjectEmpty": "标题不能为空",
"issuanceUnitEmpty": "发文单位不能为空",
"fullWidth": "已启用半角空格自动转换为全角空格,如需输入半角空格,请使用:SHIFT+空格"
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册