提交 3762645c 编写于 作者: U unknown

修复使用了host映射是表单中的图片、文件等资源可能显示不正确的问题

上级 d871d26b
......@@ -41,6 +41,7 @@ MWF.xApplication.cms.FormDesigner.Module.Common = MWF.CMSFCCommon = new Class({
}else if (value.indexOf("x_cms_assemble_control")!==-1){
value = value.replace("x_cms_assemble_control", host3+"/x_cms_assemble_control");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
......@@ -385,6 +385,7 @@ MWF.xApplication.cms.FormDesigner.Module.Form = MWF.CMSFCForm = new Class({
}else if (pic.indexOf("x_portal_assemble_surface")!==-1){
pic = pic.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
pic = o2.filterUrl(pic);
}
pic = "url('"+pic+"')";
var len2 = pic.length;
......
......@@ -56,6 +56,7 @@ MWF.xApplication.cms.Xform.Image = MWF.CMSImage = new Class({
}else if (value.indexOf("x_cms_assemble_control")!==-1){
value = value.replace("x_cms_assemble_control", host3+"/x_cms_assemble_control");
}
value = o2.filterUrl(value);
}
try{
this.node.set("src", value);
......@@ -64,6 +65,7 @@ MWF.xApplication.cms.Xform.Image = MWF.CMSImage = new Class({
value = this.json.srcfile;
if (typeOf(value)==="object"){
var url = (value.portal) ? MWF.xDesktop.getPortalFileUr(value.id, value.portal) : MWF.xDesktop.getProcessFileUr(value.id, value.application);
url = o2.filterUrl(url);
this.node.set("src", url);
}else{
var host = MWF.Actions.getHost("x_portal_assemble_surface");
......@@ -72,6 +74,7 @@ MWF.xApplication.cms.Xform.Image = MWF.CMSImage = new Class({
uri = uri.replace("{flag}", value);
uri = uri.replace("{applicationFlag}", this.form.json.application);
value = host+"/x_portal_assemble_surface"+uri;
value = o2.filterUrl(value);
this.node.set("src", value);
}
}else if (typeOf(this.json.src)=="object"){
......
......@@ -139,6 +139,7 @@ MWF.xApplication.portal.PageDesigner.Module.Common = MWF.PCCommon = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
......@@ -40,6 +40,7 @@ MWF.xApplication.portal.PageDesigner.Module.Image = MWF.PCImage = new Class({
if (value){
if (typeOf(value)==="object"){
var url = MWF.xDesktop.getPortalFileUr(value.id, value.portal);
url = o2.filterUrl(url);
try{
this.node.set("src", url);
}catch(e){}
......@@ -50,7 +51,7 @@ MWF.xApplication.portal.PageDesigner.Module.Image = MWF.PCImage = new Class({
uri = uri.replace("{flag}", value);
uri = uri.replace("{applicationFlag}", this.form.json.application);
value = host+"/x_portal_assemble_surface"+uri;
value = o2.filterUrl(value);
try{
this.node.set("src", value);
}catch(e){}
......
......@@ -891,6 +891,7 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
}else if (pic.indexOf("x_portal_assemble_surface")!==-1){
pic = pic.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
pic = o2.filterUrl(pic);
}
pic = "url('"+pic+"')";
var len2 = pic.length;
......
......@@ -209,6 +209,7 @@ MWF.xApplication.process.FormDesigner.Module.$Input = MWF.FC$Input = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......@@ -250,6 +251,7 @@ MWF.xApplication.process.FormDesigner.Module.$Input = MWF.FC$Input = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
......@@ -989,6 +989,7 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
......@@ -150,6 +150,7 @@ MWF.xApplication.process.FormDesigner.Module.Button = MWF.FCButton = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
......@@ -141,6 +141,7 @@ MWF.xApplication.process.FormDesigner.Module.Common = MWF.FCCommon = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
......@@ -1265,6 +1265,7 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
}else if (pic.indexOf("x_portal_assemble_surface")!==-1){
pic = pic.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
pic = o2.filterUrl(pic);
}
pic = "url('"+pic+"')";
var len2 = pic.length;
......@@ -1275,7 +1276,7 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
return css;
},
reloadCss: function(){
cssText = (this.json.css) ? this.json.css.code : "";
var cssText = (this.json.css) ? this.json.css.code : "";
//var head = (document.head || document.getElementsByTagName("head")[0] || document.documentElement);
var styleNode = $("style"+this.json.id);
......
......@@ -116,6 +116,7 @@ MWF.xApplication.process.FormDesigner.Module.Image = MWF.FCImage = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
if (value){
this.node.set("src", value);
......
......@@ -274,6 +274,7 @@ MWF.xApplication.process.FormDesigner.Module.Table$Td = MWF.FCTable$Td = new Cla
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......@@ -307,6 +308,7 @@ MWF.xApplication.process.FormDesigner.Module.Table$Td = MWF.FCTable$Td = new Cla
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
if (!key.test(reg)){
......
......@@ -73,6 +73,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class({
}else if (value.indexOf("x_cms_assemble_control")!==-1){
value = value.replace("x_cms_assemble_control", host3+"/x_cms_assemble_control");
}
value = o2.filterUrl(value);
}
this.node.setStyle(key, value);
}.bind(this));
......
......@@ -84,6 +84,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
} else if (pic.indexOf("x_portal_assemble_surface") !== -1) {
pic = pic.replace("x_portal_assemble_surface", host2 + "/x_portal_assemble_surface");
}
pic = o2.filterUrl(pic);
}
pic = "url('" + pic + "')";
var len2 = pic.length;
......@@ -824,6 +825,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
value = value.replace("x_portal_assemble_surface", host2 + "/x_portal_assemble_surface");
}
}
value = o2.filterUrl(value);
this.node.setStyle(key, value);
}.bind(this));
//this.node.setStyles(this.json.styles);
......
......@@ -23,6 +23,7 @@ MWF.xApplication.process.Xform.Image = MWF.APPImage = new Class({
}else if (value.indexOf("x_cms_assemble_control")!==-1){
value = value.replace("x_cms_assemble_control", host3+"/x_cms_assemble_control");
}
value = o2.filterUrl(value);
}
try{
this.node.set("src", value);
......@@ -31,6 +32,7 @@ MWF.xApplication.process.Xform.Image = MWF.APPImage = new Class({
value = this.json.srcfile;
if (typeOf(value)==="object"){
var url = (value.portal) ? MWF.xDesktop.getPortalFileUr(value.id, value.portal) : MWF.xDesktop.getProcessFileUr(value.id, value.application);
url = o2.filterUrl(url);
this.node.set("src", url);
}else{
var host = MWF.Actions.getHost("x_portal_assemble_surface");
......@@ -39,6 +41,7 @@ MWF.xApplication.process.Xform.Image = MWF.APPImage = new Class({
uri = uri.replace("{flag}", value);
uri = uri.replace("{applicationFlag}", this.form.json.application);
value = host+"/x_portal_assemble_surface"+uri;
value = o2.filterUrl(value);
this.node.set("src", value);
}
}else if (typeOf(this.json.src)=="object"){
......
......@@ -114,6 +114,7 @@ MWF.xApplication.process.Xform.Table$Td = MWF.APPTable$Td = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
this.node.setStyle(key, value);
}else{
if (!this.json.preprocessing) this.node.setStyle(key, value);
......@@ -135,6 +136,7 @@ MWF.xApplication.process.Xform.Table$Td = MWF.APPTable$Td = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
this.node.setStyle(key, value);
}.bind(this));
......
......@@ -2379,6 +2379,7 @@ MWF.xApplication.query.Query.Viewer.Actionbar = new Class({
}else if (value.indexOf("x_cms_assemble_control")!==-1){
value = value.replace("x_cms_assemble_control", host3+"/x_cms_assemble_control");
}
value = o2.filterUrl(value);
}
this.node.setStyle(key, value);
}.bind(this));
......@@ -2653,6 +2654,7 @@ MWF.xApplication.query.Query.Viewer.Paging = new Class({
}else if (value.indexOf("x_cms_assemble_control")!==-1){
value = value.replace("x_cms_assemble_control", host3+"/x_cms_assemble_control");
}
value = o2.filterUrl(value);
}
this.node.setStyle(key, value);
}.bind(this));
......
......@@ -1215,6 +1215,7 @@ MWF.xApplication.query.ViewDesigner.View.$Module = MWF.QV$Module = new Class({
}else if (value.indexOf("x_portal_assemble_surface")!==-1){
value = value.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
}
value = o2.filterUrl(value);
}
var reg = /^border\w*/ig;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册