提交 3f7a620c 编写于 作者: 蔡祥熠

Merge branch 'hotfix/merge' into 'master'

Merge of hotfix/merge 修复合并区段阅读状态流转可能报错的问题,修复页面application嵌入系统设置时的问题 to develop

See merge request o2oa/o2oa!1052
...@@ -236,12 +236,11 @@ MWF.xApplication.portal.PageDesigner.Module.Application = MWF.PCApplication = ne ...@@ -236,12 +236,11 @@ MWF.xApplication.portal.PageDesigner.Module.Application = MWF.PCApplication = ne
clazz = clazz[a]; clazz = clazz[a];
}); });
clazz.options = clazz.options || {}; clazz.options = clazz.options || {};
try{
MWF.xDesktop.requireApp(app, "lp."+o2.language, null, false); var _load = function () {
MWF.xDesktop.requireApp(app, "Main", null, false);
if( clazz.Main ){ if( clazz.Main ){
var opt = options || {}; var opt = options || {};
opt.embededParent = this.node; opt.embededParent = new Element("div").inject(this.node);
this.application = new clazz.Main(this.form.designer.desktop, opt); this.application = new clazz.Main(this.form.designer.desktop, opt);
this.application.status = status; this.application.status = status;
this.application.load(); this.application.load();
...@@ -250,6 +249,19 @@ MWF.xApplication.portal.PageDesigner.Module.Application = MWF.PCApplication = ne ...@@ -250,6 +249,19 @@ MWF.xApplication.portal.PageDesigner.Module.Application = MWF.PCApplication = ne
}else{ }else{
this.form.designer.notice(this.form.designer.lp.applicationNotFound+":"+app, "error"); this.form.designer.notice(this.form.designer.lp.applicationNotFound+":"+app, "error");
} }
}.bind(this);
try{
MWF.xDesktop.requireApp(app, "lp."+o2.language, null, false);
MWF.xDesktop.requireApp(app, "Main", null, false);
if (clazz.loading && clazz.loading.then){
clazz.loading.then(function(){
_load();
});
}else{
_load();
}
}catch (e) { }catch (e) {
this.form.designer.notice( e.message, "error" ); this.form.designer.notice( e.message, "error" );
} }
......
...@@ -9,7 +9,7 @@ Object.assign(o2.APP$Elinput.prototype, o2.APP$Input.prototype); ...@@ -9,7 +9,7 @@ Object.assign(o2.APP$Elinput.prototype, o2.APP$Input.prototype);
Object.assign(o2.APP$Elinput.prototype, { Object.assign(o2.APP$Elinput.prototype, {
isReadonly : function(){ isReadonly : function(){
return !!(this.readonly || this.json.isReadonly || this.form.json.isReadonly); return !!(this.readonly || this.json.isReadonly || this.form.json.isReadonly || this.isSectionMergeRead());
}, },
__setValue: function(value){ __setValue: function(value){
this.moduleValueAG = null; this.moduleValueAG = null;
......
...@@ -290,7 +290,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class( ...@@ -290,7 +290,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
* @return {Boolean} 是否只读. * @return {Boolean} 是否只读.
*/ */
isReadonly : function(){ isReadonly : function(){
return !!(this.readonly || this.json.isReadonly || this.form.json.isReadonly); return !!(this.readonly || this.json.isReadonly || this.form.json.isReadonly || this.isSectionMergeRead());
}, },
getTextData: function(){ getTextData: function(){
//var value = this.node.get("value"); //var value = this.node.get("value");
......
...@@ -247,7 +247,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class( ...@@ -247,7 +247,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
return null; return null;
}, },
isReadonly : function(){ isReadonly : function(){
return !!(this.readonly || this.json.isReadonly || this.form.json.isReadonly); return !!(this.readonly || this.json.isReadonly || this.form.json.isReadonly || this.isSectionMergeRead());
}, },
isAllSectionShow: function(){ isAllSectionShow: function(){
return this.json.showAllSection && this.json.section === "yes" && this.isSectionData(); return this.json.showAllSection && this.json.section === "yes" && this.isSectionData();
......
...@@ -78,7 +78,6 @@ MWF.xApplication.process.Xform.Application = MWF.APPApplication = new Class( ...@@ -78,7 +78,6 @@ MWF.xApplication.process.Xform.Application = MWF.APPApplication = new Class(
var status = this.getComponentStatus() || {}; var status = this.getComponentStatus() || {};
var options = this.getComponentOptions() || {}; var options = this.getComponentOptions() || {};
this.getComponentPath(function (componentPath) { this.getComponentPath(function (componentPath) {
debugger;
if( componentPath.indexOf("@url:") === 0 ){ if( componentPath.indexOf("@url:") === 0 ){
this.loadIframe( componentPath.substring(5, componentPath.length ) ); this.loadIframe( componentPath.substring(5, componentPath.length ) );
}else{ }else{
...@@ -133,9 +132,8 @@ MWF.xApplication.process.Xform.Application = MWF.APPApplication = new Class( ...@@ -133,9 +132,8 @@ MWF.xApplication.process.Xform.Application = MWF.APPApplication = new Class(
clazz = clazz[a]; clazz = clazz[a];
}); });
clazz.options = clazz.options || {}; clazz.options = clazz.options || {};
try{
MWF.xDesktop.requireApp(path, "lp."+o2.language, null, false); var _load = function () {
MWF.xDesktop.requireApp(path, "Main", null, false);
if( clazz.Main ){ if( clazz.Main ){
var opt = options || {}; var opt = options || {};
var stt = status || {}; var stt = status || {};
...@@ -162,6 +160,18 @@ MWF.xApplication.process.Xform.Application = MWF.APPApplication = new Class( ...@@ -162,6 +160,18 @@ MWF.xApplication.process.Xform.Application = MWF.APPApplication = new Class(
}else{ }else{
this.form.app.notice(this.form.app.lp.applicationNotFound+":"+path, "error"); this.form.app.notice(this.form.app.lp.applicationNotFound+":"+path, "error");
} }
}.bind(this);
try{
MWF.xDesktop.requireApp(path, "lp."+o2.language, null, false);
MWF.xDesktop.requireApp(path, "Main", null, false);
if (clazz.loading && clazz.loading.then){
clazz.loading.then(function(){
_load();
});
}else{
_load();
}
}catch (e) { }catch (e) {
this.form.app.notice( e.message, "error" ); this.form.app.notice( e.message, "error" );
} }
......
...@@ -136,11 +136,11 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class( ...@@ -136,11 +136,11 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class(
if( this.json.isReadonly === "script" ){ if( this.json.isReadonly === "script" ){
if( this.json.readonlyScript && this.json.readonlyScript.code ){ if( this.json.readonlyScript && this.json.readonlyScript.code ){
readonly = this.form.Macro.exec(this.json.readonlyScript.code, this); readonly = this.form.Macro.exec(this.json.readonlyScript.code, this);
return !!readonly;
} }
}else{ }else{
return !!this.json.isReadonly readonly = !!this.json.isReadonly
} }
return readonly || !!this.isSectionMergeRead();
}, },
getTextData: function(){ getTextData: function(){
//var value = this.node.get("value"); //var value = this.node.get("value");
......
...@@ -41,7 +41,7 @@ MWF.xApplication.process.Xform.Textfield = MWF.APPTextfield = new Class({ ...@@ -41,7 +41,7 @@ MWF.xApplication.process.Xform.Textfield = MWF.APPTextfield = new Class({
loadDescription: function(){ loadDescription: function(){
if (this.isReadonly())return; if (this.isReadonly())return;
var v = this._getBusinessData(); var v = this._getBusinessData();
if (!v){ if (!v && v!==0){
if (this.json.description){ if (this.json.description){
var size = this.node.getFirst().getSize(); var size = this.node.getFirst().getSize();
var w = size.x-3; var w = size.x-3;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册