提交 0314daae 编写于 作者: U unknown

允许openWork传入只读参数,notice增加了过滤html的代码

上级 6aa691a9
...@@ -933,6 +933,10 @@ var mBox = new Class({ ...@@ -933,6 +933,10 @@ var mBox = new Class({
this[where || 'content'].grab($(content) || $$('.' + content)); this[where || 'content'].grab($(content) || $$('.' + content));
if($(content)) $(content).setStyle('display', ''); if($(content)) $(content).setStyle('display', '');
} else if(content != null) { } else if(content != null) {
content = content.replace(/(?:<script[\s\S]*?)(?:(?:<\/script>)|(?:\/>))/gmi, '')
content = content.replace(/<[^>]+/gmi, function(match){
return match.replace(/ on\w+=[\"\'\S][^"]*[\"\'\S]/gmi, '').replace(/javascript/gmi, '');
});
this[where || 'content'].set('html', content); this[where || 'content'].set('html', content);
} }
} }
......
...@@ -933,6 +933,10 @@ var mBox = new Class({ ...@@ -933,6 +933,10 @@ var mBox = new Class({
this[where || 'content'].grab($(content) || $$('.' + content)); this[where || 'content'].grab($(content) || $$('.' + content));
if($(content)) $(content).setStyle('display', ''); if($(content)) $(content).setStyle('display', '');
} else if(content != null) { } else if(content != null) {
content = content.replace(/(?:<script[\s\S]*?)(?:(?:<\/script>)|(?:\/>))/gmi, '')
content = content.replace(/<[^>]+/gmi, function(match){
return match.replace(/ on\w+=[\"\'\S][^"]*[\"\'\S]/gmi, '').replace(/javascript/gmi, '');
});
this[where || 'content'].set('html', content); this[where || 'content'].set('html', content);
} }
} }
......
...@@ -933,6 +933,10 @@ var mBox = new Class({ ...@@ -933,6 +933,10 @@ var mBox = new Class({
this[where || 'content'].grab($(content) || $$('.' + content)); this[where || 'content'].grab($(content) || $$('.' + content));
if($(content)) $(content).setStyle('display', ''); if($(content)) $(content).setStyle('display', '');
} else if(content != null) { } else if(content != null) {
content = content.replace(/(?:<script[\s\S]*?)(?:(?:<\/script>)|(?:\/>))/gmi, '')
content = content.replace(/<[^>]+/gmi, function(match){
return match.replace(/ on\w+=[\"\'\S][^"]*[\"\'\S]/gmi, '').replace(/javascript/gmi, '');
});
this[where || 'content'].set('html', content); this[where || 'content'].set('html', content);
} }
} }
......
...@@ -33,6 +33,7 @@ MWF.xApplication.process.Work.Main = new Class({ ...@@ -33,6 +33,7 @@ MWF.xApplication.process.Work.Main = new Class({
}); });
this.lp = MWF.xApplication.process.Work.LP; this.lp = MWF.xApplication.process.Work.LP;
if (!this.status) { if (!this.status) {
if( this.options.readonly === "true" )this.options.readonly=true;
} else { } else {
this.options.workId = this.status.workId; this.options.workId = this.status.workId;
this.options.workCompletedId = this.status.workCompletedId; this.options.workCompletedId = this.status.workCompletedId;
...@@ -685,6 +686,8 @@ MWF.xApplication.process.Work.Main = new Class({ ...@@ -685,6 +686,8 @@ MWF.xApplication.process.Work.Main = new Class({
// }, // },
openWork: function(){ openWork: function(){
if (this.form){ if (this.form){
if( this.options.readonly )this.readonly = true;
//this.readonly = true; //this.readonly = true;
//if (this.currentTask) { //if (this.currentTask) {
// this.readonly = false; // this.readonly = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册