Просмотр исходного кода

Merge branch 'fix/window_close' into 'develop'

Merge of fix/window_close to develop 版式文件标题编辑

See merge request o2oa/o2oa!843
胡起 5 лет назад
Родитель
Сommit
caa5c48d38

+ 2 - 0
o2web/source/x_component_process_FormDesigner/Module/Documenteditor/documenteditor.html

@@ -505,6 +505,8 @@
 						<input class="editTableRadio" onclick="if (this.checked) {$('text{$.pid}subjectEditScriptArea').setStyle('display', 'none')}" name="subjectEdit" text{($.subjectEdit=='y')?'checked':''} type="radio" value="y"/>允许
 						<input class="editTableRadio" onclick="if (this.checked) {$('text{$.pid}subjectEditScriptArea').setStyle('display', 'none')}" name="subjectEdit" text{($.subjectEdit!='y' && $.subjectEdit!='s')?'checked':''} type="radio" value="n"/>不允许
 						<input class="editTableRadio" onclick="if (this.checked) {$('text{$.pid}subjectEditScriptArea').setStyle('display', 'block')}" name="subjectEdit" text{($.subjectEdit=='s')?'checked':''} type="radio" value="s"/>根据脚本
+						<br>
+						标题允许编辑时,请不要绑定数据
 					</td>
 				</tr>
 			</table>

+ 7 - 1
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -659,7 +659,12 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
     reSetEdit: function(control){
         //未进行数据绑定时,可允许编辑
         if (!control) var control = this.getEditControl();
-        if (!!this.json.subjectValueData && this.json.subjectValueType=="data") this.layout_subject.set("contenteditable", control.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("keydown", function(e){
         //     debugger;
@@ -1938,6 +1943,7 @@ debugger;
     },
     getData: function(){
         //if (this.editMode){
+        debugger;
         if (this.layout_copies) this.data.copies = this.layout_copies.get("text");
         if (this.layout_secret) this.data.secret = this.layout_secret.get("text");
         if (this.layout_priority) this.data.priority = this.layout_priority.get("text");