Răsfoiți Sursa

修复首页热点图片打不开论坛帖子的问题

unknown 5 ani în urmă
părinte
comite
d5a83995dc
1 a modificat fișierele cu 32 adăugiri și 4 ștergeri
  1. 32 4
      o2web/source/x_component_Homepage/InforContent.js

+ 32 - 4
o2web/source/x_component_Homepage/InforContent.js

@@ -426,10 +426,38 @@ MWF.xApplication.Homepage.InforContent.AllInfor = new Class({
         }
     },
 
-    open: function(e, d){
-        var id = d.infoId || d.id;
-        var options = {"documentId": id, "docTitle": d.title, "appId": "cms.Document"+id};
-        layout.openApplication(e, "cms.Document", options);
+    open: function(e, data){
+
+        var id = data.infoId || data.id;
+        // var options = {"documentId": id, "docTitle": d.title, "appId": "cms.Document"+id};
+        // layout.openApplication(e, "cms.Document", options);
+
+        if( data.application == "BBS" ){
+            var appId = "ForumDocument"+data.infoId;
+            if (this.app.desktop.apps[appId]){
+                this.app.desktop.apps[appId].setCurrent();
+            }else {
+                layout.openApplication(null, "ForumDocument", {
+                    "id" : id,
+                    "appId": appId,
+                    // "docTitle": data.title,
+                    "isEdited" : false,
+                    "isNew" : false
+                });
+            }
+        }else{
+            var appId = "cms.Document"+data.infoId;
+            if (this.app.desktop.apps[appId]){
+                this.app.desktop.apps[appId].setCurrent();
+            }else {
+                layout.openApplication(null, "cms.Document", {
+                    "documentId" : id,
+                    // "docTitle": data.title,
+                    "appId": appId,
+                    "readonly" : true
+                });
+            }
+        }
     },
     prevPage: function(){
         if (this.page>1){