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

修正根据路径转发的一些bug

huqi 5 лет назад
Родитель
Сommit
7f4046dacc

+ 2 - 0
o2web/source/o2_core/o2/widget/O2Identity.js

@@ -138,6 +138,8 @@ o2.widget.O2Identity = new Class({
             this.action.getAddress();
             uri = this.action.address+uri;
 
+            uri = o2.filterUrl(uri);
+
             img = "<img width='50' height='50' border='0' src='"+uri+"' style='border-radius:25px'/>";
 
             var picNode = new Element("div", {

+ 1 - 1
o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.js

@@ -28,7 +28,7 @@ MWF.xAction.RestActions.Action["x_organization_assemble_control"] = new Class({
         var uri = "/jaxrs/person/{flag}/icon";
         uri = uri.replace("{flag}", id);
         this.action.getAddress();
-        return this.action.address+uri+"?"+(new Date()).getTime();
+        return o2.filterUrl(this.action.address+uri+"?"+(new Date()).getTime());
     },
 
 

+ 1 - 1
o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.js

@@ -11,7 +11,7 @@ MWF.xAction.RestActions.Action["x_organization_assemble_personal"] = new Class({
     getPersonIcon: function(id){
         var uri = "/jaxrs/person/icon";
         this.action.getAddress();
-        return this.action.address+uri+"?"+(new Date()).getTime();
+        return o2.filterUrl(this.action.address+uri+"?"+(new Date()).getTime());
     },
     getIcon: function(person){
         var uri = "/jaxrs/icon/"+person;

+ 6 - 6
o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.js

@@ -40,7 +40,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_surface"] = new Class
             var url = this.action.actions.getAttachmentData.uri;
             url = url.replace("{id}", encodeURIComponent(id));
             url = url.replace("{workid}", encodeURIComponent(workid));
-            window.open(this.action.address+url);
+            window.open(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
     getWorkcompletedAttachmentData: function(id, workid){
@@ -48,7 +48,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_surface"] = new Class
             var url = this.action.actions.getWorkcompletedAttachmentData.uri;
             url = url.replace("{id}", encodeURIComponent(id));
             url = url.replace("{workCompletedId}", encodeURIComponent(workid));
-            window.open(this.action.address+url);
+            window.open(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
     getAttachmentStream: function(id, workid){
@@ -56,7 +56,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_surface"] = new Class
             var url = this.action.actions.getAttachmentStream.uri;
             url = url.replace("{id}", encodeURIComponent(id));
             url = url.replace("{workid}", encodeURIComponent(workid));
-            window.open(this.action.address+url);
+            window.open(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
     getWorkcompletedAttachmentStream: function(id, workid){
@@ -64,7 +64,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_surface"] = new Class
             var url = this.action.actions.getWorkcompletedAttachmentStream.uri;
             url = url.replace("{id}", encodeURIComponent(id));
             url = url.replace("{workCompletedId}", encodeURIComponent(workid));
-            window.open(this.action.address+url);
+            window.open(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
 
@@ -73,7 +73,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_surface"] = new Class
             var url = this.action.actions.getAttachmentData.uri;
             url = url.replace("{id}", encodeURIComponent(id));
             url = url.replace("{workid}", encodeURIComponent(workid));
-            if (callback) callback(this.action.address+url);
+            if (callback) callback(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
     getAttachmentWorkcompletedUrl: function(id, workid, callback){
@@ -81,7 +81,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_surface"] = new Class
             var url = this.action.actions.getWorkcompletedAttachmentData.uri;
             url = url.replace("{id}", encodeURIComponent(id));
             url = url.replace("{workCompletedId}", encodeURIComponent(workid));
-            if (callback) callback(this.action.address+url);
+            if (callback) callback(o2.filterUrl(this.action.address+url));
         }.bind(this));
     },
     getWorkDataByPath: function(id, path, success, failure, async){

+ 1 - 0
o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js

@@ -369,6 +369,7 @@ MWF.xDesktop.Actions.RestActions = new Class({
     },
 
 	invokeFormData: function(method, uri, data, file, callback, async, progress){
+        uri = o2.filterUrl(uri);
 		var xhr = new COMMON.Browser.Request();
 		if(file){
             data.append('fileName', file.name);

+ 1 - 1
o2web/source/x_component_process_Xform/Attachment.js

@@ -765,7 +765,7 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
             var imgNode = new Element("img", { "styles": css.attachmentOCRImageNode }).inject(previewNode);
 
             o2.Actions.get("x_processplatform_assemble_surface").getAttachmentUrl(att.data.id, this.module.form.businessData.work.id, function (url) {
-                imgNode.set("src", url);
+                imgNode.set("src", o2.filterUrl(url));
             });
 
             var areaNode = new Element("div", { "styles": css.attachmentOCRInputAreaNode }).inject(node);

+ 2 - 1
o2web/source/x_component_process_Xform/Form.js

@@ -2660,7 +2660,8 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         }.bind(this), null, false);
         htmlFormId = htmlFormId.replace("#", "%23");
         var url = "/x_processplatform_assemble_surface/jaxrs/attachment/batch/download/work/" + this.businessData.work.id + "/site/(0)/stream";
-        window.open(o2.Actions.getHost("x_processplatform_assemble_surface") + url + "?fileName=&flag=" + htmlFormId);
+        url = o2.filterUrl(o2.Actions.getHost("x_processplatform_assemble_surface") + url);
+        window.open( url + "?fileName=&flag=" + htmlFormId);
     },
     resetWork: function () {
         if (!this.businessData.control["allowReset"]) {

+ 1 - 1
o2web/source/x_component_process_Xform/Log.js

@@ -1590,7 +1590,7 @@ MWF.xApplication.process.Xform.Log = MWF.APPLog =  new Class({
             url = url.replace("{workid}", this.form.businessData.work.id);
         }
         url = action.action.address+url;
-        return url;
+        return o2.filterUrl(url);
     },
     loadMediaOpinion_image_tooltip : function(att, node){
         var iconNode = new Element("div", {"styles": this.form.css.logMediaIcon}).inject(node.getParent());