hq_1980@hotmail.com 7 lat temu
rodzic
commit
4d43caf4b0
56 zmienionych plików z 430 dodań i 198 usunięć
  1. 2 1
      o2web/source/o2_core/o2/o2.core.js
  2. 1 1
      o2web/source/o2_core/o2/widget/Common.js
  3. 20 7
      o2web/source/o2_core/o2/widget/Menu.js
  4. 46 1
      o2web/source/o2_core/o2/widget/O2Identity.js
  5. 6 6
      o2web/source/o2_core/o2/widget/Tab.js
  6. 4 4
      o2web/source/o2_core/o2/widget/Toolbar.js
  7. 5 0
      o2web/source/o2_core/o2/xAction/services/x_meeting_assemble_control.json
  8. 2 1
      o2web/source/o2_core/o2/xAction/services/x_portal_assemble_surface.json
  9. 1 0
      o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json
  10. 1 1
      o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.json
  11. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_black/css.wcss
  12. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_car/css.wcss
  13. 4 2
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_color/css.wcss
  14. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_crane/css.wcss
  15. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_default/css.wcss
  16. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_dock/css.wcss
  17. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_lotus/css.wcss
  18. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_o2/css.wcss
  19. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_panda/css.wcss
  20. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_peony/css.wcss
  21. 6 3
      o2web/source/o2_core/o2/xDesktop/$Window/desktop_star/css.wcss
  22. 1 1
      o2web/source/o2_core/o2/xDesktop/Authentication.js
  23. 20 2
      o2web/source/o2_core/o2/xDesktop/Common.js
  24. 2 0
      o2web/source/o2_core/o2/xDesktop/Layout.js
  25. 1 0
      o2web/source/o2_core/o2/xDesktop/Lnk.js
  26. 4 1
      o2web/source/o2_core/o2/xDesktop/Window.js
  27. 4 4
      o2web/source/o2_core/o2/xScript/Environment.js
  28. 17 1
      o2web/source/o2_lib/mootools/plugin/mBox.Notice.js
  29. 13 6
      o2web/source/x_component_AppCenter/Main.js
  30. 1 0
      o2web/source/x_component_AppCenter/lp/zh-cn.js
  31. 6 59
      o2web/source/x_component_Common/Main.js
  32. 4 3
      o2web/source/x_component_File/FileSelector.js
  33. 1 1
      o2web/source/x_component_File/Main.js
  34. 1 1
      o2web/source/x_component_OnlineMeeting/Main.js
  35. 6 0
      o2web/source/x_component_Selector/$Selector/default/css.wcss
  36. 4 0
      o2web/source/x_component_Selector/Person.js
  37. 3 0
      o2web/source/x_component_Selector/Process.js
  38. 1 0
      o2web/source/x_component_Selector/lp/zh-cn.js
  39. 41 9
      o2web/source/x_component_portal_PageDesigner/Module/Image.js
  40. 1 1
      o2web/source/x_component_portal_PortalManager/$Main/startMenu.json
  41. 7 1
      o2web/source/x_component_portal_PortalManager/FileExplorer.js
  42. 1 1
      o2web/source/x_component_portal_PortalManager/PageExplorer.js
  43. 2 0
      o2web/source/x_component_process_FormDesigner/Module/$Component.js
  44. 2 0
      o2web/source/x_component_process_FormDesigner/Module/$Container.js
  45. 2 0
      o2web/source/x_component_process_FormDesigner/Module/$Element.js
  46. 2 2
      o2web/source/x_component_process_FormDesigner/Module/$Module.js
  47. 24 17
      o2web/source/x_component_process_FormDesigner/Module/Image.js
  48. 1 1
      o2web/source/x_component_process_FormDesigner/Module/Image/image.html
  49. 76 22
      o2web/source/x_component_process_FormDesigner/Property.js
  50. 6 0
      o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js
  51. 1 1
      o2web/source/x_component_process_ProcessManager/$Main/startMenu.json
  52. 7 1
      o2web/source/x_component_process_ProcessManager/FileExplorer.js
  53. 12 7
      o2web/source/x_component_process_Xform/Package.js
  54. 1 1
      o2web/source/x_component_query_QueryManager/StatExplorer.js
  55. 1 1
      o2web/source/x_component_query_QueryManager/ViewExplorer.js
  56. 2 0
      o2web/source/x_desktop/js/x.js

+ 2 - 1
o2web/source/o2_core/o2/o2.core.js

@@ -209,7 +209,6 @@
     };
 
     _restful = function(method, address, data, callback, async, withCredentials){
-        debugger;
         var loadAsync = (async !== false);
         var credentials = (withCredentials !== false);
         address = (address.indexOf("?")!==-1) ? address+"&v="+o2.version.v : address+"?v="+o2.version.v;
@@ -263,11 +262,13 @@
         switch (type){
             case "object":
                 for (var k in o){
+                    //if (o[k] && o[k].destroy) o[k].destroy();
                     o[k] = null;
                 }
                 break;
             case "array":
                 for (var i=0; i< o.length; i++){
+                    _release(o[i]);
                     if (o[i]) o[i] = null;
                 }
                 break;

+ 1 - 1
o2web/source/o2_core/o2/widget/Common.js

@@ -11,7 +11,7 @@ o2.widget.Common = new Class({
         if (!reload && o2.widget.css[key]){
             this.css = o2.widget.css[key];
         }else{
-            this.cssPath = (this.cssPath.indexOf("?")!=-1) ? this.cssPath+"&v="+COMMON.version : this.cssPath+"?v="+COMMON.version;
+            this.cssPath = (this.cssPath.indexOf("?")!=-1) ? this.cssPath+"&v="+o2.version.v : this.cssPath+"?v="+o2.version.v;
             var r = new Request.JSON({
                 url: this.cssPath,
                 secure: false,

+ 20 - 7
o2web/source/o2_core/o2/widget/Menu.js

@@ -39,9 +39,10 @@ o2.widget.Menu = new Class({
 			if (this.options.event){
 				if (this.target) this.target.addEvent(this.options.event, this.showIm.bind(this));
 			}
-			this.node.inject(this.options.container || $(document.body));
+			//this.node.inject(this.options.container || $(document.body));
+            this.node.inject(this.options.container || this.target);
 
-			this.hide = this.hideMenu.bind(this);
+            this.hide = this.hideMenu.bind(this);
 			this.fireEvent("postLoad");
 		}
 	},
@@ -79,13 +80,19 @@ o2.widget.Menu = new Class({
 			left = this.options.left;
 		}
 		var size = this.node.getSize();
-		var bodySize = $(document.body).getSize();
+
+		var bodyNode = this.node.getOffsetParent();
+
+		//var bodySize = $(document.body).getSize();
+        var bodySize = bodyNode.getSize();
+
 		if (left+size.x>bodySize.x){
 			left = left-size.x-5;
 			if (left<0) left = 0;
 		}
 		
-		var scrollTop = ($(document.body).getScroll().y.toFloat()) || 0;
+		//var scrollTop = ($(document.body).getScroll().y.toFloat()) || 0;
+        var scrollTop = (bodyNode.getScroll().y.toFloat()) || 0;
 		
 		if (top+size.y>bodySize.y+scrollTop){
 			top = top-size.y-5;
@@ -187,7 +194,8 @@ o2.widget.Menu = new Class({
                 "opacity": 0
             });
         }
-        this.nodeFrame.inject(this.options.container || $(document.body));
+        //this.nodeFrame.inject(this.options.container || $(document.body));
+        this.nodeFrame.inject(this.options.container || this.target);
 	},
 	showMenu: function(e){
 		if (!this.show){
@@ -525,7 +533,10 @@ o2.widget.MenuMenu = new Class({
 		var size = this.item.getSize();
         this.subMenu.node.setStyle("display", "block");
 		var menuSize = this.subMenu.node.getSize();
-		var bodySize = $(document.body).getSize();
+
+		var bodyNode = this.subMenu.node.getOffsetParent();
+		//var bodySize = $(document.body).getSize();
+        var bodySize = bodyNode.getSize();
 		
 		top = position.y;
 		left = (position.x.toFloat()) + (size.x.toFloat())-3;
@@ -533,7 +544,9 @@ o2.widget.MenuMenu = new Class({
 			left = (position.x.toFloat()) - (menuSize.x.toFloat())+8;
 		}
 		
-		var scrollTop = ($(document.body).getScroll().y.toFloat()) || 0;
+		//var scrollTop = ($(document.body).getScroll().y.toFloat()) || 0;
+        var scrollTop = (bodyNode.getScroll().y.toFloat()) || 0;
+
 		if (top+menuSize.y>bodySize.y+scrollTop){
 			top = top-menuSize.y + size.y+3;
 			if (top<0) top = 0;

+ 46 - 1
o2web/source/o2_core/o2/widget/O2Identity.js

@@ -25,6 +25,8 @@ o2.widget.O2Identity = new Class({
         // this.explorer = explorer;
         // this.removeAction = removeAction;
         this.load();
+
+        //o2.widget.O2Identity.iditems.push(this);
 	},
     setText: function(){
         this.node.set("text", this.data.name+"("+this.data.unitName+")");
@@ -446,9 +448,52 @@ o2.widget.O2Role = new Class({
         }
     }
 });
+o2.widget.O2File = new Class({
+    Extends: o2.widget.O2Group,
+    createInforNode: function(){
+        this.inforNode = new Element("div", {
+            "styles": this.style.identityInforNode
+        });
+        var extName = this.data.fileName.substring(this.data.fileName.lastIndexOf(".")+1, this.data.fileName.length).toLowerCase();
+        if (["png","jpg","bmp","gif","jpeg","jpe"].indexOf(extName)!==-1){
+            var url = (this.data.portal) ? MWF.xDesktop.getPortalFileUr(this.data.id, this.data.portal) : MWF.xDesktop.getProcessFileUr(this.data.id, this.data.application);
+            var img = new Element("img", {"src": url, "styles": {"max-width": "280px", "max-height": "140px"}}).inject(this.inforNode);
+        }else{
+            var nameNode = new Element("div", {
+                "styles": this.style.identityInforNameNode,
+                "text": this.data.applicationName || this.data.appName || this.data.name
+            }).inject(this.inforNode);
+        }
+
+        this.tooltip = new mBox.Tooltip({
+            content: this.inforNode,
+            setStyles: {content: {padding: 15, lineHeight: 20}},
+            attach: this.node,
+            transition: 'flyin'
+        });
+    },
+
+    getPersonData: function(){
+        return this.data;
+    }
+});
 o2.widget.O2Other = new Class({
     Extends: o2.widget.O2Group,
     getPersonData: function(){
         return this.data;
     }
-});
+});
+
+// o2.widget.O2Identity.iditems = o2.widget.O2Identity.iditems || [];
+// o2.widget.O2Identity.intervalId = window.setInterval(function(){
+//     if (o2.widget.O2Identity.iditems && o2.widget.O2Identity.iditems.length){
+//         o2.widget.O2Identity.iditems.each(function(item){
+//             if (item.tooltip){
+//                 debugger;
+//                 if (item.tooltip.options.attach){
+//
+//                 }
+//             }
+//         });
+//     }
+// }, 10000);

+ 6 - 6
o2web/source/o2_core/o2/widget/Tab.js

@@ -173,12 +173,12 @@ o2.widget.TabPage = new Class({
 	},
 	showTabIm: function(callback){
 		if (!this.isShow){
-			if (!this.tabNode.isIntoView()){
-                this.tab.pages.erase(this);
-                this.tab.pages.unshift(this);
-                this.tabNode.inject(this.tab.tabNodeContainerArea, "top");
-                this.tab.resize();
-			}
+			// if (!this.tabNode.isIntoView()){
+             //    this.tab.pages.erase(this);
+             //    this.tab.pages.unshift(this);
+             //    this.tabNode.inject(this.tab.tabNodeContainerArea, "top");
+             //    this.tab.resize();
+			// }
 			this.tab.pages.each(function(page){
 				if (page.isShow) page.hideIm();
 			});

+ 4 - 4
o2web/source/o2_core/o2/widget/Toolbar.js

@@ -408,7 +408,7 @@ o2.widget.ToolbarMenu = new Class({
 				"event": "click",
 				"disable": toolbarMenu.options.disable,
 				"onQueryShow": function(){
-					var p = toolbarMenu.node.getPosition();
+					var p = toolbarMenu.node.getPosition(toolbarMenu.node.getOffsetParent());
 					var s = toolbarMenu.node.getSize();
 					this.setOptions({
 						"top": p.y+s.y-2,
@@ -418,7 +418,7 @@ o2.widget.ToolbarMenu = new Class({
 					return true;
 				},
 				"onPostShow": function(){
-					var p = toolbarMenu.node.getPosition();
+					var p = toolbarMenu.node.getPosition(toolbarMenu.node.getOffsetParent());
 					var s = toolbarMenu.node.getSize();
 					toolbarMenu.node.set("styles", {
 						"background-color": this.node.getStyle("background-color"),
@@ -429,7 +429,7 @@ o2.widget.ToolbarMenu = new Class({
 					});
 					toolbarMenu.modifiyStyle = false;
 
-					toolbarMenu.tmpStyleNode = new Element("div",{
+					toolbarMenu.tmpStyleNode = new Element("div.MWFtmpStyleNode",{
 						"styles":{
 							"position":"absolute",
 							"top": p.y+s.y-2,
@@ -440,7 +440,7 @@ o2.widget.ToolbarMenu = new Class({
 							"height": "1px",
 							"overflow": "hidden"
 						}
-					}).inject($(document.body));
+					}).inject(toolbarMenu.node);
 
 					toolbarMenu.fireEvent("menuPostShow", [this]);
 				},

+ 5 - 0
o2web/source/o2_core/o2/xAction/services/x_meeting_assemble_control.json

@@ -71,5 +71,10 @@
 
   "getAttachmentData": {"uri": "/jaxrs/attachment/{id}/download/false"},
   "getAttachmentStream": {"uri": "/jaxrs/attachment/{id}/download/true"},
+
+
+
+
+
   "clazz": "x_meeting_assemble_control"
 }

+ 2 - 1
o2web/source/o2_core/o2/xAction/services/x_portal_assemble_surface.json

@@ -17,5 +17,6 @@
   "getScriptByName": {"uri": "/jaxrs/script/portal/{applicationId}/name/{name}"},
   "getMenu": {"uri": "/jaxrs/menu/{id}"},
 
-  "readFile": {"uri": "/jaxrs/file/{flag}/portal/{applicationFlag}/content"}
+  "readFile": {"uri": "/jaxrs/file/{flag}/portal/{applicationFlag}/content"},
+  "listFile": {"uri": "/jaxrs/file/list/portal/{applicationFlag}"}
 }

+ 1 - 0
o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json

@@ -224,6 +224,7 @@
   "getProcessByName": {"uri": "/jaxrs/process/{flag}/application/{applicationFlag}"},
 
   "readFile": {"uri": "/jaxrs/file/{flag}/application/{applicationFlag}/content"},
+  "listFile": {"uri": "/jaxrs/file/list/application/{applicationFlag}"},
 
   "changeSite": {"uri": "/jaxrs/attachment/{id}/work/{workId}/change/site/{site}"},
   "clazz": "x_processplatform_assemble_surface"

+ 1 - 1
o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.json

@@ -19,6 +19,6 @@
   "exportView": {"uri": "/jaxrs/view/{id}/excel", "method": "PUT"},
   "getViewExcel": {"uri": "/jaxrs/view/excel/result/{flag}"},
 
-  "search": {"uri": "/jaxrs/entry/key/{key}"}
+  "search": {"uri": "/jaxrs/segment/key/{key}"}
 
 }

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_black/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "0px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+		//"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "0px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_car/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "0px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_car/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "0px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_car/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_car/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 4 - 2
o2web/source/o2_core/o2/xDesktop/$Window/desktop_color/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,7 +60,8 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
 		"opacity": 0.8,

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_crane/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_default/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+		//"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+		//"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+	    "background-color": "#333333"
+		//"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_dock/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_lotus/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_o2/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "0px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.9,
 		"border-radius": "8px",
 		"padding": "0px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_o2/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_panda/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_peony/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 6 - 3
o2web/source/o2_core/o2/xDesktop/$Window/desktop_star/css.wcss

@@ -50,7 +50,8 @@
 		"opacity": 0,
 		"padding": "4px",
 		"border-radius": "8px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerTo": {
 		"-webkit-user-select": "none",
@@ -59,10 +60,12 @@
 		"opacity": 0.8,
 		"border-radius": "8px",
 		"padding": "4px",
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerCurrent":{
-		"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
+		"background-color": "#333333"
+        //"background-image": "url("+MWF.defaultPath+"/xDesktop/$Window/desktop_default/img/window.jpg)"
 	},
 	"spacerUncurrent":{
 		"background-image": "",

+ 1 - 1
o2web/source/o2_core/o2/xDesktop/Authentication.js

@@ -57,7 +57,7 @@ MWF.xDesktop.Authentication = new Class({
             layout.session.user = json.data;
             layout.session.token = layout.session.user.token;
             var user = layout.desktop.session.user;
-
+            if (!user.identityList) user.identityList = [];
             if (user.roleList) {
                 var userRoleName = [];
                 user.roleList.each(function(role){

+ 20 - 2
o2web/source/o2_core/o2/xDesktop/Common.js

@@ -225,6 +225,22 @@ MWF.xDesktop.copyImage = function( reference, referencetype, attachmentId, scale
         "failure": failure
     });
 };
+MWF.xDesktop.getPortalFileUr = function(id, app){
+    var root = "x_portal_assemble_surface";
+    var url = MWF.Actions.getHost(root)+"/"+root+MWF.Actions.get(root).action.actions.readFile.uri;
+    url = url.replace("{flag}", id);
+    url = url.replace("{applicationFlag}", app);
+    return url
+};
+MWF.xDesktop.getProcessFileUr = function(id, app){
+    var root = "x_processplatform_assemble_surface";
+    var url = MWF.Actions.getHost(root)+"/"+root+MWF.Actions.get(root).action.actions.readFile.uri;
+    url = url.replace("{flag}", id);
+    url = url.replace("{applicationFlag}", app);
+    return url
+};
+
+
 MWF.xDesktop.getServiceAddress = function(config, callback){
     var error = function(){
         //MWF.xDesktop.notice("error", {"x": "right", "y": "top"}, "")
@@ -257,7 +273,9 @@ MWF.xDesktop.getServiceAddress = function(config, callback){
         var center = null;
         //var center = MWF.xDesktop.chooseCenter(config);
         if (center){
-            MWF.xDesktop.getServiceAddressConfigObject(center, callback, error);
+            MWF.xDesktop.getServiceAddressConfigObject(center, callback, function(){
+                MWF.xDesktop.getServiceAddressConfigArray(config, callback, error);
+            }.bind(this));
         }else{
             MWF.xDesktop.getServiceAddressConfigArray(config, callback, error);
         }
@@ -268,7 +286,7 @@ MWF.xDesktop.chooseCenter = function(config){
     var center = null;
     for (var i=0; i<config.center.length; i++){
         var ct = config.center[i];
-        if (!ct.webHost || (ct.webHost.toString().toLowerCase()===host.toString().toLowerCase())){
+        if (!ct.host || (ct.host.toString().toLowerCase()===host.toString().toLowerCase())){
             center = ct;
             break;
         }

+ 2 - 0
o2web/source/o2_core/o2/xDesktop/Layout.js

@@ -1013,6 +1013,7 @@ MWF.xDesktop.Layout = new Class({
         this.appCurrentList.erase(app);
         //	if (this.appCurrentList.length) this.appCurrentList[this.appCurrentList.length-1].setCurrent();
         this.setTaskitemSize();
+        this.apps[appId] = null;
         delete this.apps[appId];
     },
     closeWidget: function(app){
@@ -1225,6 +1226,7 @@ MWF.xDesktop.Layout.Taskitem = new Class({
     },
     destroy: function(){
         this.node.destroy();
+        o2.release(this);
         //this.layout.setTaskitemSize();
     }
 });

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

@@ -395,6 +395,7 @@ MWF.xDesktop.Lnk = new Class({
 		this.node.inject(node, where);
 	},
 	open: function(e){
+		debugger;
 		if (!this.isSwing){
             var parList = this.par.split("#");
             var appName = parList[0];

+ 4 - 1
o2web/source/o2_core/o2/xDesktop/Window.js

@@ -512,6 +512,7 @@ MWF.xDesktop.Window = new Class({
 			this.morph = new Fx.Morph(this.node, {duration: 100, link: "chain"});
 		}
 		this.morph.setOptions({duration: 50});
+		debugger;
 		this.getSpacer();
 		if (!this.spacerMorph){
 			this.spacerMorph = new Fx.Morph(this.spacer, {duration: 100, link: "chain"});
@@ -538,6 +539,7 @@ MWF.xDesktop.Window = new Class({
 				spacerFinish = true;
 				firePost();
 			}.bind(this));
+
 			this.contentMorph.start(contentSize).chain(function(){
 				contentFinish = true;
 				firePost();
@@ -554,6 +556,7 @@ MWF.xDesktop.Window = new Class({
 					this.isHide = false;
 					if (this.containerDrag) this.containerDrag.attach();
 					this.fireEvent("postShow");
+
 //					if (this.isMax){
 //						this.isMax = false;
 //						this.app.maxSize();
@@ -792,7 +795,7 @@ MWF.xDesktop.Window = new Class({
             this.node = null;
             if (callback) callback();
             this.fireEvent("postClose");
-
+			o2.release(this);
 		}
 	},
 	getAction: function(){

+ 4 - 4
o2web/source/o2_core/o2/xScript/Environment.js

@@ -1400,10 +1400,10 @@ MWF.xScript.createDict = function(application){
 
         var encodePath = function( path ){
             var arr = path.split(/\./g);
-            // var ar = arr.map(function(v){
-            //     return encodeURIComponent(v);
-            // });
-            return arr.join("/");
+            var ar = arr.map(function(v){
+                return encodeURIComponent(v);
+            });
+            return ar.join("/");
         };
 
         this.get = function(path, success, failure){

+ 17 - 1
o2web/source/o2_lib/mootools/plugin/mBox.Notice.js

@@ -232,7 +232,15 @@ var mBox = new Class({
 				left: -12000,
 				zoom: 1
 			}
-		}).setStyles(this.options.setStyles.wrapper || {}).inject(document.body, 'bottom');
+		//}).setStyles(this.options.setStyles.wrapper || {}).inject(document.body, 'bottom');
+    	}).setStyles(this.options.setStyles.wrapper || {});
+
+        var target = $(target) || target || this.target || $(this.options.target) || this.options.target || $(this.options.attach);
+        if (target && typeOf(target)==="element"){
+            this.wrapper.inject(target, "after");
+        }else{
+            this.wrapper.inject(document.body, 'bottom');
+        }
 
 		// add mouse events to wrapper
 		if(this.options.closeOnMouseleave) {
@@ -388,6 +396,9 @@ var mBox = new Class({
 					}
 				}
 
+
+                this.wrapper.inject(document.body, 'bottom');
+
 				// set new position
 				this.setPosition(null, options.position || null, options.offset || null);
 
@@ -468,6 +479,11 @@ var mBox = new Class({
 				this.ignoreDelayOnce = false;
 				this.wrapper.setStyle('display', 'none');
 				this.fireEvent('systemCloseComplete').fireEvent('closeComplete');
+
+                var target = this.target || $(this.options.target) || this.options.target || $(this.options.attach);
+                if (target && typeOf(target)==="element"){
+                    this.wrapper.inject(target);
+                }
 			}.bind(this);
 
 			var close = function(complete) {

+ 13 - 6
o2web/source/x_component_AppCenter/Main.js

@@ -297,8 +297,8 @@ MWF.xApplication.AppCenter.Exporter = new Class({
         this.step = 2;
     },
     showStatusList: function(){
-        this.showStatusItemList("processPlatformList", ["processList", "formList", "applicationDictList", "scriptList"]);
-        this.showStatusItemList("portalList", ["pageList", "scriptList", "widgetList"]);
+        this.showStatusItemList("processPlatformList", ["processList", "formList", "applicationDictList", "scriptList", "fileList"]);
+        this.showStatusItemList("portalList", ["pageList", "scriptList", "widgetList", "fileList"]);
         this.showStatusItemList("cmsList", ["categoryInfoList", "formList", "appDictList", "scriptList"]);
         this.showStatusItemList("queryList", ["viewList", "statList", "revealList"]);
     },
@@ -462,7 +462,8 @@ MWF.xApplication.AppCenter.Exporter.Element = new Class({
             "processList": [],
             "formList": [],
             "applicationDictList": [],
-            "scriptList": []
+            "scriptList": [],
+            "fileList": []
         };
     },
     load: function(){
@@ -515,13 +516,16 @@ MWF.xApplication.AppCenter.Exporter.Element = new Class({
         this.postData.formList = selectData.formList;
         this.postData.applicationDictList = selectData.applicationDictList;
         this.postData.scriptList = selectData.scriptList;
+        this.postData.fileList = selectData.fileList;
+
         this.exporter.selectData.processPlatformList.erase(this.postData);
-        if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length){
+        if (selectData.processList.length || selectData.formList.length || selectData.applicationDictList.length || selectData.scriptList.length || selectData.fileList.length){
             this.exporter.selectData.processPlatformList.push(this.postData);
             if (selectData.processList.length==this.data.processList.length &&
                 selectData.formList.length==this.data.formList.length &&
                 selectData.applicationDictList.length==this.data.applicationDictList.length &&
-                selectData.scriptList.length==this.data.scriptList.length){
+                selectData.scriptList.length==this.data.scriptList.length &&
+                selectData.fileList.length==this.data.fileList.length){
                 this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_all.png) center center no-repeat");
             }else{
                 this.iconNode.setStyle("background", "url("+this.app.path+this.app.options.style+"/icon/sel_part.png) center center no-repeat");
@@ -672,7 +676,8 @@ MWF.xApplication.AppCenter.Exporter.Element.Selector = new Class({
             "processList": [],
             "formList": [],
             "applicationDictList": [],
-            "scriptList": []
+            "scriptList": [],
+            "fileList": []
         }
     },
     load: function(){
@@ -756,6 +761,7 @@ MWF.xApplication.AppCenter.Exporter.Element.Selector = new Class({
         this.selectData.formList = this.getCheckedList(this.listFormContent);
         this.selectData.applicationDictList = this.getCheckedList(this.listDictContent);
         this.selectData.scriptList = this.getCheckedList(this.listScriptContent);
+        this.selectData.fileList = this.getCheckedList(this.listFileContent);
         this.element.checkSelect(this.selectData);
         this.hide();
     },
@@ -783,6 +789,7 @@ MWF.xApplication.AppCenter.Exporter.Element.Selector = new Class({
         this.listFormContent = this.listProcess("formList");
         this.listDictContent = this.listProcess("applicationDictList");
         this.listScriptContent = this.listProcess("scriptList");
+        this.listFileContent = this.listProcess("fileList");
     },
     listProcess: function(name){
         var title = new Element("div", {"styles": this.css.moduleSelectContentTitleNode}).inject(this.contentAreaNode);

+ 1 - 0
o2web/source/x_component_AppCenter/lp/zh-cn.js

@@ -35,6 +35,7 @@ MWF.xApplication.AppCenter.LP = {
     "formList": "表单",
     "applicationDictList": "数据字典",
     "scriptList": "脚本",
+    "fileList": "资源文件",
 
     "pageList": "页面",
     "scriptList": "脚本",

+ 6 - 59
o2web/source/x_component_Common/Main.js

@@ -86,7 +86,7 @@ MWF.xApplication.Common.Main = new Class({
         }
     },
 	load : function(isCurrent){
-		this.fireAppEvent("queryLoad");
+        this.fireAppEvent("queryLoad");
         if (!this.inBrowser){
             this.loadWindow(isCurrent);
         }else{
@@ -113,49 +113,6 @@ MWF.xApplication.Common.Main = new Class({
 				this.loadApplication(function(){
 					this.fireAppEvent("postLoadApplication");
 				}.bind(this));
-
-                // var resize = false;
-                // var size = this.window.node.getSize();
-                // var position = this.window.node.getPosition();
-                // var bodySize = $(document.body).getSize();
-                // var height = size.y;
-                // var width = size.x;
-
-                // var y = (size.y+position.y)-bodySize.y;
-                // if (y>-10){
-                //     height = size.y-y-10;
-                //     resize = true;
-                // }
-                // var x = (size.x+position.x)-bodySize.x;
-                // if (x>-10){
-                //     width = size.x-x-10;
-                //     resize = true;
-                // }
-                // var y = (size.y+position.y)-bodySize.y;
-                // if (y>0){
-                //     height = size.y-y;
-                //     resize = true;
-                // }
-                // var x = (size.x+position.x)-bodySize.x;
-                // if (x>0){
-                //     width = size.x-x;
-                //     resize = true;
-                // }
-
-                // if (resize){
-                //     this.window.options.height = height;
-                //     this.window.options.width = width;
-                //     this.window.node.setStyles({
-                //         "width": ""+width+"px",
-                //         "height": ""+height+"px"
-                //     });
-                //     this.window.spacer.setStyles({
-                //         "width": ""+width+"px",
-                //         "height": ""+height+"px"
-                //     });
-                //     this.window.setContentSize();
-                // }
-
 				this.fireAppEvent("postLoad");
 			}.bind(this),
 			"onResize": function(){
@@ -174,12 +131,6 @@ MWF.xApplication.Common.Main = new Class({
                 }
 
             }.bind(this)
-			// "onQueryMax": function(){
-            	// if (this.window.css.windowTitleMax) this.window.title.setStyles(this.window.css.windowTitleMax);
-             //    if (this.window.css.windowTitleRefreshMax) this.window.titleRefresh.setStyles(this.window.css.windowTitleRefreshMax);
-             //    if (this.window.css.windowTitleTextMax) this.window.titleText.setStyles(this.window.css.windowTitleTextMax);
-             //    if (this.window.css.windowTitleActionMax) this.window.titleAction.setStyles(this.window.css.windowTitleActionMax);
-			// }.bind(this)
 		};
 		
 		if (this.options.event){
@@ -353,19 +304,15 @@ MWF.xApplication.Common.Main = new Class({
             window.close();
         }else{
             this.window.close(function(){
-
                 this.taskitem.destroy();
-                delete this.window;
-                delete this.taskitem;
+                this.window = null;
+                this.taskitem = null;
+
                 this.desktop.closeApp(this);
 
                 this.fireAppEvent("postClose");
-                //MWF.recycleCount = 0;
-                //debugger;
-                MWF.release(this);
-                //
-                //alert(MWF.recycleCount)
-                //debugger;
+
+                o2.release(this);
             }.bind(this));
         }
 	},

+ 4 - 3
o2web/source/x_component_File/FileSelector.js

@@ -1,6 +1,6 @@
 MWF.xApplication.File = MWF.xApplication.File || {};
 MWF.xDesktop.requireApp("File", "lp.zh-cn", null, false);
-MWF.xDesktop.requireApp("File", "Actions.RestActions", null, false);
+// MWF.xDesktop.requireApp("File", "Actions.RestActions", null, false);
 MWF.xDesktop.requireApp("File", "AttachmentSelector", null, false);
 MWF.xDesktop.requireApp("File", "Main", null, false);
 MWF.require("MWF.widget.Tree", null, false);
@@ -44,8 +44,9 @@ MWF.xApplication.File.FileSelector = new Class({
 		this.currentHistory = 1;
 		this.currentFolder = null;
 		
-		this.restActions = new MWF.xApplication.File.Actions.RestActions();
-		
+		//this.restActions = new MWF.xApplication.File.Actions.RestActions();
+
+        this.restActions = MWF.Actions.get("x_file_assemble_control");
 		MWF.getJSON("/x_component_File/$Main/icon.json", function(json){
 			this.icons = json;
 		}.bind(this), false, false);

+ 1 - 1
o2web/source/x_component_File/Main.js

@@ -1,4 +1,4 @@
-MWF.xDesktop.requireApp("File", "Actions.RestActions", null, false);
+//MWF.xDesktop.requireApp("File", "Actions.RestActions", null, false);
 MWF.xDesktop.requireApp("File", "AttachmentController", null, false);
 MWF.require("MWF.widget.Tree", null, false);
 MWF.xApplication.File.Main = new Class({

+ 1 - 1
o2web/source/x_component_OnlineMeeting/Main.js

@@ -1,4 +1,4 @@
-//MWF.xDesktop.requireApp("OnlineMeeting", "Actions.RestActions", null, false);
+MWF.xDesktop.requireApp("OnlineMeeting", "Actions.RestActions", null, false);
 MWF.xApplication.OnlineMeeting.options.multitask = false;
 MWF.xApplication.OnlineMeeting.Main = new Class({
 	Extends: MWF.xApplication.Common.Main,

+ 6 - 0
o2web/source/x_component_Selector/$Selector/default/css.wcss

@@ -364,6 +364,7 @@
 	"selectorItemTextNode": {
 		"height": "28px",
 		"margin": "0px 28px",
+		"word-wrap": "break-word",
 		"color": "#000"
 	},
 	"selectorItemCategoryTextNode": {
@@ -391,5 +392,10 @@
 	    "border": "1px solid #eee",
 	    "background": "#FFF",
 	    "height": "18px"
+	},
+	"filePreviewNode": {
+	    "overflow": "hidden",
+	    "max-width": "300px",
+	    "max-height": "200px"
 	}
 }

+ 4 - 0
o2web/source/x_component_Selector/Person.js

@@ -27,6 +27,7 @@ MWF.xApplication.Selector.Person = new Class({
         this.orgAction = MWF.Actions.get("x_organization_assemble_control");
         this.processAction = MWF.Actions.get("x_processplatform_assemble_surface");
         this.designerAction = MWF.Actions.get("x_processplatform_assemble_designer");
+        this.portalAction = MWF.Actions.get("x_portal_assemble_surface");
         this.portalDesignerAction = MWF.Actions.get("x_portal_assemble_designer");
         this.cmsAction = MWF.Actions.get("x_cms_assemble_control");
         this.queryAction = MWF.Actions.get("x_query_assemble_designer");
@@ -1139,6 +1140,9 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
 
         this.check();
 
+        this.afterLoad();
+    },
+    afterLoad: function(){
         if (this.level===1) this.clickItem();
     },
     clickItem: function(){

+ 3 - 0
o2web/source/x_component_Selector/Process.js

@@ -64,6 +64,9 @@ MWF.xApplication.Selector.Process.Item = new Class({
     _setIcon: function(){
         this.iconNode.setStyle("background-image", "url("+"/x_component_Selector/$Selector/default/icon/processicon.png)");
     },
+    _getTtiteText: function(){
+        return this.data.name;
+    },
     loadSubItem: function(){
         return false;
     },

+ 1 - 0
o2web/source/x_component_Selector/lp/zh-cn.js

@@ -7,6 +7,7 @@ MWF.xApplication.Selector.LP = MWF.SelectorLP = {
     "selectRole": "选择角色",
     "selectDuty": "选择职务",
     "selectField": "选择字段",
+    "selectFile": "选择资源文件",
     "selectAppliction": "选择流程应用",
     "selectProcess": "选择流程",
     "selectView": "选择视图",

+ 41 - 9
o2web/source/x_component_portal_PageDesigner/Module/Image.js

@@ -38,16 +38,23 @@ MWF.xApplication.portal.PageDesigner.Module.Image = MWF.PCImage = new Class({
                 value = "";
             }
             if (value){
-                var host = MWF.Actions.getHost("x_portal_assemble_surface");
-                var action = MWF.Actions.get("x_portal_assemble_surface");
-                var uri = action.action.actions.readFile.uri;
-                uri = uri.replace("{flag}", value);
-                uri = uri.replace("{applicationFlag}", this.form.json.application);
-                value = host+"/x_portal_assemble_surface"+uri;
+                if (typeOf(value)==="object"){
+                    var url = MWF.xDesktop.getPortalFileUr(value.id, value.portal);
+                    try{
+                        this.node.set("src", url);
+                    }catch(e){}
+                }else{
+                    var host = MWF.Actions.getHost("x_portal_assemble_surface");
+                    var action = MWF.Actions.get("x_portal_assemble_surface");
+                    var uri = action.action.actions.readFile.uri;
+                    uri = uri.replace("{flag}", value);
+                    uri = uri.replace("{applicationFlag}", this.form.json.application);
+                    value = host+"/x_portal_assemble_surface"+uri;
 
-                try{
-                    this.node.set("src", value);
-                }catch(e){}
+                    try{
+                        this.node.set("src", value);
+                    }catch(e){}
+                }
             }else{
                 if (this.json.properties.src) {
                     this._setEditStyle_custom("properties");
@@ -57,6 +64,31 @@ MWF.xApplication.portal.PageDesigner.Module.Image = MWF.PCImage = new Class({
                     this.node.set("src", this.path +this.options.style+"/icon/image1.png");
                 }
             }
+
+            // if (value==="none"){
+            //     this.json.srcfile = "";
+            //     value = "";
+            // }
+            // if (value){
+            //     var host = MWF.Actions.getHost("x_portal_assemble_surface");
+            //     var action = MWF.Actions.get("x_portal_assemble_surface");
+            //     var uri = action.action.actions.readFile.uri;
+            //     uri = uri.replace("{flag}", value);
+            //     uri = uri.replace("{applicationFlag}", this.form.json.application);
+            //     value = host+"/x_portal_assemble_surface"+uri;
+            //
+            //     try{
+            //         this.node.set("src", value);
+            //     }catch(e){}
+            // }else{
+            //     if (this.json.properties.src) {
+            //         this._setEditStyle_custom("properties");
+            //     }else if (this.json.src){
+            //         this._setEditStyle_custom("src");
+            //     }else{
+            //         this.node.set("src", this.path +this.options.style+"/icon/image1.png");
+            //     }
+            // }
         }
         if (name=="properties"){
             this._setNodeProperty();

+ 1 - 1
o2web/source/x_component_portal_PortalManager/$Main/startMenu.json

@@ -33,7 +33,7 @@
     "sub": []
   },
   {
-    "title": "附件配置",
+    "title": "资源文件",
     "id": "1.1",
     "action": "fileConfig",
     "icon": "portal_file.png",

+ 7 - 1
o2web/source/x_component_portal_PortalManager/FileExplorer.js

@@ -78,10 +78,16 @@ MWF.xApplication.portal.PortalManager.FileExplorer.File = new Class({
         return "file.png";
     },
 	_getLnkPar: function(){
+        var url = MWF.Actions.get("x_portal_assemble_surface").action.actions.readFile.uri;
+        url = url.replace(/{flag}/, this.data.id);
+        url = url.replace(/{applicationFlag}/, this.data.portal);
+        url = "/x_portal_assemble_surface"+url;
+        var href = MWF.Actions.getHost("x_portal_assemble_surface")+url;
+
 		return {
 			"icon": this.explorer.path+this.explorer.options.style+"/fileIcon/lnk.png",
 			"title": this.data.name,
-			"par": "portal.FileDesigner#{\"id\": \""+this.data.id+"\", \"applicationId\": \""+this.explorer.app.options.application.id+"\"}"
+            "par": "@url#"+href
 		};
 	},
 

+ 1 - 1
o2web/source/x_component_portal_PortalManager/PageExplorer.js

@@ -432,7 +432,7 @@ MWF.xApplication.portal.PortalManager.PageExplorer.Page= new Class({
 	},
 	_getLnkPar: function(){
 		return {
-			"icon": this.explorer.path+this.explorer.options.style+"/processIcon/lnk.png",
+			"icon": this.explorer.path+this.explorer.options.style+"/formIcon/lnk.png",
 			"title": this.data.name,
 			"par": "portal.PageDesigner#{\"id\": \""+this.data.id+"\"}"
 		};

+ 2 - 0
o2web/source/x_component_process_FormDesigner/Module/$Component.js

@@ -63,6 +63,7 @@ MWF.xApplication.process.FormDesigner.Module.$Component = MWF.FC$Component = new
             this.form.scriptDesigner.removeModule(this.json);
         }
 
+        if (this.property) this.property.destroy();
 		this.node.destroy();
 		this.actionArea.destroy();
 		
@@ -71,6 +72,7 @@ MWF.xApplication.process.FormDesigner.Module.$Component = MWF.FC$Component = new
 		delete this.json;
 		
 		this.treeNode.destroy();
+        o2.release(this);
 	},
 	_dragIn: function(module){
 		module.inContainer = null;

+ 2 - 0
o2web/source/x_component_process_FormDesigner/Module/$Container.js

@@ -107,6 +107,7 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
             this.form.scriptDesigner.removeModule(this.json);
         }
 
+        if (this.property) this.property.destroy();
 		this.node.destroy();
 		this.actionArea.destroy();
 		
@@ -115,6 +116,7 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
 		delete this.json;
 		
 		this.treeNode.destroy();
+		o2.release(this);
 	},
     copy: function(e){
 

+ 2 - 0
o2web/source/x_component_process_FormDesigner/Module/$Element.js

@@ -47,6 +47,7 @@ MWF.xApplication.process.FormDesigner.Module.$Element = MWF.FC$Element = new Cla
             this.form.scriptDesigner.removeModule(this.json);
 		}
 
+        if (this.property) this.property.destroy();
 		this.node.destroy();
 		this.actionArea.destroy();
 		
@@ -55,6 +56,7 @@ MWF.xApplication.process.FormDesigner.Module.$Element = MWF.FC$Element = new Cla
 		delete this.json;
 		
 		this.treeNode.destroy();
+		o2.release(this);
 	},
 	parseModules: function(){},
 	_deleteModule: function(){

+ 2 - 2
o2web/source/x_component_process_FormDesigner/Module/$Module.js

@@ -265,10 +265,10 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
         this.form.designer.shortcut = false;
 		this.form.designer.confirm("warn", module.node, MWF.APPFD.LP.notice.deleteElementTitle, MWF.APPFD.LP.notice.deleteElement, 300, 120, function(){
 
-			module.destroy();
 			module.form.selected();
-
             module.form.designer.shortcut = true;
+
+            module.destroy();
 			this.close();
 		}, function(){
             module.form.designer.shortcut = true;

+ 24 - 17
o2web/source/x_component_process_FormDesigner/Module/Image.js

@@ -59,27 +59,34 @@ MWF.xApplication.process.FormDesigner.Module.Image = MWF.FCImage = new Class({
             if (value==="none"){
                 this.json.srcfile = "";
                 value = "";
-			}
+            }
             if (value){
-                var host = MWF.Actions.getHost("x_processplatform_assemble_surface");
-                var action = MWF.Actions.get("x_processplatform_assemble_surface");
-                var uri = action.action.actions.readFile.uri;
-                uri = uri.replace("{flag}", value);
-                uri = uri.replace("{applicationFlag}", this.form.json.application);
-                value = host+"x_processplatform_assemble_surface/"+uri;
+                if (typeOf(value)==="object"){
+                    var url = MWF.xDesktop.getProcessFileUr(value.id, value.application);
+                    try{
+                        this.node.set("src", url);
+                    }catch(e){}
+                }else{
+                    var host = MWF.Actions.getHost("x_processplatform_assemble_surface");
+                    var action = MWF.Actions.get("x_processplatform_assemble_surface");
+                    var uri = action.action.actions.readFile.uri;
+                    uri = uri.replace("{flag}", value);
+                    uri = uri.replace("{applicationFlag}", this.form.json.application);
+                    value = host+"/x_processplatform_assemble_surface"+uri;
 
-                try{
-                    this.node.set("src", value);
-				}catch(e){}
-			}else{
-            	if (this.json.properties.src) {
+                    try{
+                        this.node.set("src", value);
+                    }catch(e){}
+				}
+            }else{
+                if (this.json.properties.src) {
                     this._setEditStyle_custom("properties");
-				}else if (this.json.src){
+                }else if (this.json.src){
                     this._setEditStyle_custom("src");
-				}else{
+                }else{
                     this.node.set("src", this.path +this.options.style+"/icon/image1.png");
-				}
-			}
+                }
+            }
 		}
 		if (name=="properties"){
 			this._setNodeProperty();
@@ -91,7 +98,7 @@ MWF.xApplication.process.FormDesigner.Module.Image = MWF.FCImage = new Class({
         if (this.form.moduleElementNodeList.indexOf(this.node)==-1) this.form.moduleElementNodeList.push(this.node);
         this.node.store("module", this);
 
-        if (typeOf(this.json.src)=="object"){
+        if (typeOf(this.json.src)==="object"){
             var src = MWF.xDesktop.getImageSrc( this.json.src.imageId );
             this.node.set("src", src);
         }

+ 1 - 1
o2web/source/x_component_process_FormDesigner/Module/Image/image.html

@@ -23,7 +23,7 @@
             </tr>
             <tr>
                 <td class="editTableTitle">选择资源</td>
-                <td class="editTableValue"><div class="MWFImageFileSelect" name="srcfile"></div></td>
+                <td class="editTableValue"><div class="MWFProcessImageFileSelect" name="srcfile"></div></td>
             </tr>
         </table>
 

+ 76 - 22
o2web/source/x_component_process_FormDesigner/Property.js

@@ -99,8 +99,8 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
     destroy: function(){
         if (this.propertyContent){
             this.propertyContent.destroy();
-            MWF.release(this);
         }
+        MWF.release(this);
     },
 	
 	loadTreeData: function(){
@@ -424,26 +424,30 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
     },
 
     loadImageFileSelect: function(){
-        var nodes = this.propertyContent.getElements(".MWFImageFileSelect");
-        if (nodes.length){
-            this.getFileList(function(){
-                nodes.each(function(node){
-                    var select = new Element("select").inject(node);
-                    select.addEvent("change", function(e){
-                        this.setValue(e.target.getParent("div").get("name"), e.target.options[e.target.selectedIndex].value, select);
-
-                    }.bind(this));
-                    this.setFileSelectOptions(node, select);
-
-                    var refreshNode = new Element("div", {"styles": this.form.css.propertyRefreshFormNode}).inject(node);
-                    refreshNode.addEvent("click", function(e){
-                        this.getFileList(function(){
-                            this.setFileSelectOptions(node, select);
-                        }.bind(this), true);
-                    }.bind(this));
-                }.bind(this));
-            }.bind(this));
-        }
+        // var nodes = this.propertyContent.getElements(".MWFImageFileSelect");
+        // if (nodes.length){
+        //
+        //
+        //
+        //
+        //     this.getFileList(function(){
+        //         nodes.each(function(node){
+        //             var select = new Element("select").inject(node);
+        //             select.addEvent("change", function(e){
+        //                 this.setValue(e.target.getParent("div").get("name"), e.target.options[e.target.selectedIndex].value, select);
+        //
+        //             }.bind(this));
+        //             this.setFileSelectOptions(node, select);
+        //
+        //             var refreshNode = new Element("div", {"styles": this.form.css.propertyRefreshFormNode}).inject(node);
+        //             refreshNode.addEvent("click", function(e){
+        //                 this.getFileList(function(){
+        //                     this.setFileSelectOptions(node, select);
+        //                 }.bind(this), true);
+        //             }.bind(this));
+        //         }.bind(this));
+        //     }.bind(this));
+        // }
     },
     setFileSelectOptions: function(node, select){
         var name = node.get("name");
@@ -523,7 +527,7 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
         this.fileUploadNode.set("multiple", false);
 
         var fileNode = this.uploadFileAreaNode.getFirst();
-        fileNode.set("accept", "images/*");
+        fileNode.set("accept", ".png,.jpg,.bmp,.gif,.jpeg,.jpe");
         fileNode.click();
 
         //MWF.xDesktop.requireApp("process.FormDesigner", "widget.ImageClipper", function(){
@@ -854,6 +858,9 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
         var cmsviewNodes = this.propertyContent.getElements(".MWFCMSViewSelect");
         var queryviewNodes = this.propertyContent.getElements(".MWFQueryViewSelect");
         var querystatNodes = this.propertyContent.getElements(".MWFQueryStatSelect");
+        var fileNodes = this.propertyContent.getElements(".MWFImageFileSelect");
+        var processFileNodes = this.propertyContent.getElements(".MWFProcessImageFileSelect");
+
         MWF.xDesktop.requireApp("process.ProcessDesigner", "widget.PersonSelector", function(){
             personIdentityNodes.each(function(node){
                 new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.form.designer, {
@@ -921,11 +928,58 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
                 });
             }.bind(this));
 
+            fileNodes.each(function(node){
+                var d = this.data[node.get("name")];
+                var data = d || {};
+                //this.form
+                if (d && typeOf(d)==="string"){
+                    if (this.form.page){
+                        data = {"id": d, "portal": this.form.application}
+                    }else{
+                        data = {"id": d, "application": this.form.application}
+                    }
+                }
+                new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.form.designer, {
+                    "type": "PortalFile",
+                    "count": 1,
+                    "isImage": true,
+                    "values": (data.id) ? [data.id] : [],
+                    "onChange": function(ids){this.saveFileItem(node, ids);}.bind(this)
+                });
+            }.bind(this));
 
+            processFileNodes.each(function(node){
+                var d = this.data[node.get("name")];
+                var data = d || {};
+                //this.form
+                if (d && typeOf(d)==="string"){
+                    if (this.form.page){
+                        data = {"id": d, "portal": this.form.application}
+                    }else{
+                        data = {"id": d, "application": this.form.application}
+                    }
+                }
+                new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.form.designer, {
+                    "type": "ProcessFile",
+                    "count": 1,
+                    "isImage": true,
+                    "values": (data.id) ? [data.id] : [],
+                    "onChange": function(ids){this.saveFileItem(node, ids);}.bind(this)
+                });
+            }.bind(this));
 
 
         }.bind(this));
     },
+    saveFileItem: function(node, ids){
+        if (ids[0]){
+            var file = ids[0].data;
+            this.data[node.get("name")] = file;
+        }else{
+            this.data[node.get("name")] = null;
+        }
+        this.changeData(node.get("name"));
+    },
     saveViewItem: function(node, ids){
         if (ids[0]){
             var view = ids[0].data;

+ 6 - 0
o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js

@@ -77,6 +77,9 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
                             if (this.options.type.toLowerCase()==="dutyname") this.identitys.push(new MWF.widget.O2Duty(data, this.node));
                             if (this.options.type.toLowerCase()==="cmsapplication") this.identitys.push(new MWF.widget.O2CMSApplication(data, this.node));
                             if (this.options.type.toLowerCase()==="cmscategory") this.identitys.push(new MWF.widget.O2CMSCategory(data, this.node));
+
+                            if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(data, this.node));
+                            if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(data, this.node));
                         }.bind(this));
                     }
                 }.bind(this));
@@ -96,6 +99,7 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
                 "count": (this.options.type.toLowerCase()==="duty")? 1: this.options.count,
                 "values": selecteds,
                 "zIndex": 20000,
+                "isImage": this.options.isImage,
                 "onComplete": function(items){
                     this.identitys = [];
                     if (this.options.type.toLowerCase()!=="duty") this.node.empty();
@@ -117,6 +121,8 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
                             if (this.options.type.toLowerCase()==="queryview") this.identitys.push(new MWF.widget.O2QueryView(item.data, this.node));
                             if (this.options.type.toLowerCase()==="querystat") this.identitys.push(new MWF.widget.O2QueryStat(item.data, this.node));
                             if (this.options.type.toLowerCase()==="dutyname") this.identitys.push(new MWF.widget.O2Duty(item.data, this.node));
+                            if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node));
+                            if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node));
                         }.bind(this));
                         if (this.options.type.toLowerCase()==="duty") {
                             items.each(function(item){

+ 1 - 1
o2web/source/x_component_process_ProcessManager/$Main/startMenu.json

@@ -49,7 +49,7 @@
     "sub": []
   },
   {
-    "title": "附件配置",
+    "title": "资源文件",
     "id": "1.1",
     "action": "fileConfig",
     "icon": "process_file.png",

+ 7 - 1
o2web/source/x_component_process_ProcessManager/FileExplorer.js

@@ -160,10 +160,16 @@ MWF.xApplication.process.ProcessManager.FileExplorer.File = new Class({
         return "file.png";
     },
 	_getLnkPar: function(){
+        var url = MWF.Actions.get("x_processplatform_assemble_surface").action.actions.readFile.uri;
+        url = url.replace(/{flag}/, this.data.id);
+        url = url.replace(/{applicationFlag}/, this.data.application);
+        url = "/x_processplatform_assemble_surface"+url;
+        var href = MWF.Actions.getHost("x_processplatform_assemble_surface")+url;
+
 		return {
 			"icon": this.explorer.path+this.explorer.options.style+"/fileIcon/lnk.png",
 			"title": this.data.name,
-			"par": "process.FileDesigner#{\"id\": \""+this.data.id+"\", \"applicationId\": \""+this.explorer.app.options.application.id+"\"}"
+            "par": "@url#"+href
 		};
 	},
 //	deleteItem: function(e){

+ 12 - 7
o2web/source/x_component_process_Xform/Package.js

@@ -78,13 +78,18 @@ MWF.xApplication.process.Xform.Image = MWF.APPImage =  new Class({
             }catch(e){}
         }else if (this.json.srcfile && this.json.srcfile!="none"){
             value = this.json.srcfile;
-            var host = MWF.Actions.getHost("x_portal_assemble_surface");
-            var action = MWF.Actions.get("x_portal_assemble_surface");
-            var uri = action.action.actions.readFile.uri;
-            uri = uri.replace("{flag}", value);
-            uri = uri.replace("{applicationFlag}", this.form.json.application);
-            value = host+"/x_portal_assemble_surface"+uri;
-            this.node.set("src", value);
+            if (typeOf(value)==="object"){
+                var url = (value.portal) ? MWF.xDesktop.getPortalFileUr(value.id, value.portal) : MWF.xDesktop.getProcessFileUr(value.id, value.application);
+                this.node.set("src", url);
+            }else{
+                var host = MWF.Actions.getHost("x_portal_assemble_surface");
+                var action = MWF.Actions.get("x_portal_assemble_surface");
+                var uri = action.action.actions.readFile.uri;
+                uri = uri.replace("{flag}", value);
+                uri = uri.replace("{applicationFlag}", this.form.json.application);
+                value = host+"/x_portal_assemble_surface"+uri;
+                this.node.set("src", value);
+            }
         }else if (typeOf(this.json.src)=="object"){
             var src = MWF.xDesktop.getImageSrc( this.json.src.imageId );
             this.node.set("src", src);

+ 1 - 1
o2web/source/x_component_query_QueryManager/StatExplorer.js

@@ -218,7 +218,7 @@ MWF.xApplication.query.QueryManager.StatExplorer.Stat= new Class({
 	},
 	_getLnkPar: function(){
 		return {
-			"icon": this.explorer.path+this.explorer.options.style+"/processIcon/lnk.png",
+			"icon": this.explorer.path+this.explorer.options.style+"/statIcon/lnk.png",
 			"title": this.data.name,
 			"par": "query.StatDesigner#{\"id\": \""+this.data.id+"\", \"applicationId\": \""+this.data.query+"\"}"
 		};

+ 1 - 1
o2web/source/x_component_query_QueryManager/ViewExplorer.js

@@ -219,7 +219,7 @@ MWF.xApplication.query.QueryManager.ViewExplorer.View= new Class({
 	},
 	_getLnkPar: function(){
 		return {
-			"icon": this.explorer.path+this.explorer.options.style+"/processIcon/lnk.png",
+			"icon": this.explorer.path+this.explorer.options.style+"/viewIcon/lnk.png",
 			"title": this.data.name,
 			"par": "query.ViewDesigner#{\"id\": \""+this.data.id+"\", \"applicationId\": \""+this.data.query+"\"}"
 		};

+ 2 - 0
o2web/source/x_desktop/js/x.js

@@ -23,6 +23,7 @@ o2.addReady(function(){
         }
     }
     if (errorNode) errorNode.destroy();
+    errorNode = null;
 
     //COMMON.setContentPath("/x_desktop");
     //COMMON.AjaxModule.load("ie_adapter", function(){
@@ -50,6 +51,7 @@ o2.addReady(function(){
                             if (loadingNode){
                                 new Fx.Tween(loadingNode).start("opacity", 0).chain(function(){
                                     loadingNode.destroy();
+                                    loadingNode = null;
                                 });
                             }
                         },