hq_1980@hotmail.com 7 anni fa
parent
commit
96abb732c0
100 ha cambiato i file con 838 aggiunte e 213 eliminazioni
  1. 32 14
      o2web/source/o2_core/o2.js
  2. 9 7
      o2web/source/o2_core/o2/o2.core.js
  3. 1 1
      o2web/source/o2_core/o2/widget/$AttachmentSelector/cms/css.wcss
  4. 2 2
      o2web/source/o2_core/o2/widget/$SimpleEditor/chatReceive/Dialog/dialog.html
  5. 2 2
      o2web/source/o2_core/o2/widget/$SimpleEditor/default/Dialog/dialog.html
  6. 2 2
      o2web/source/o2_core/o2/widget/$SimpleEditor/simple/Dialog/dialog.html
  7. 2 2
      o2web/source/o2_core/o2/widget/$Tab/mobileForm_bak/css.wcss
  8. 14 0
      o2web/source/o2_core/o2/widget/AttachmentController.js
  9. 1 1
      o2web/source/o2_core/o2/widget/AudioRecorder.js
  10. 1 0
      o2web/source/o2_core/o2/widget/CssArea.js
  11. 11 0
      o2web/source/o2_core/o2/widget/JavascriptEditor.js
  12. 1 1
      o2web/source/o2_core/o2/widget/MediaRecorder.js
  13. 4 1
      o2web/source/o2_core/o2/widget/Upload.js
  14. 1 1
      o2web/source/o2_core/o2/xAction/services/x_faceset_control.js
  15. 4 0
      o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.json
  16. 1 0
      o2web/source/o2_core/o2/xAction/services/x_organization_assemble_express.json
  17. 6 5
      o2web/source/o2_core/o2/xAction/services/x_portal_assemble_designer.js
  18. 4 3
      o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_designer.js
  19. 1 0
      o2web/source/o2_core/o2/xAction/services/x_program_center.json
  20. 5 0
      o2web/source/o2_core/o2/xDesktop/Access.js
  21. 5 5
      o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js
  22. 2 2
      o2web/source/o2_core/o2/xDesktop/Actions/RestActions_bak.js
  23. 8 4
      o2web/source/o2_core/o2/xDesktop/Authentication.js
  24. 16 11
      o2web/source/o2_core/o2/xDesktop/Common.js
  25. 29 22
      o2web/source/o2_core/o2/xDesktop/Lnk.js
  26. 1 1
      o2web/source/o2_core/o2/xDesktop/WebSocket.js
  27. 32 10
      o2web/source/o2_core/o2/xDesktop/shortcut.js
  28. 7 2
      o2web/source/o2_core/o2/xScript/CMSEnvironment.js
  29. 14 2
      o2web/source/o2_core/o2/xScript/Environment.js
  30. 5 0
      o2web/source/o2_core/o2/xScript/PageEnvironment.js
  31. 4 4
      o2web/source/o2_lib/officecontrol/5040/config.json
  32. 4 4
      o2web/source/o2_lib/officecontrol/config.json
  33. 4 4
      o2web/source/o2_lib/officecontrol/sjgj/config.json
  34. 1 0
      o2web/source/x_component_AppCenter/Main.js
  35. 13 0
      o2web/source/x_component_AppMarket/$Main/default/css.wcss
  36. 108 0
      o2web/source/x_component_AppMarket/Main.js
  37. 4 2
      o2web/source/x_component_AppMarket/lp/zh-cn.js
  38. 1 1
      o2web/source/x_component_Calendar/Common.js
  39. 14 11
      o2web/source/x_component_Calendar/Main.js
  40. 1 1
      o2web/source/x_component_ControlPanel/Main.js
  41. 1 1
      o2web/source/x_component_DesignCenter/Main.js
  42. 1 1
      o2web/source/x_component_FaceSet/Main.js
  43. 5 0
      o2web/source/x_component_File/Main.js
  44. 2 2
      o2web/source/x_component_MinderEditor/$Commands/GFMDescription.html
  45. 6 6
      o2web/source/x_component_MinderEditor/Main.js
  46. 1 1
      o2web/source/x_component_OnlineMeeting/Main.js
  47. BIN
      o2web/source/x_component_Org/$Main/default/icon/ok.png
  48. BIN
      o2web/source/x_component_Org/$Main/default/icon/xls.png
  49. BIN
      o2web/source/x_component_Org/$Main/default/icon/xls32.png
  50. BIN
      o2web/source/x_component_Org/$Main/default/icon/xls60.png
  51. 40 0
      o2web/source/x_component_Org/$Main/default/importCss.css
  52. 6 0
      o2web/source/x_component_Org/$Main/default/importView.html
  53. 6 0
      o2web/source/x_component_Org/$Main/startMenu_admin.json
  54. 1 1
      o2web/source/x_component_Org/List.js
  55. 51 3
      o2web/source/x_component_Org/Main.js
  56. 6 1
      o2web/source/x_component_Org/lp/zh-cn.js
  57. 3 0
      o2web/source/x_component_Selector/Duty.js
  58. 1 1
      o2web/source/x_component_Setting/Main_bak.js
  59. 3 3
      o2web/source/x_component_Setting/SettingIndexUI.js
  60. 1 1
      o2web/source/x_component_Setting/SettingLoginUI.js
  61. 1 1
      o2web/source/x_component_Strategy/Main.js
  62. 1 1
      o2web/source/x_component_cms_DictionaryDesigner/$Main/blank.html
  63. 1 1
      o2web/source/x_component_cms_FormDesigner/$Main/blank.html
  64. 2 2
      o2web/source/x_component_cms_FormDesigner/Module/Form/template/form_mobile.json
  65. 1 1
      o2web/source/x_component_cms_QueryViewDesigner/$Main/blank.html
  66. 1 1
      o2web/source/x_component_cms_ViewDesigner/$Main/blank.html
  67. 4 1
      o2web/source/x_component_cms_Xform/Actionbar.js
  68. 8 8
      o2web/source/x_component_cms_Xform/Attachment.js
  69. 2 2
      o2web/source/x_component_cms_Xform/Office.js
  70. 1 1
      o2web/source/x_component_portal_PageDesigner/$Main/blank.html
  71. 58 14
      o2web/source/x_component_portal_PageDesigner/Import.js
  72. 28 1
      o2web/source/x_component_portal_PageDesigner/Module/Common.js
  73. 43 1
      o2web/source/x_component_portal_PageDesigner/Module/Image.js
  74. 4 0
      o2web/source/x_component_portal_PageDesigner/Module/Image/image.html
  75. 34 0
      o2web/source/x_component_portal_PageDesigner/Module/Page.js
  76. 0 0
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_classical.json
  77. 0 0
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_common.json
  78. 2 2
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_file.json
  79. 2 2
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_mobile.json
  80. 0 0
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_project.json
  81. 0 0
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_tab.json
  82. 0 0
      o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_tab_red.json
  83. 55 5
      o2web/source/x_component_portal_PortalManager/FileExplorer.js
  84. 0 1
      o2web/source/x_component_portal_PortalManager/Main.js
  85. 3 3
      o2web/source/x_component_portal_PortalManager/widget/ApplicationSelector.js
  86. 3 3
      o2web/source/x_component_portal_PortalManager/widget/ProcessSelector.js
  87. 1 1
      o2web/source/x_component_portal_ScriptDesigner/Main.js
  88. 1 1
      o2web/source/x_component_portal_WidgetDesigner/$Main/blank.html
  89. 0 1
      o2web/source/x_component_process_Application/MyWorkExplorer.js
  90. 1 1
      o2web/source/x_component_process_DictionaryDesigner/$Main/blank.html
  91. 1 1
      o2web/source/x_component_process_FormDesigner/$Main/blank.html
  92. 2 2
      o2web/source/x_component_process_FormDesigner/$Main/default/css.wcss
  93. 2 2
      o2web/source/x_component_process_FormDesigner/$Preview/preview1.html
  94. 2 2
      o2web/source/x_component_process_FormDesigner/Main.js
  95. 28 1
      o2web/source/x_component_process_FormDesigner/Module/Common.js
  96. 35 1
      o2web/source/x_component_process_FormDesigner/Module/Form.js
  97. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_classical.json
  98. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_cms_publish.json
  99. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_common.json
  100. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_file.json

+ 32 - 14
o2web/source/o2_core/o2.js

@@ -168,38 +168,46 @@
     this.o2.runCallback = _runCallback;
 
     var _getAllOptions = function(options){
+        var doc = (options && options.doc) || document;
+        if (!doc.unid) doc.unid = _uuid();
         return {
             "noCache": !!(options && options.nocache),
             "reload": !!(options && options.reload),
             "sequence": !!(options && options.sequence),
-            "doc": (options && options.doc) || document,
+            "doc": doc,
             "dom": (options && options.dom) || document.body,
             "position": "beforeend" //'beforebegin' 'afterbegin' 'beforeend' 'afterend'
         }
     };
     var _getCssOptions = function(options){
+        var doc = (options && options.doc) || document;
+        if (!doc.unid) doc.unid = _uuid();
         return {
             "noCache": !!(options && options.nocache),
             "reload": !!(options && options.reload),
             "sequence": !!(options && options.sequence),
-            "doc": (options && options.doc) || document,
+            "doc": doc,
             "dom": (options && options.dom) || null
         }
     };
     var _getJsOptions = function(options){
+        var doc = (options && options.doc) || document;
+        if (!doc.unid) doc.unid = _uuid();
         return {
             "noCache": !!(options && options.nocache),
             "reload": !!(options && options.reload),
-            "sequence": !!(options && options.sequence),
-            "doc": (options && options.doc) || document
+            "sequence": (!(options && options.sequence == false)),
+            "doc": doc
         }
     };
     var _getHtmlOptions = function(options){
+        var doc = (options && options.doc) || document;
+        if (!doc.unid) doc.unid = _uuid();
         return {
             "noCache": !!(options && options.nocache),
             "reload": !!(options && options.reload),
             "sequence": !!(options && options.sequence),
-            "doc": (options && options.doc) || document,
+            "doc": doc,
             "dom": (options && options.dom) || null,
             "position": "beforeend" //'beforebegin' 'afterbegin' 'beforeend' 'afterend'
         }
@@ -263,14 +271,17 @@
         "o2.more": ["/o2_core/o2/o2.more.js"],
         "ie_adapter": ["/o2_lib/o2/ie_adapter.js"],
         "jquery": ["/o2_lib/jquery/jquery.min.js"],
-        "mootools": ["/o2_lib/mootools/mootools-1.6.0.js"],
+        "mootools": ["/o2_lib/mootools/mootools-1.6.0_all.js"],
         "ckeditor": ["/o2_lib/htmleditor/ckeditor/ckeditor.js"],
         "raphael": ["/o2_lib/raphael/raphael.js"],
         "d3": ["/o2_lib/d3/d3.min.js"],
         "ace": ["/o2_lib/ace/src-noconflict/ace.js","/o2_lib/ace/src-noconflict/ext-language_tools.js"],
         "JSBeautifier": ["/o2_lib/JSBeautifier/beautify.js"],
         "JSBeautifier_css": ["/o2_lib/JSBeautifier/beautify-css.js"],
-        "JSBeautifier_html": ["/o2_lib/JSBeautifier/beautify-html.js"]
+        "JSBeautifier_html": ["/o2_lib/JSBeautifier/beautify-html.js"],
+        "JSONTemplate": ["/o2_lib/mootools/plugin/Template.js"],
+        "kity": ["/o2_lib/kityminder/kity/kity.min.js"],
+        "kityminder": ["/o2_lib/kityminder/core/dist/kityminder.core.js"]
     };
     var _loaded = {};
     var _loadedCss = {};
@@ -280,8 +291,10 @@
         var url = module;
         var uuid = _uuid();
         if (op.noCache) url = (url.indexOf("?")!==-1) ? url+"&v="+uuid : addr_uri+"?v="+uuid;
-        var key = encodeURIComponent(url);
-        if (!op.reload) if (_loaded[key]){ if (callback)callback(); return; }
+        var key = encodeURIComponent(url+op.doc.unid);
+        if (!op.reload) if (_loaded[key]){
+            if (callback)callback(); return;
+        }
 
         var head = (op.doc.head || op.doc.getElementsByTagName("head")[0] || op.doc.documentElement);
         var s = op.doc.createElement('script');
@@ -346,7 +359,7 @@
         var uid = _uuid();
         if (op.noCache) url = (url.indexOf("?")!==-1) ? url+"&v="+uid : url+"?v="+uid;
 
-        var key = encodeURIComponent(url);
+        var key = encodeURIComponent(url+op.doc.unid);
         if (!op.reload) if (_loadedCss[key]){ if (callback)callback(_loadedCss[key]); return; }
 
         var success = function(xhr){
@@ -426,8 +439,9 @@
             _loadDisarray(ms, cb, op, thisLoaded, _loadSingleCss, uuid);
         }
     };
-    var _removeCss = function(module){
-        var k = encodeURIComponent(module);
+    var _removeCss = function(module, doc){
+        var thisDoc = doc || document;
+        var k = encodeURIComponent(module+(thisDoc.unid||""));
         var removeCss = _loadedCss[k];
         if (!removeCss) for (key in _loadedCss){
             if (_loadedCss[key].id==module){
@@ -456,7 +470,7 @@
         var url = module;
         var uid = _uuid();
         if (op.noCache) url = (url.indexOf("?")!==-1) ? url+"&v="+uid : url+"?v="+uid;
-        var key = encodeURIComponent(url);
+        var key = encodeURIComponent(url+op.doc.unid);
         if (!op.reload) if (_loadedHtml[key]){ if (callback)callback(_loadedHtml[key]); return; }
 
         var success = function(xhr){
@@ -579,6 +593,10 @@
 
     if (_dom.shouldPoll) _dom.poll();
 
-    if (!window.MooTools) this.o2.load("mootools", function(){ _loadO2(); _dom.check(); });
+    if (!window.MooTools){
+        this.o2.load("mootools", function(){ _loadO2(); _dom.check(); });
+    }else{
+        _loadO2();
+    }
     this.o2.addReady = function(fn){ _dom.addReady.call(_dom, fn); };
 })();

+ 9 - 7
o2web/source/o2_core/o2/o2.core.js

@@ -209,6 +209,7 @@
     };
 
     _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;
@@ -222,13 +223,14 @@
             async: loadAsync,
             withCredentials: credentials,
             onSuccess: function(responseJSON, responseText){
-                var xToken = this.getHeader("x-token");
-                if (xToken){
-                    if (layout){
-                        if (!layout.session) layout.session = {};
-                        layout.session.token = xToken;
-                    }
-                }
+                // var xToken = this.getHeader("authorization");
+                // if (!xToken) xToken = this.getHeader("x-token");
+                // if (xToken){
+                //     if (layout){
+                //         if (!layout.session) layout.session = {};
+                //         layout.session.token = xToken;
+                //     }
+                // }
                 o2.runCallback(callback, "success", [responseJSON])
             },
             onFailure: function(xhr){

+ 1 - 1
o2web/source/o2_core/o2/widget/$AttachmentSelector/cms/css.wcss

@@ -45,7 +45,7 @@
     "width": "30px",
     "height": "30px",
     "float": "right",
-    "background": "url(/x_desktop/res/mwf4/package/widget/$AttachmentSelector/cms/icon/close.png) no-repeat center center",
+    "background": "url(/o2_core/o2/widget/$AttachmentSelector/cms/icon/close.png) no-repeat center center",
     "cursor": "pointer"
   },
   "okButton" : {

+ 2 - 2
o2web/source/o2_core/o2/widget/$SimpleEditor/chatReceive/Dialog/dialog.html

@@ -10,9 +10,9 @@
     </div>
 	-->
 	<div style="height:30px; font-size:12px; line-height:30px;">
-		<span style="background: url(/x_desktop/res/mwf4/package/widget/$SimpleEditor/default/Dialog/img/arrow.gif) no-repeat transparent;height: 8px;left: 20px;position: absolute;top: -8px;width: 15px;">
+		<span style="background: url(/o2_core/o2/widget/$SimpleEditor/default/Dialog/img/arrow.gif) no-repeat transparent;height: 8px;left: 20px;position: absolute;top: -8px;width: 15px;">
 		</span>
-		<span style="background: url(/x_desktop/res/mwf4/package/widget/$SimpleEditor/default/Dialog/img/close.gif) no-repeat transparent;cursor: pointer;height: 16px;position: absolute;right: 6px;top:6px;width:16px;" class="MWF_dialod_close">
+		<span style="background: url(/o2_core/o2/widget/$SimpleEditor/default/Dialog/img/close.gif) no-repeat transparent;cursor: pointer;height: 16px;position: absolute;right: 6px;top:6px;width:16px;" class="MWF_dialod_close">
 		</span>
 	</div>
     <div style="border-left: 1px solid #cdcdcd; border-right: 1px solid #cdcdcd" class="MWF_dialod_content">

+ 2 - 2
o2web/source/o2_core/o2/widget/$SimpleEditor/default/Dialog/dialog.html

@@ -10,9 +10,9 @@
     </div>
 	-->
 	<div style="height:30px; font-size:12px; line-height:30px;">
-		<span style="background: url(/x_desktop/res/mwf4/package/widget/$SimpleEditor/default/Dialog/img/arrow.gif) no-repeat transparent;height: 8px;left: 20px;position: absolute;top: -8px;width: 15px;">
+		<span style="background: url(/o2_core/o2/widget/$SimpleEditor/default/Dialog/img/arrow.gif) no-repeat transparent;height: 8px;left: 20px;position: absolute;top: -8px;width: 15px;">
 		</span>
-		<span style="background: url(/x_desktop/res/mwf4/package/widget/$SimpleEditor/default/Dialog/img/close.gif) no-repeat transparent;cursor: pointer;height: 16px;position: absolute;right: 6px;top:6px;width:16px;" class="MWF_dialod_close">
+		<span style="background: url(/o2_core/o2/widget/$SimpleEditor/default/Dialog/img/close.gif) no-repeat transparent;cursor: pointer;height: 16px;position: absolute;right: 6px;top:6px;width:16px;" class="MWF_dialod_close">
 		</span>
 	</div>
     <div style="border-left: 1px solid #cdcdcd; border-right: 1px solid #cdcdcd" class="MWF_dialod_content">

+ 2 - 2
o2web/source/o2_core/o2/widget/$SimpleEditor/simple/Dialog/dialog.html

@@ -10,9 +10,9 @@
     </div>
 	-->
 	<div style="height:30px; font-size:12px; line-height:30px;">
-		<span style="background: url(/x_desktop/res/mwf4/package/widget/$SimpleEditor/default/Dialog/img/arrow.gif) no-repeat transparent;height: 8px;left: 20px;position: absolute;top: -8px;width: 15px;">
+		<span style="background: url(/o2_core/o2/widget/$SimpleEditor/default/Dialog/img/arrow.gif) no-repeat transparent;height: 8px;left: 20px;position: absolute;top: -8px;width: 15px;">
 		</span>
-		<span style="background: url(/x_desktop/res/mwf4/package/widget/$SimpleEditor/default/Dialog/img/close.gif) no-repeat transparent;cursor: pointer;height: 16px;position: absolute;right: 6px;top:6px;width:16px;" class="MWF_dialod_close">
+		<span style="background: url(/o2_core/o2/widget/$SimpleEditor/default/Dialog/img/close.gif) no-repeat transparent;cursor: pointer;height: 16px;position: absolute;right: 6px;top:6px;width:16px;" class="MWF_dialod_close">
 		</span>
 	</div>
     <div style="border-left: 1px solid #cdcdcd; border-right: 1px solid #cdcdcd" class="MWF_dialod_content">

+ 2 - 2
o2web/source/o2_core/o2/widget/$Tab/mobileForm_bak/css.wcss

@@ -22,7 +22,7 @@
         "height": "30px",
         "cursor": "pointer",
         "min-width": "70px",
-        "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabAreaBg.gif) center center",
+        "background": "url(/o2_core/o2/widget/$Tab/default/tabAreaBg.gif) center center",
         "border": "0px"
     },
 	"tabTextNode": {
@@ -47,7 +47,7 @@
         "float": "left",
         "height": "30px",
         "min-width": "70px",
-        "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabAreaBg.gif) center center",
+        "background": "url(/o2_core/o2/widget/$Tab/default/tabAreaBg.gif) center center",
         "border-bottom": "2px solid #bf6364"
     },
 	"tabTextNodeCurrent": {

+ 14 - 0
o2web/source/o2_core/o2/widget/AttachmentController.js

@@ -826,6 +826,13 @@ o2.widget.AttachmentController.Attachment = new Class({
         this.seq = this.controller.attachments.length+1;
         this.load();
 	},
+    _getLnkPar: function(url){
+        return {
+            "icon": this.getIcon(),
+            "title": this.data.name,
+            "par": "@url#"+url
+        };
+    },
     load: function(){
         this.node = new Element("div").inject(this.content);
         switch (this.controller.options.listStyle){
@@ -842,6 +849,13 @@ o2.widget.AttachmentController.Attachment = new Class({
                 this.loadSequence();
                 break;
         }
+
+        this.controller.module.getAttachmentUrl(this, function(url){
+            this.node.makeLnk({
+                "par": this._getLnkPar(url)
+            });
+        }.bind(this));
+
         this.createInforNode(function(){
             if (!Browser.Platform.ios){
                 this.tooltip = new mBox.Tooltip({

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

@@ -22,7 +22,7 @@ o2.widget.AudioRecorder = new Class({
             this.cssPath = o2.session.path+"/widget/$AudioRecorder/"+this.options.style+"/css.wcss";
             this._loadCss();
         }
-        COMMON.AjaxModule.loadDom(COMMON.contentPath+"/res/framework/adapter/adapter.js", function(){
+        COMMON.AjaxModule.loadDom("/o2_lib/adapter/adapter.js", function(){
             this.load();
         }.bind(this));
 	},

+ 1 - 0
o2web/source/o2_core/o2/widget/CssArea.js

@@ -1,4 +1,5 @@
 o2.widget = o2.widget || {};
+o2.require("o2.widget.ScriptArea", null, false);
 o2.require("o2.widget.CssEditor", null, false);
 o2.widget.CssArea = new Class({
     Implements: [Options, Events],

+ 11 - 0
o2web/source/o2_core/o2/widget/JavascriptEditor.js

@@ -186,6 +186,17 @@ o2.widget.JavascriptEditor = new Class({
                 readOnly: false // false if this command should not apply in readOnly mode
             });
 
+            this.editor.commands.addCommand({
+                name: "showKeyboardShortcuts",
+                bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
+                exec: function(editor) {
+                    ace.config.loadModule("ace/ext/keybinding_menu", function(module) {
+                        module.init(editor);
+                        editor.showKeyboardShortcuts()
+                    })
+                }.bind(this)
+            });
+
             this.node.addEvent("keydown", function(e){
                 e.stopPropagation();
             });

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

@@ -57,7 +57,7 @@ o2.widget.MediaRecorder = o2.MediaRecorder = new Class({
 	//	return flag;
 	//},
 	loadResource : function( callback ){
-		var path = "/x_desktop/res/framework/webrtc/adapter/adapter.js";
+		var path = "/o2_lib/adapter/adapter.js";
 		COMMON.AjaxModule.load( path, function () {
 			if (callback)callback();
 		}.bind(this));

+ 4 - 1
o2web/source/o2_core/o2/widget/Upload.js

@@ -18,7 +18,7 @@ o2.widget.Upload = new Class({
 		this._loadCss();
 		this.container = $(container);
 
-		this.action = (typeOf(this.options.action)=="string") ? o2.Actions.get(action).action : this.options.action;
+		this.action = (typeOf(this.options.action)=="string") ? o2.Actions.get(this.options.action).action : this.options.action;
 	},
     load: function(){
         if (FormData.expiredIE){
@@ -42,6 +42,7 @@ o2.widget.Upload = new Class({
         }
     },
     formData_Upload: function(){
+        debugger;
         var files = this.fileUploadNode.files;
         if (files.length){
             var count = files.length;
@@ -57,6 +58,8 @@ o2.widget.Upload = new Class({
             if (this.isContinue){
                 for (var i = 0; i < files.length; i++) {
                     var file = files.item(i);
+                    this.fireEvent("beforeUploadEntry", [file, this]);
+
                     var formData = new FormData();
                     Object.each(this.options.data, function(v, k){
                         formData.append(k, v)

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

@@ -27,7 +27,7 @@ MWF.xAction.RestActions.Action["x_faceset_control"] = new Class({
 MWF.xAction.RestActions.Action["x_faceset_control"].RestActions = new Class({
     Extends: MWF.xDesktop.Actions.RestActions,
     getAddress: function(success, failure){
-        this.address = "http://dev.o2oa.io:8888/"+this.serviceName;
+        this.address = "http://dev.o2oa.net:8888/"+this.serviceName;
         if (success) success.apply();
     }
 });

+ 4 - 0
o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.json

@@ -212,5 +212,9 @@
   "listUnitdutyPrev": {"uri": "/jaxrs/unitduty/list/{id}/prev/{count}"},
   //-------------------------------------------------------------
 
+  "getImportPersonTemplate": {"uri": "/jaxrs/inputperson/template"},
+  "getImportPersonResault": {"uri": "/jaxrs/inputperson/result/flag/{flag}"},
+  "importPerson": {"uri": "/jaxrs/inputperson", "method": "POST", "enctype": "formData"},
+
   "clazz": "x_organization_assemble_control"
 }

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

@@ -144,4 +144,5 @@
   "listUnitAttributeName": {"uri": "/jaxrs/unitattribute/list/name/unit", "method": "POST"}, //列出组织所有属性的名称
   "listUnitAllAttribute": {"uri": "/jaxrs/unitattribute/list/unit/object", "method": "POST"} //列出组织的所有属性
   //******************************************************************
+
 }

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

@@ -1,8 +1,9 @@
 MWF.xAction.RestActions.Action["x_portal_assemble_designer"] = new Class({
     Extends: MWF.xAction.RestActions.Action,
-    getUUID: function(success){
+    getUUID: function(success, async){
+        var sync = (async !== false);
         var id = "";
-        this.action.invoke({"name": "getId","async": false, "parameter": {"count": "1"}, "success": function(ids){
+        this.action.invoke({"name": "getId","async": sync, "parameter": {"count": "1"}, "success": function(ids){
             id = ids.data[0].id;
             if (success) success(id);
         },	"failure": null});
@@ -55,14 +56,14 @@ MWF.xAction.RestActions.Action["x_portal_assemble_designer"] = new Class({
         this.action.invoke({"name": "updatePage","data": json,"parameter": {"id": pageData.json.id},"success": success,"failure": failure});
     },
 
-    saveFile: function(data, success, failure){
+    saveFile: function(data, success, failure, async){
         if (data.id){
             this.updataFile(data.id, data, success, failure);
         }else{
             this.getUUID(function(id){
                 data.id = id;
-                this.addFile(data, success, failure);
-            }.bind(this));
+                this.addFile(data, success, failure, async);
+            }.bind(this), false);
 
         }
     },

+ 4 - 3
o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_designer.js

@@ -4,9 +4,10 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_designer"] = new Clas
     getId: function(count, success, failure, async){
         this.action.invoke({"name": "getId","async": async, "parameter": {"count": count},	"success": success,	"failure": failure});
     },
-    getUUID: function(success){
+    getUUID: function(success, async){
+        var sync = (async !== false);
         var id = "";
-        this.action.invoke({"name": "getId","async": false, "parameter": {"count": "1"}, "success": function(ids){
+        this.action.invoke({"name": "getId","async": sync, "parameter": {"count": "1"}, "success": function(ids){
             id = ids.data[0].id;
             if (success) success(id);
         },	"failure": null});
@@ -181,7 +182,7 @@ MWF.xAction.RestActions.Action["x_processplatform_assemble_designer"] = new Clas
             this.getUUID(function(id){
                 data.id = id;
                 this.addFile(data, success, failure, async);
-            }.bind(this));
+            }.bind(this), false);
 
         }
     },

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

@@ -18,6 +18,7 @@
   "listModule": {"uri": "/jaxrs/module/list", "method": "PUT"},
   "compareModule": {"uri": "/jaxrs/module/{id}/compare"},
   "importModule": {"uri": "/jaxrs/module/write/{flag}", "method": "PUT"},
+  "compareUpload": {"uri": "/jaxrs/module/compare/upload", "method": "PUT", "enctype": "formData"},
 
   "outputStructure": {"uri": "/jaxrs/module/output/structure"},
   "outputCreate": {"uri": "/jaxrs/module/output", "method": "PUT"},

+ 5 - 0
o2web/source/o2_core/o2/xDesktop/Access.js

@@ -18,6 +18,11 @@ MWF.xDesktop.Access = MWF.AC = {
         this.getRoleList();
         return (layout.desktop.session.user.name.toLowerCase() === "xadmin") || (this.roleList.indexOf("manager")!==-1);
     },
+    isProcessManager: function(){
+        if (!layout.desktop.session.user.roleList) return false;
+        this.getRoleList();
+        return this.isAdministrator() || (this.roleList.indexOf("processplatformmanager")!==-1);
+    },
     isOrganizationManager: function(){
         if (!layout.desktop.session.user.roleList) return false;
         this.getRoleList();

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

@@ -266,7 +266,7 @@ MWF.xDesktop.Actions.RestActions = new Class({
                             dataId = json.data.id;
                         }
 
-                        MWF.runCallback(callback, "onSuccess", [{
+                        MWF.runCallback(callback, "success", [{
                             "type": "success",
                             "id": dataId,
                             "data": json.data
@@ -283,20 +283,20 @@ MWF.xDesktop.Actions.RestActions = new Class({
                         if (t=="object"){
                             dataId = json.data.id;
                         }
-                        MWF.runCallback(callback, "onSuccess", [{
+                        MWF.runCallback(callback, "success", [{
                             "type": "success",
                             "id": dataId
                         }, xhr.responseText]);
                         break;
                     case "error":
-                        MWF.runCallback(callback, "onFailure", [xhr]);
+                        MWF.runCallback(callback, "failure", [xhr]);
                         break;
                 }
             }else{
-                MWF.runCallback(callback, "onFailure", [xhr]);
+                MWF.runCallback(callback, "failure", [xhr]);
             }
         }else{
-            MWF.runCallback(callback, "onFailure", [xhr]);
+            MWF.runCallback(callback, "failure", [xhr]);
         }
     },
 

+ 2 - 2
o2web/source/o2_core/o2/xDesktop/Actions/RestActions_bak.js

@@ -215,12 +215,12 @@ MWF.xDesktop.Actions.RestActions = new Class({
 			status = (status == 1223) ? 204 : status;
 			
 			if ((status >= 200 && status < 300)){
-				MWF.runCallback(callback, "onSuccess", [{
+				MWF.runCallback(callback, "success", [{
 					"type": "success",
                     "id": dataId
 				}, xhr.responseText]);
 			}else{
-				MWF.runCallback(callback, "onFailure", [xhr]);
+				MWF.runCallback(callback, "failure", [xhr]);
 			}
 		};
 		if (xhr.upload){

+ 8 - 4
o2web/source/o2_core/o2/xDesktop/Authentication.js

@@ -55,6 +55,7 @@ MWF.xDesktop.Authentication = new Class({
         this.postLogin = function( json ){
             layout.desktop.session.user = json.data;
             layout.session.user = json.data;
+            layout.session.token = layout.session.user.token;
             var user = layout.desktop.session.user;
 
             if (user.roleList) {
@@ -146,7 +147,7 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
 
         if (this.faceLogin){
             if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-                COMMON.AjaxModule.loadDom(COMMON.contentPath + "/res/framework/adapter/adapter.js", function () {
+                COMMON.AjaxModule.loadDom("/o2_lib/adapter/adapter.js", function () {
                     if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
                         //暂时隐藏此功能
                         this.cameraLoginIcon = new Element("div", {"styles": this.explorer.css.cameraLoginIcon}).inject(this.formTopContentNode);
@@ -231,6 +232,8 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
         this.videoStart();
     },
     videoStart: function(){
+        alert("??????");
+        debugger;
         this.video.addEventListener("canplay", function(){
             window.setTimeout(function(){
                 this.startCameraAuthentication();
@@ -264,6 +267,7 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
     },
     //检测出身份
     checkUserFace: function(formData){
+
         var faceset = window.location.host;
         faceset = faceset.replace(/\./g, "_");
         this.faceAction.search(faceset, formData.data, {"name": "pic", "size": formData.size}, function(json){
@@ -375,8 +379,8 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
     },
 
     cameraLoginSuccess: function(){
-        COMMON.AjaxModule.loadDom(COMMON.contentPath+"/res/framework/CryptoJS/tripledes.js", function(){
-            COMMON.AjaxModule.loadDom(COMMON.contentPath+"/res/framework/CryptoJS/mode-ecb.js", function(){
+        COMMON.AjaxModule.loadDom(["/o2_lib/CryptoJS/tripledes.js", "/o2_lib/CryptoJS/mode-ecb.js"], function(){
+            //COMMON.AjaxModule.loadDom(, function(){
 
                 var addressObj = layout.desktop.serviceAddressList["x_organization_assemble_authentication"];
                 var url = layout.config.app_protocol+"//"+addressObj.host+(addressObj.port===80 ? "" : ":"+addressObj.port)+addressObj.context;
@@ -409,7 +413,7 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
                 });
                 res.send();
 
-            }.bind(this));
+            //}.bind(this));
         }.bind(this));
     },
 

+ 16 - 11
o2web/source/o2_core/o2/xDesktop/Common.js

@@ -409,18 +409,23 @@ MWF.org = {
             "unitLevel": data.unitLevel,
             "unitLevelName": data.unitLevelName
         };
-        if (!flat){
-            var woPerson = data.woPerson;
-            if (!data.woPerson){
-                MWF.require("MWF.xDesktop.Actions.RestActions", null, false);
-                this.action = new MWF.xDesktop.Actions.RestActions("", "x_organization_assemble_control_alpha");
-                var uri = "/jaxrs/person/{flag}";
-                uri = uri.replace("{flag}", data.person);
+        var woPerson = data.woPerson;
+        if (!data.woPerson){
+            MWF.require("MWF.xDesktop.Actions.RestActions", null, false);
+            this.action = new MWF.xDesktop.Actions.RestActions("", "x_organization_assemble_control_alpha");
+            var uri = "/jaxrs/person/{flag}";
+            uri = uri.replace("{flag}", data.person);
 
-                this.action.invoke({"uri": uri, "success": function(json){
-                    woPerson = json.data;
-                }.bind(this)});
-            }
+            this.action.invoke({"uri": uri, "success": function(json){
+                woPerson = json.data;
+            }.bind(this)});
+        }
+        rData.personName = woPerson.name;
+        rData.personEmployee = woPerson.employee;
+        rData.personUnique = woPerson.unique;
+        rData.personDn = woPerson.distinguishedName;
+
+        if (!flat){
             rData.woPerson = {
                 "id": woPerson.id,
                 "genderType": woPerson.genderType,

+ 29 - 22
o2web/source/o2_core/o2/xDesktop/Lnk.js

@@ -49,7 +49,11 @@ MWF.xDesktop.LnkMaker = new Class({
 		var moveNode = new Element("div", {
 			"styles": this.desktop.css.lnkMoveNode
 		}).inject(this.desktop.desktopNode);
-		
+		var size = this.node.getSize();
+        moveNode.setStyles({
+			"width": ""+size.x+"px",
+            "height": ""+size.y+"px"
+		});
 		this.node.clone().inject(moveNode);
 		moveNode.position({"relativeTo": this.node});
 		
@@ -392,31 +396,34 @@ MWF.xDesktop.Lnk = new Class({
 	},
 	open: function(e){
 		if (!this.isSwing){
-			var parList = this.par.split("#");
-			var appName = parList[0];
-			var statusStr = parList[1] || ""; 
-			var status = JSON.decode(statusStr, false);
+            var parList = this.par.split("#");
+            var appName = parList[0];
+            var statusStr = parList[1] || "";
+            if (appName.toLowerCase()==="@url"){
+                window.open(statusStr);
+            }else{
+                var status = JSON.decode(statusStr, false);
 
-            var options = {};
-            if (status){
-                if (status.appId){
-                    options = {
-                        "appId": status.appId,
-                        "onQueryLoad": function(){
-                            this.status = status;
-                        }
-                    };
-                }else{
-                    options = {
-                        "onQueryLoad": function(){
-                            this.status = status;
-                        }
-                    };
+                var options = {};
+                if (status){
+                    if (status.appId){
+                        options = {
+                            "appId": status.appId,
+                            "onQueryLoad": function(){
+                                this.status = status;
+                            }
+                        };
+                    }else{
+                        options = {
+                            "onQueryLoad": function(){
+                                this.status = status;
+                            }
+                        };
+                    }
                 }
+                this.desktop.openApplication(e, appName, options);
             }
 
-
-			this.desktop.openApplication(e, appName, options);
 		}else{
 			this.stopSwingFun = function(){
 				this.lnkMove.stopSwing();

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

@@ -10,7 +10,7 @@ MWF.xDesktop.WebSocket = new Class({
         this.ws = "ws://"+addressObj.host+(addressObj.port==80 ? "" : ":"+addressObj.port)+addressObj.context+"/ws/collaboration";
         //var ws = "ws://hbxa01.bf.ctc.com/x_collaboration_assemble_websocket/ws/collaboration";
 
-        this.ws = this.ws+"?x-token="+encodeURIComponent(Cookie.read("x-token"));
+        this.ws = this.ws+"?x-token="+encodeURIComponent(Cookie.read("x-token"))+"&authorization="+encodeURIComponent(Cookie.read("x-token"));
 
         this.webSocket = new WebSocket(this.ws);
         this.webSocket.onopen = function (e){this.onOpen(e);}.bind(this);

+ 32 - 10
o2web/source/o2_core/o2/xDesktop/shortcut.js

@@ -30,6 +30,18 @@ MWF.shortcut = {
             layout.desktop.apps[key].close();
         });
         keys = null;
+    },
+    minDesktop: function(){
+        var keys = Object.keys(layout.desktop.apps);
+        keys.each(function(key){
+            layout.desktop.apps[key].minSize();
+        });
+    },
+    maxDesktop: function(){
+        var keys = Object.keys(layout.desktop.apps);
+        keys.each(function(key){
+            layout.desktop.apps[key].maxSize();
+        });
     }
 };
 
@@ -46,19 +58,29 @@ MWF.shortcut.keyboard = new Keyboard({
         "meta+v": function(e){MWF.shortcut.paste(e);},
         "meta+s": function(e){MWF.shortcut.save(e);},
 
-        "ctrl+alt+o": function(e){MWF.shortcut.openApplication("Org");},
-        "ctrl+alt+s": function(e){MWF.shortcut.openApplication("Setting");},
+        "ctrl+alt+o": function(e){MWF.shortcut.openApplication("Org"); e.stopPropagation();},
+        "ctrl+alt+s": function(e){MWF.shortcut.openApplication("Setting"); e.stopPropagation();},
+        "ctrl+alt+b": function(e){MWF.shortcut.openApplication("BAM");},
 
-        "ctrl+alt+f": function(e){MWF.shortcut.openApplication("process.ApplicationExplorer");},
-        "ctrl+alt+p": function(e){MWF.shortcut.openApplication("portal.PortalExplorer");},
-        "ctrl+alt+c": function(e){MWF.shortcut.openApplication("cms.Column");},
-        "ctrl+alt+q": function(e){MWF.shortcut.openApplication("query.QueryExplorer");},
-        //"shift+s": function(e){MWF.shortcut.openApplication("service.ServiceManager");},
+        "ctrl+alt+f": function(e){MWF.shortcut.openApplication("process.ApplicationExplorer"); e.stopPropagation();},
+        "ctrl+alt+p": function(e){MWF.shortcut.openApplication("portal.PortalExplorer"); e.stopPropagation();},
+        "ctrl+alt+c": function(e){MWF.shortcut.openApplication("cms.Column"); e.stopPropagation();},
+        "ctrl+alt+q": function(e){MWF.shortcut.openApplication("query.QueryExplorer"); e.stopPropagation();},
+        "ctrl+alt+v": function(e){MWF.shortcut.openApplication("service.ServiceManager"); e.stopPropagation();},
+//"shift+s": function(e){MWF.shortcut.openApplication("service.ServiceManager");},
 
-        "ctrl+alt+t": function(e){MWF.shortcut.openApplication("process.TaskCenter");},
-        "ctrl+alt+i": function(e){MWF.shortcut.openApplication("cms.Index");},
+        "ctrl+alt+t": function(e){MWF.shortcut.openApplication("process.TaskCenter"); e.stopPropagation();},
+        "ctrl+alt+i": function(e){MWF.shortcut.openApplication("cms.Index"); e.stopPropagation();},
+        "ctrl+alt+a": function(e){MWF.shortcut.openApplication("File"); e.stopPropagation();},
+        "ctrl+alt+r": function(e){MWF.shortcut.openApplication("Calendar"); e.stopPropagation();},
+        "ctrl+alt+n": function(e){MWF.shortcut.openApplication("Note"); e.stopPropagation();},
+        "ctrl+alt+m": function(e){MWF.shortcut.openApplication("Meeting"); e.stopPropagation();},
+        "ctrl+alt+l": function(e){MWF.shortcut.openApplication("Forum"); e.stopPropagation();},
+        "ctrl+alt+k": function(e){MWF.shortcut.openApplication("Attendance"); e.stopPropagation();},
 
-        "ctrl+alt+d": function(e){MWF.shortcut.clearDesktop();},
+        "ctrl+alt+d": function(e){MWF.shortcut.clearDesktop(); e.stopPropagation();},
+        "ctrl+alt+-": function(e){MWF.shortcut.minDesktop(); e.stopPropagation();},
+        "ctrl+alt+=": function(e){MWF.shortcut.maxDesktop(); e.stopPropagation();},
 
         "delete": function(e){MWF.shortcut.keyDelete(e);}
     }

+ 7 - 2
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -585,10 +585,14 @@ MWF.xScript.CMSEnvironment = function(ev){
                 var viewJson = {
                     "application": view.application || _form.json.application,
                     "viewName": view.view || "",
-                    "isTitle": view.isTitle || "yes",
-                    "select": view.select || "multi"
+                    "isTitle": (view.isTitle===false) ? "no" : "yes",
+                    "select": (view.isMulti===false) ? "single" : "multi",
+                    "filter": view.filter
                 };
                 if (!options) options = {};
+                options.width = view.width;
+                options.height = view.height;
+                options.title = view.caption;
                 var width = options.width || "700";
                 var height = options.height || "400";
 
@@ -1060,6 +1064,7 @@ MWF.xScript.CMSEnvironment = function(ev){
     this.event = ev.event;
     this.status = ev.status;
     this.session = layout.desktop.session;
+    this.Actions = o2.Actions;
 };
 
 MWF.xScript.CMSJSONData = function(data, callback, key, parent){

+ 14 - 2
o2web/source/o2_core/o2/xScript/Environment.js

@@ -7,6 +7,13 @@ MWF.xScript.Environment = function(ev){
     this.library = COMMON;
     //this.library.version = "4.0";
 
+    this.power = {
+        "isManager": MWF.AC.isProcessManager() || _form.businessData.control.allowReroute,
+        "isReseter": _form.businessData.control.allowReset,
+        "isDelete": _form.businessData.control.allowDeleteWork,
+        "isPront": true,
+        "isPrint": true
+    };
     //data
     var getJSONData = function(jData){
         return new MWF.xScript.JSONData(jData, function(data, key, _self){
@@ -767,10 +774,14 @@ MWF.xScript.Environment = function(ev){
                 var viewJson = {
                     "application": view.application || _form.json.application,
                     "viewName": view.view || "",
-                    "isTitle": view.isTitle || "yes",
-                    "select": view.select || "multi"
+                    "isTitle": (view.isTitle===false) ? "no" : "yes",
+                    "select": (view.isMulti===false) ? "single" : "multi",
+                    "filter": view.filter
                 };
                 if (!options) options = {};
+                options.width = view.width;
+                options.height = view.height;
+                options.title = view.caption;
                 var width = options.width || "700";
                 var height = options.height || "400";
 
@@ -1164,6 +1175,7 @@ MWF.xScript.Environment = function(ev){
     this.event = ev.event;
     this.status = ev.status;
     this.session = layout.desktop.session;
+    this.Actions = o2.Actions;
 };
 
 

+ 5 - 0
o2web/source/o2_core/o2/xScript/PageEnvironment.js

@@ -639,6 +639,10 @@ MWF.xScript.PageEnvironment = function(ev){
                     "filter": view.filter
                 };
                 if (!options) options = {};
+                options.width = view.width;
+                options.height = view.height;
+                options.title = view.caption;
+
                 var width = options.width || "700";
                 var height = options.height || "400";
 
@@ -999,5 +1003,6 @@ MWF.xScript.PageEnvironment = function(ev){
     this.event = ev.event;
     this.status = ev.status;
     this.session = layout.desktop.session;
+    this.Actions = o2.Actions;
 };
 

+ 4 - 4
o2web/source/o2_lib/officecontrol/5040/config.json

@@ -3,11 +3,11 @@
   "makerKey": "E138DABB4AC26C2D8E09FAE59AB3BDE87AFB9D7B",
   "version": "5.0.4.0",
   "clsid": "A64E3073-2016-4baf-A89D-FFE1FAA10EC0",
-  "codeBase": "/x_desktop/res/framework/officecontrol/5040/OfficeControl.cab",
+  "codeBase": "/o2_lib/officecontrol/5040/OfficeControl.cab",
   "clsid64": "A64E3073-2016-4baf-A89D-FFE1FAA10EE1",
-  "codeBase64": "/x_desktop/res/framework/officecontrol/5040/ofctnewclsid.cab",
+  "codeBase64": "/o2_lib/officecontrol/5040/ofctnewclsid.cab",
   "pdfType": "PDF.NtkoDocument",
   "pdfVersion": "4.0.0.3",
-  "pdfCodeBase": "/x_desktop/res/framework/officecontrol/5040/ntkooledocall.cab",
-  "pdfCodeBase64": "/x_desktop/res/framework/officecontrol/5040/ntkooledocall64.cab"
+  "pdfCodeBase": "/o2_lib/officecontrol/5040/ntkooledocall.cab",
+  "pdfCodeBase64": "/o2_lib/officecontrol/5040/ntkooledocall64.cab"
 }

+ 4 - 4
o2web/source/o2_lib/officecontrol/config.json

@@ -3,11 +3,11 @@
   "makerKey": "E138DABB4AC26C2D8E09FAE59AB3BDE87AFB9D7B",
   "version": "5.0.4.0",
   "clsid": "A64E3073-2016-4baf-A89D-FFE1FAA10EC0",
-  "codeBase": "/x_desktop/res/framework/officecontrol/5040/OfficeControl.cab",
+  "codeBase": "/o2_lib/officecontrol/5040/OfficeControl.cab",
   "clsid64": "A64E3073-2016-4baf-A89D-FFE1FAA10EE1",
-  "codeBase64": "/x_desktop/res/framework/officecontrol/5040/ofctnewclsid.cab",
+  "codeBase64": "/o2_lib/officecontrol/5040/ofctnewclsid.cab",
   "pdfType": "PDF.NtkoDocument",
   "pdfVersion": "4.0.1.0",
-  "pdfCodeBase": "/x_desktop/res/framework/officecontrol/5040/ntkooledocall.cab",
-  "pdfCodeBase64": "/x_desktop/res/framework/officecontrol/5040/ntkooledocall64.cab"
+  "pdfCodeBase": "/o2_lib/officecontrol/5040/ntkooledocall.cab",
+  "pdfCodeBase64": "/o2_lib/officecontrol/5040/ntkooledocall64.cab"
 }

+ 4 - 4
o2web/source/o2_lib/officecontrol/sjgj/config.json

@@ -3,11 +3,11 @@
   "makerKey": "E138DABB4AC26C2D8E09FAE59AB3BDE87AFB9D7B",
   "version": "5.0.3.1",
   "clsid": "A64E3073-2016-4baf-A89D-FFE1FAA10EC0",
-  "codeBase": "/x_desktop/res/framework/officecontrol/sjgj/OfficeControl.cab",
+  "codeBase": "/o2_lib/officecontrol/sjgj/OfficeControl.cab",
   "clsid64": "A64E3073-2016-4baf-A89D-FFE1FAA10EE1",
-  "codeBase64": "/x_desktop/res/framework/officecontrol/sjgj/OfficeControlx64.cab",
+  "codeBase64": "/o2_lib/officecontrol/sjgj/OfficeControlx64.cab",
   "pdfType": "PDF.NtkoDocument",
   "pdfVersion": "4.0.0.3",
-  "pdfCodeBase": "/x_desktop/res/framework/officecontrol/sjgj/ntkooledocall.cab",
-  "pdfCodeBase64": "/x_desktop/res/framework/officecontrol/sjgj/ntkooledocallx64.cab"
+  "pdfCodeBase": "/o2_lib/officecontrol/sjgj/ntkooledocall.cab",
+  "pdfCodeBase64": "/o2_lib/officecontrol/sjgj/ntkooledocallx64.cab"
 }

+ 1 - 0
o2web/source/x_component_AppCenter/Main.js

@@ -160,6 +160,7 @@ MWF.xApplication.AppCenter.Exporter = new Class({
         var height = size.y*0.9;
         var x = (size.x-width)/2;
         var y = (size.y-height)/2;
+        if (y<80) y = 80;
 
         var _self = this;
         MWF.require("MWF.xDesktop.Dialog", function(){

+ 13 - 0
o2web/source/x_component_AppMarket/$Main/default/css.wcss

@@ -4,6 +4,19 @@
         "height": "50px",
         "background-color": "#4c6b87"
     },
+    "titleActionNode": {
+        "float": "right",
+        "margin-right": "20px",
+        "height": "26px",
+        "border": "1px solid #ffffff",
+        "border-radius": "5px",
+        "line-height": "26px",
+        "text-align": "center",
+        "padding": "0 20px",
+        "margin-top": "12px",
+        "cursor": "pointer",
+        "color": "#ffffff"
+    },
     "titleTextNode": {
         "padding-left": "20px",
         "color": "#FFF",

+ 108 - 0
o2web/source/x_component_AppMarket/Main.js

@@ -28,7 +28,73 @@ MWF.xApplication.AppMarket.Main = new Class({
 
     loadTitle: function(){
         this.titleBar = new Element("div", {"styles": this.css.titleBar}).inject(this.content);
+        this.titleActionNode = new Element("div", {"styles": this.css.titleActionNode,"text": this.lp.implodeLocal}).inject(this.titleBar);
         this.taskTitleTextNode = new Element("div", {"styles": this.css.titleTextNode,"text": this.lp.title}).inject(this.titleBar);
+        this.titleActionNode.addEvent("click", function(){
+            this.implodeLocal();
+        }.bind(this));
+    },
+    implodeLocal: function(){
+        if (!this.uploadFileAreaNode){
+            this.uploadFileAreaNode = new Element("div");
+            var html = "<input name=\"file\" type=\"file\" accept=\".xapp\"/>";
+            this.uploadFileAreaNode.set("html", html);
+            this.fileUploadNode = this.uploadFileAreaNode.getFirst();
+            this.fileUploadNode.addEvent("change", this.implodeLocalFile.bind(this));
+        }else{
+            if (this.fileUploadNode) this.fileUploadNode.destroy();
+            this.uploadFileAreaNode.empty();
+            var html = "<input name=\"file\" type=\"file\" accept=\".xapp\"/>";
+            this.uploadFileAreaNode.set("html", html);
+            this.fileUploadNode = this.uploadFileAreaNode.getFirst();
+            this.fileUploadNode.addEvent("change", this.implodeLocalFile.bind(this));
+        }
+        this.fileUploadNode.click();
+    },
+    implodeLocalFile: function(){
+        var files = this.fileUploadNode.files;
+        if (files.length){
+            var file = files[0];
+            var position = this.titleActionNode.getPosition(this.content);
+            var size = this.contentNode.getSize();
+            var width = size.x*0.9;
+            if (width>600) width = 600;
+            var height = size.y*0.9;
+            var x = (size.x-width)/2;
+            var y = (size.y-height)/2;
+
+            var setupModule = null;
+            MWF.require("MWF.xDesktop.Dialog", function(){
+                var dlg = new MWF.xDesktop.Dialog({
+                    "title": this.lp.setupTitle,
+                    "style": "appMarket",
+                    "top": y+20,
+                    "left": x,
+                    "fromTop":position.y,
+                    "fromLeft": position.x,
+                    "width": width,
+                    "height": height,
+                    "html": "",
+                    "maskNode": this.content,
+                    "container": this.content,
+                    "buttonList": [
+                        {
+                            "text": this.lp.ok,
+                            "action": function(){
+                                if (setupModule) setupModule.setup();
+                                this.close();
+                            }
+                        },
+                        {
+                            "text": this.lp.cancel,
+                            "action": function(){this.close();}
+                        }
+                    ]
+                });
+                dlg.show();
+                setupModule = new MWF.xApplication.AppMarket.Module.SetupLocal(file, dlg, this);
+            }.bind(this));
+        }
     },
     setContentSize: function(){
         var size = this.content.getSize();
@@ -300,8 +366,50 @@ MWF.xApplication.AppMarket.Module.Setup = new Class({
 
         }.bind(this));
     }
+});
+
+MWF.xApplication.AppMarket.Module.SetupLocal = new Class({
+    Extends: MWF.xApplication.AppMarket.Module.Setup,
+    initialize: function(file, dlg, app){
+        this.app = app;
+        this.file = file;
+        this.lp = this.app.lp;
+
+        this.module = {
+            "data": {
+                "name": this.lp.localApp,
+                "category": "",
+                "description": ""
+            }
+        };
+
+        this.data = this.module.data;
+        this.css = this.app.css;
+        this.dlg = dlg;
+        this.content = this.dlg.content;
+        this.setupData = {};
+        this.compareData = null;
+        this.load();
+    },
+    loadCompare: function(){
+        var formData = new FormData();
+        formData.append('file', this.file);
 
+        this.app.actions.compareUpload(formData, this.file, function(json){
+            this.clearLoading();
+            this.setupData.flag = json.data.flag;
+            this.createListArea();
+            this.compareData = json.data;
+            this.loadProcessList();
+            this.loadPortalList();
+            this.loadCMSList();
+            this.loadQueryList();
+            //json.data.processPlatformList
+
+        }.bind(this));
+    }
 });
+
 MWF.xApplication.AppMarket.Module.Setup.Element = new Class({
     initialize: function(setup, content, data){
         this.setup = setup;

+ 4 - 2
o2web/source/x_component_AppMarket/lp/zh-cn.js

@@ -1,7 +1,8 @@
 MWF.xApplication.AppMarket.LP = {
 	"title": "应用市场",
+    "implodeLocal": "从本地导入",
     "download": "免费下载",
-    "setupTitle": "即将下载安装",
+    "setupTitle": "即将安装",
     "ok": "确定",
     "cancel": "取消",
 
@@ -19,5 +20,6 @@ MWF.xApplication.AppMarket.LP = {
     "cover": "覆盖",
     "name": "名称",
     "id": "ID",
-    "setupSuccess": "应用安装成功!"
+    "setupSuccess": "应用安装成功!",
+    "localApp": "本地应用"
 };

+ 1 - 1
o2web/source/x_component_Calendar/Common.js

@@ -71,7 +71,7 @@ MWFCalendar.EventForm = new Class({
         this.fireEvent("postEdit");
     },
     _createTableContent : function(){
-        var path = "/x_desktop/res/framework/rrule/";
+        var path = "/o2_lib/rrule/";
         COMMON.AjaxModule.load(path+"rrule.js", function () {
             this.app.actions.listMyCalendar( function( json ){
                 this.calendarIds = [];

+ 14 - 11
o2web/source/x_component_Calendar/Main.js

@@ -628,17 +628,20 @@ MWF.xApplication.Calendar.Navi = new Class({
             this.followCalendars =json.data.followCalendars;
             this.loadNode();
         }.bind(this));
-        this.scrollBar = new MWF.widget.ScrollBar(this.naviContainer, {
-            "indent": false,
-            "style": "default",
-            "where": "before",
-            "distance": 60,
-            "friction": 4,
-            "axis": {"x": false, "y": true},
-            "onScroll": function (y) {
-
-            }.bind(this)
-        });
+
+        o2.require("MWF.widget.ScrollBar", function(){
+            this.scrollBar = new MWF.widget.ScrollBar(this.naviContainer, {
+                "indent": false,
+                "style": "default",
+                "where": "before",
+                "distance": 60,
+                "friction": 4,
+                "axis": {"x": false, "y": true},
+                "onScroll": function (y) {
+
+                }.bind(this)
+            });
+        }.bind(this));
     },
     loadNode: function(){
         this.loadMyCalendar();

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

@@ -46,7 +46,7 @@ MWF.xApplication.ControlPanel.Main = new Class({
                 position: 'center',
                 edge: 'center',
                 "offset": {
-                    "y": "-240"
+                    "y": "-120"
                 }
             });
         }

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

@@ -46,7 +46,7 @@ MWF.xApplication.DesignCenter.Main = new Class({
                 position: 'center',
                 edge: 'center',
                 "offset": {
-                    "y": "-240"
+                    "y": "-120"
                 }
             });
         }

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

@@ -26,7 +26,7 @@ MWF.xApplication.FaceSet.Main = new Class({
 		this.node = new Element("div", {"styles": this.css.node}).inject(this.content);
         this.contentNode = new Element("div", {"styles": this.css.contentNode}).inject(this.node);
         this.picAreaNode = new Element("div", {"styles": this.css.picAreaNode}).inject(this.node);
-        COMMON.AjaxModule.loadDom(COMMON.contentPath+"/res/framework/adapter/adapter.js", function(){
+        COMMON.AjaxModule.loadDom("/o2_lib/adapter/adapter.js", function(){
 			this.createVideo();
 			this.createAction();
             this.createInfor();

+ 5 - 0
o2web/source/x_component_File/Main.js

@@ -349,6 +349,11 @@ MWF.xApplication.File.Main = new Class({
                 window.open(url);
             });
         }.bind(this));
+    },
+    getAttachmentLinkUrl: function(attachment){
+        debugger;
+        var url = o2.Actions.get("x_file_assemble_control").action.actions.getAttachmentData.uri;
+        return url.replace("{id}", encodeURIComponent(attachment.data.id));
     },
 	downloadCurrentFile: function(){
 		if (this.selectedItem){

+ 2 - 2
o2web/source/x_component_MinderEditor/$Commands/GFMDescription.html

@@ -109,13 +109,13 @@
         <div class="md-section-divider"></div>
         <h2 data-anchor-id="nmhu" id="超链接">超链接</h2>
 
-        <p data-anchor-id="gnhz">通过 <code>[文本](url)</code> 的形式来添加超链接。比如这个是一个<a href="http://o2oa.io"
+        <p data-anchor-id="gnhz">通过 <code>[文本](url)</code> 的形式来添加超链接。比如这个是一个<a href="http://www.o2oa.net"
                                                                                target="_blank">O2官网</a>的超连接。</p>
 
         <div class="md-section-divider"></div>
         <pre class="prettyprint linenums prettyprinted" data-anchor-id="y8kn" style=""><ol class="linenums">
             <li class="L0"><code><span class="pun">[2官网](</span><span class="pln">http</span><span class="pun">:</span><span
-                    class="com">//o2oa.io) - 活力办公,创意无限</span></code></li>
+                    class="com">//o2oa.net) - 活力办公,创意无限</span></code></li>
         </ol></pre>
         <div class="md-section-divider"></div>
         <h2 data-anchor-id="z94z" id="列表">列表</h2>

+ 6 - 6
o2web/source/x_component_MinderEditor/Main.js

@@ -222,7 +222,7 @@ MWF.xApplication.MinderEditor.Main = new Class({
         this.commands.mainMenu.show( actionName );
     },
     loadResource: function (callback) {
-        var kityminderPath = "/x_desktop/res/framework/kityminder/";
+        var kityminderPath = "/o2_lib/kityminder/";
 
         COMMON.AjaxModule.loadCss("/x_component_MinderEditor/$Main/default/kityminder.editor.css", function () {
             COMMON.AjaxModule.loadCss(kityminderPath + "core/src/kityminder.css", function () {
@@ -235,8 +235,8 @@ MWF.xApplication.MinderEditor.Main = new Class({
         }.bind(this))
     },
     loadExtentResource : function (callback) {
-        var kityminderPath = "/x_desktop/res/framework/kityminder/";
-        COMMON.AjaxModule.load("/x_desktop/res/framework/jquery/jquery-2.2.4.min.js", function () {
+        var kityminderPath = "/o2_lib/kityminder/";
+        COMMON.AjaxModule.load("/o2_lib/jquery/jquery-2.2.4.min.js", function () {
             COMMON.AjaxModule.load(kityminderPath + "core/dist/kityminder.core.extend.js", function () {
                 var jquery = jQuery.noConflict();
                 if (callback)callback();
@@ -554,8 +554,8 @@ MWF.xApplication.MinderEditor.Main = new Class({
             if( callback )callback();
             return;
         }
-        var codeMirrorPath = COMMON.contentPath + "/res/framework/codemirror";
-        var markedPath = COMMON.contentPath + "/res/framework/marked";
+        var codeMirrorPath = "/o2_lib/codemirror";
+        var markedPath = "/o2_lib/marked";
 
         var jsModules = {
             codemirror : codeMirrorPath + "/lib/codemirror.js",
@@ -697,7 +697,7 @@ MWF.xApplication.MinderEditor.Converter = new Class({
         }.bind(this))
     },
     loadCanvgResource: function (callback) {
-        var canvgPath = "/x_desktop/res/framework/canvg/";
+        var canvgPath = "/o2_lib/framework/canvg/";
         COMMON.AjaxModule.load(canvgPath + "canvg.js", function () {
             if (callback)callback();
         }.bind(this))

+ 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,

BIN
o2web/source/x_component_Org/$Main/default/icon/ok.png


BIN
o2web/source/x_component_Org/$Main/default/icon/xls.png


BIN
o2web/source/x_component_Org/$Main/default/icon/xls32.png


BIN
o2web/source/x_component_Org/$Main/default/icon/xls60.png


+ 40 - 0
o2web/source/x_component_Org/$Main/default/importCss.css

@@ -0,0 +1,40 @@
+.importPersonAreaNode {
+    padding: 20px;
+    margin: 20px 40px;
+}
+.importPersonTitleNode {
+    height: 40px;
+    line-height: 40px;
+    font-weight: bold;
+    font-size: 18px;
+    color: #666666;
+}
+.importPersonTemplateNode {
+    margin-top: 10px;
+    height: 40px;
+    line-height: 40px;
+    font-size: 14px;
+    color: #999999;
+}
+.importPersonNode {
+    margin: 10px 0px;
+    height: 30px;
+    line-height: 30px;
+    width: 160px;
+    border: 1px solid #999999;
+    border-radius: 8px;
+    background-color: #3c76b7;
+    color: #ffffff;
+    text-align: center;
+    cursor: pointer;
+}
+.importPersonResultNode {
+    display: none;
+    margin-top: 20px;
+    height: 40px;
+    line-height: 40px;
+    font-size: 14px;
+    color: #999999;
+    padding-left: 40px;
+    background: url(/x_component_Org/$Main/default/icon/ok.png) no-repeat left center;
+}

+ 6 - 0
o2web/source/x_component_Org/$Main/default/importView.html

@@ -0,0 +1,6 @@
+<div class="importPersonAreaNode">
+    <div class="importPersonTitleNode"></div>
+    <div class="importPersonTemplateNode"></div>
+    <div class="importPersonNode"></div>
+    <div class="importPersonResultNode"></div>
+</div>

+ 6 - 0
o2web/source/x_component_Org/$Main/startMenu_admin.json

@@ -22,5 +22,11 @@
 		"id": "1.1",
 		"action": "personConfig",
 		"icon": "person"
+	},
+	{
+		"title": "人员导入",
+		"id": "1.1",
+		"action": "personImport",
+		"icon": "xls"
 	}
 ]

+ 1 - 1
o2web/source/x_component_Org/List.js

@@ -227,7 +227,7 @@ MWF.xApplication.Org.List.Item = new Class({
                 if (at.events){
                     td.removeEvents("click");
                     Object.each(at.events, function(v, k){
-                        if (key.toLowerCase!=="init") td.addEvent(k, v.bind({"data": this.data, "td": td, "item": this}));
+                        if (k.toLowerCase!=="init") td.addEvent(k, v.bind({"data": this.data, "td": td, "item": this}));
                     }.bind(this));
                     if (at.events["init"]) at.events["init"].apply({"item": this, "data": this.data, "td": td, "item": this});
                 }

+ 51 - 3
o2web/source/x_component_Org/Main.js

@@ -85,6 +85,9 @@ MWF.xApplication.Org.Main = new Class({
 			}
 			this.personConfiguratorContentNode.destroy();
 		}
+		if (this.importConfiguratorContentNode){
+            this.importConfiguratorContentNode.destroy();
+		}
         if (this.pingyinArea) this.pingyinArea.empty();
 	},
 	orgConfig: function(){
@@ -142,9 +145,9 @@ MWF.xApplication.Org.Main = new Class({
 	personConfig: function(){
 		this.clearContent();
 		this.personConfiguratorContentNode = new Element("div", {
-			"styles": this.css.rightContentNode
-		}).inject(this.node);
-		this.loadPersonConfig();
+            "styles": this.css.rightContentNode
+        }).inject(this.node);
+        this.loadPersonConfig();
 	},
 	loadPersonConfig: function(){
         MWF.xDesktop.requireApp("Org", "PersonExplorer", function(){
@@ -157,6 +160,51 @@ MWF.xApplication.Org.Main = new Class({
 		}.bind(this));
 	},
 
+    personImport: function(){
+		debugger;
+		this.clearContent();
+        this.importConfiguratorContentNode = new Element("div", {
+            "styles": this.css.rightContentNode
+        }).inject(this.node);
+        this.importConfiguratorContentNode.set("load", {"onSuccess": function(){
+        	this.importPersonTitleNode = this.importConfiguratorContentNode.getElement(".importPersonTitleNode");
+            this.importPersonTemplateNode = this.importConfiguratorContentNode.getElement(".importPersonTemplateNode");
+            this.importPersonNode = this.importConfiguratorContentNode.getElement(".importPersonNode");
+            this.importPersonResultNode = this.importConfiguratorContentNode.getElement(".importPersonResultNode");
+            o2.loadCss(this.path+this.options.style+"/importCss.css", this.importConfiguratorContentNode, function(){
+                this.loadPersonImport();
+            }.bind(this));
+        }.bind(this)}).load(this.path+this.options.style+"/importView.html");
+	},
+    loadPersonImport: function(){
+    	var action = o2.Actions.get("x_organization_assemble_control");
+        var url = action.action.address + action.action.actions.getImportPersonTemplate.uri;
+        var infor = this.lp.importPersonInfor.replace("{url}", url);
+
+        this.importPersonTitleNode.set("text", this.lp.importPersonTitle);
+        this.importPersonTemplateNode.set("html", infor);
+        this.importPersonNode.set("text", this.lp.importPersonAction);
+
+
+        this.importPersonNode.addEvent("click", function(){
+            this.importPersonResultNode.hide();
+        	o2.require("o2.widget.Upload", function(){
+        		new o2.widget.Upload(this.content, {
+                    "action": "x_organization_assemble_control",
+                    "method": "importPerson",
+                    "multiple": false,
+                    "onCompleted": function(json){
+                        var url = action.action.address + action.action.actions.getImportPersonResault.uri;
+                        url = url.replace("{flag}", json.data.flag);
+                        var result = this.lp.importPersonResult.replace("{url}", url);
+                        this.importPersonResultNode.set("html", result);
+                        this.importPersonResultNode.show();
+                    }.bind(this)
+                }).load();
+			}.bind(this));
+		}.bind(this));
+	},
+
     recordStatus: function(){
         var idx = null;
         if (this.menu.currentNavi){

+ 6 - 1
o2web/source/x_component_Org/lp/zh-cn.js

@@ -229,5 +229,10 @@ MWF.xApplication.Org.LP = {
 	"changePersonIcon": "更换头像",
     "resetPasswordTitle": "重置密码确认",
     "resetPasswordText": "您确定要为用户 {name} 重置密码吗?",
-    "resetPasswordSuccess": "用户 {name} 的密码已重置"
+    "resetPasswordSuccess": "用户 {name} 的密码已重置",
+
+    "importPersonTitle": "人员导入",
+    "importPersonInfor": "您可以通过Excel批量导入人员,<a target='_blank' href='{url}' >点击此处</a>获取人员导入模板",
+    "importPersonAction": "上传Excel文件,导入人员",
+    "importPersonResult": "人员已导入,<a target='_blank' href='{url}' >点击此处</a>查看导入结果"
 };

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

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

+ 1 - 1
o2web/source/x_component_Setting/Main_bak.js

@@ -1,5 +1,5 @@
 //MWF.xDesktop.requireApp("Deployment", "Actions.RestActions", null, false);
-MWF.xDesktop.requireApp("Servers", "Actions.RestActions", null, false);
+//MWF.xDesktop.requireApp("Servers", "Actions.RestActions", null, false);
 MWF.xApplication.Servers.Main = new Class({
 	Extends: MWF.xApplication.Common.Main,
 	Implements: [Options, Events],

+ 3 - 3
o2web/source/x_component_Setting/SettingIndexUI.js

@@ -8,7 +8,7 @@ MWF.xApplication.Setting.UIIndexDocument = new Class({
         this.titleName.set("text", this.lp.ui_indexSetting);
 
 
-        MWF.getJSON("/x_desktop/res/mwf4/package/xDesktop/$Layout/styles.json", function(json){
+        MWF.getJSON(o2.session.path+"/xDesktop/$Layout/styles.json", function(json){
             MWF.UD.getPublicData("indexThemes", function(themesJson){
                 var init = false;
                 if (themesJson){
@@ -103,9 +103,9 @@ MWF.xApplication.Setting.UIIndexDocument.Item = new Class({
     getCss: function(){
         var css = null;
         if (this.data.url){
-            var cssDesktopPath = "/x_desktop/res/mwf4/package/xDesktop/$Layout/"+this.data.url+"/css.wcss";
+            var cssDesktopPath = o2.session.path+"/xDesktop/$Layout/"+this.data.url+"/css.wcss";
             cssDesktopPath = (cssDesktopPath.indexOf("?")!=-1) ? cssDesktopPath+"&v="+COMMON.version : cssDesktopPath+"?v="+COMMON.version;
-            var cssWindowPath = "/x_desktop/res/mwf4/package/xDesktop/$Window/desktop_"+this.data.url+"/css.wcss";
+            var cssWindowPath = o2.session.path+"/xDesktop/$Window/desktop_"+this.data.url+"/css.wcss";
             cssWindowPath = (cssWindowPath.indexOf("?")!=-1) ? cssWindowPath+"&v="+COMMON.version : cssWindowPath+"?v="+COMMON.version;
 
             css = {};

+ 1 - 1
o2web/source/x_component_Setting/SettingLoginUI.js

@@ -10,7 +10,7 @@ MWF.xApplication.Setting.UILoginDocument = new Class({
         var defaultStyleData = {
             "title": this.lp.ui_login_default,
             "name": "default",
-            "url": "/x_desktop/res/mwf4/package/xDesktop/$Authentication/default",
+            "url": o2.session.path+"/xDesktop/$Authentication/default",
             "enabled": true
         };
 

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

@@ -1,6 +1,6 @@
 MWF.xApplication.Strategy = MWF.xApplication.Strategy || {};
 MWF.require("MWF.widget.Identity", null,false);
-MWF.xDesktop.requireApp("Strategy", "Actions.RestActions", null, false);
+//MWF.xDesktop.requireApp("Strategy", "Actions.RestActions", null, false);
 MWF.xDesktop.requireApp("Template", "Explorer", null, false);
 MWF.xDesktop.requireApp("Template", "MDomItem", null, false);
 MWF.xApplication.Strategy.options.multitask = true;

+ 1 - 1
o2web/source/x_component_cms_DictionaryDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 1 - 1
o2web/source/x_component_cms_FormDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 2 - 2
o2web/source/x_component_cms_FormDesigner/Module/Form/template/form_mobile.json

@@ -557,7 +557,7 @@
             "height": "25px",
             "cursor": "pointer",
             "min-width": "60px",
-            "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabAreaBg.gif) center center",
+            "background": "url(/o2_core/o2/widget/$Tab/default/tabAreaBg.gif) center center",
             "border-top-left-radius": "5px",
             "border-top-right-radius": "5px",
             "border": "1px solid #999"
@@ -579,7 +579,7 @@
             "float": "left",
             "height": "30px",
             "min-width": "60px",
-            "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabNodeCurrentBg.gif) center center",
+            "background": "url(/o2_core/o2/widget/$Tab/default/tabNodeCurrentBg.gif) center center",
             "border-top-left-radius": "5px",
             "border-top-right-radius": "5px",
             "border-top": "1px solid #999",

+ 1 - 1
o2web/source/x_component_cms_QueryViewDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 1 - 1
o2web/source/x_component_cms_ViewDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 4 - 1
o2web/source/x_component_cms_Xform/Actionbar.js

@@ -9,7 +9,10 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar =  new Class({
         //    this.node.empty();
         //}else{
             this.toolbarNode = this.node.getFirst("div");
-            this.toolbarNode.empty();
+        if (!this.toolbarNode)  this.toolbarNode = this.node;
+            if (this.toolbarNode) this.toolbarNode.empty();
+
+        //this.node.empty();
 
             MWF.require("MWF.widget.SimpleToolbar", function(){
                 this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);

+ 8 - 8
o2web/source/x_component_cms_Xform/Attachment.js

@@ -366,8 +366,8 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment =  new Class({
         // }.bind(this));
     },
     uploadAttachment: function(e, node){
-        if (window.o2 && window.o2.uploadAttachment){
-            window.o2.uploadAttachment(this.json.id);
+        if (window.o2android && window.o2android.uploadAttachment){
+            window.o2android.uploadAttachment(this.json.id);
         }else if(window.webkit && window.webkit.messageHandlers) {
             window.webkit.messageHandlers.uploadAttachment.postMessage({"site": this.json.id});
         }else{
@@ -413,8 +413,8 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment =  new Class({
     },
 
     replaceAttachment: function(e, node, attachment){
-        if (window.o2 && window.o2.replaceAttachment){
-            window.o2.replaceAttachment(attachment.data.id, this.json.id);
+        if (window.o2android && window.o2android.replaceAttachment){
+            window.o2android.replaceAttachment(attachment.data.id, this.json.id);
         }else if(window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.replaceAttachment) {
             window.webkit.messageHandlers.replaceAttachment.postMessage({"id": attachment.data.id, "site": this.json.id});
         }else {
@@ -474,8 +474,8 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment =  new Class({
     downloadAttachment: function(e, node, attachments){
         if (this.form.businessData.document){
             attachments.each(function(att){
-                if (window.o2 && window.o2.downloadAttachment){
-                    window.o2.downloadAttachment(att.data.id);
+                if (window.o2android && window.o2android.downloadAttachment){
+                    window.o2android.downloadAttachment(att.data.id);
                 }else if(window.webkit && window.webkit.messageHandlers) {
                     window.webkit.messageHandlers.downloadAttachment.postMessage({"id": att.data.id, "site": this.json.id});
                 }else{
@@ -487,8 +487,8 @@ MWF.xApplication.cms.Xform.Attachment = MWF.CMSAttachment =  new Class({
     openAttachment: function(e, node, attachments){
         if (this.form.businessData.document){
             attachments.each(function(att){
-                if (window.o2 && window.o2.downloadAttachment){
-                    window.o2.downloadAttachment(att.data.id);
+                if (window.o2android && window.o2android.downloadAttachment){
+                    window.o2android.downloadAttachment(att.data.id);
                 }else if(window.webkit && window.webkit.messageHandlers) {
                     window.webkit.messageHandlers.downloadAttachment.postMessage({"id": att.data.id, "site": this.json.id});
                 }else {

+ 2 - 2
o2web/source/x_component_cms_Xform/Office.js

@@ -376,8 +376,8 @@ MWF.xApplication.cms.Xform.Office = MWF.CMSOffice =  new Class({
             icon.addEvent("click", function(){
                 var url = this.getOfficeFileUrl();
                 if (url){
-                    if (window.o2){
-                        window.o2.openDocument(url);
+                    if (window.o2android){
+                        window.o2android.openDocument(url);
                     }else if(window.webkit){
                         window.webkit.messageHandlers.openDocument.postMessage(url);
                     }else{

+ 1 - 1
o2web/source/x_component_portal_PageDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 58 - 14
o2web/source/x_component_portal_PageDesigner/Import.js

@@ -5,6 +5,7 @@ MWF.xApplication.portal.PageDesigner.Import = MWF.FormImport = MWF.PageImport =
     Implements: [Options, Events],
     options: {
         "style": "default",
+        "type": "portal",
         "stylePath": "/x_component_portal_PageDesigner/$Import/{style}/style.css",
         "viewPath": "/x_component_portal_PageDesigner/$Import/{style}/view.html"
     },
@@ -191,7 +192,9 @@ MWF.FormImport.Html = new Class({
         try{
             var iframe = new Element("iframe").inject(document.body);
             var doc = iframe.contentWindow.document;
-            o2.load("mootools", function(){
+            debugger;
+            o2.load("mootools", {"doc": doc}, function(){
+                debugger;
                 var oldNodeHtml = this.form.node.get("html");
                 var oldModuleList = this.form.json.moduleList;
                 var oldHtml = this.form.data.html;
@@ -204,9 +207,12 @@ MWF.FormImport.Html = new Class({
                     var styleNodes = doc.body.getElements("style");
                     if (styleNodes) this.loadStyles(styleNodes);
 
+                    var css = "";
                     if (this.cssArea){
-                        var css = this.cssArea.editor.getValue();
-                        if (css) this.form.json.css.code += css;
+                        css = this.cssArea.editor.getValue();
+                        if (css) this.form.json.css.code += this.parseImplodeCSS(css, doc);
+
+                        //if (css) this.form.json.css.code += css;
                     }
 
                     this.parseImplodeHTML(doc.body, moduleList, doc, readyDeleteNodes);
@@ -242,13 +248,36 @@ MWF.FormImport.Html = new Class({
                     oldModuleList = null;
                 }
 
-            }.bind(this), true, doc);
+            }.bind(this));
         }catch(e){
             this.form.designer.notice(e.message, "error", this.node);
             mask.hide();
         }
 
     },
+
+    parseImplodeCSS: function(css, doc, callback){
+        var rex = /(url\(.*\))/g;
+        var match;
+        while ((match = rex.exec(css)) !== null) {
+            var pic = match[0];
+            var len = pic.length;
+            var s = pic.substring(pic.length-2, pic.length-1);
+            var n = (s==="'" || s==="\"") ? 2 : 1;
+            pic = pic.substring(pic.lastIndexOf("/")+1, pic.length-n);
+            var root = (this.options.type==="portal") ? "x_portal_assemble_surface" : "x_processplatform_assemble_surface";
+            var url = root + o2.Actions.get(root).action.actions.readFile.uri;
+            url = url.replace("{flag}", pic);
+            url = url.replace("{applicationFlag}", this.form.json.application || this.form.json.portal);
+            url = "url('"+url+"')";
+            var len2 = url.length;
+
+            css = css.substring(0, match.index) + url + css.substring(rex.lastIndex, css.length);
+            rex.lastIndex = rex.lastIndex + (len2-len);
+        }
+        return css;
+    },
+
     loadStyles: function(styleNodes){
         var cssText = "";
         styleNodes.each(function(node){
@@ -339,10 +368,11 @@ MWF.FormImport.Html = new Class({
             if (tag==="p"){
                 var node = new Element("div#"+id, {"mwftype": "div"}).inject(subNode, "before");
                 node.set("html", subNode.get("html"));
+                node.set("MWFOriginalTag", "p");
                 subNode.destroy();
                 subNode = node;
             }else{
-                subNode.set({"mwftype": "div", "id": id});
+                 subNode.set({"mwftype": "div", "id": id});
             }
         }.bind(this));
         return subNode;
@@ -364,6 +394,17 @@ MWF.FormImport.Html = new Class({
     },
     convertImgNode: function(subNode, moduleList){
         this.getImplodeModuleJson(moduleList, "Image", (subNode.get("id") || "image"), subNode, function(id, moduleData){
+            debugger;
+            var src = subNode.get("src");
+            if (src){
+                var root = (this.options.type==="portal") ? "x_portal_assemble_surface" : "x_processplatform_assemble_surface";
+                var pic = src.substring(src.lastIndexOf("/")+1, src.length);
+                var url = root + o2.Actions.get(root).action.actions.readFile.uri;
+                url = url.replace("{flag}", pic);
+                url = url.replace("{applicationFlag}", this.form.json.application || this.form.json.portal);
+                moduleData.properties.src = url;
+                subNode.set("src", url);
+            }
             subNode.set({"mwftype": "img", "id": id});
         }.bind(this));
         return subNode;
@@ -407,7 +448,7 @@ MWF.FormImport.Html = new Class({
             var value = subNode.get("text");
             if (value){
                 if (!moduleData.defaultValue) moduleData.defaultValue = {"code": "", "html": ""};
-                var v = moduleData.properties.value.replace(/\"/g, "\\\"");
+                var v = value.replace(/\"/g, "\\\"");
                 moduleData.defaultValue.code = "return \""+v+"\"";
             }
             var textareaNode = new Element("div#"+id, {"mwftype": "textarea"}).inject(subNode, "before");
@@ -532,10 +573,11 @@ MWF.FormImport.Html = new Class({
     },
     convertCommonTextNode: function(subNode, moduleList, tag){
         this.getImplodeModuleJson(moduleList, "Common", (subNode.get("id") || "common"), subNode, function(id, moduleData){
-            moduleData.styles.display = subNode.getStyle("display");
+            //moduleData.styles.display = subNode.getStyle("display");
             moduleData.innerHTML = subNode.get("text");
             moduleData.tagName = tag;
             subNode.set({"mwftype": "common", "id": id});
+            subNode.empty();
         }.bind(this));
         return subNode;
     },
@@ -599,9 +641,9 @@ MWF.FormImport.Html = new Class({
                 }
                 if (subNode.readyDelete) continue;
                 switch (tag){
-                    case "figure":
-                    case "figcaption":
-                    case "p":
+                    //case "figure":
+                    //case "figcaption":
+                    //case "p":
                     case "div":
                         if (subNode.childNodes.length===1 && subNode.childNodes[0].nodeType===Node.TEXT_NODE && subNode.childNodes[0].nodeValue.trim()){
                             subNode = this.convertLabelNode(subNode, moduleList, tag);
@@ -659,7 +701,8 @@ MWF.FormImport.Html = new Class({
                             case "reset":
                             case "submit":
                             case "button":
-                                subNode = this.convertButtonNode(subNode, moduleList);
+                                subNode = this.convertCommonNode(subNode, moduleList, tag);
+                                //subNode = this.convertButtonNode(subNode, moduleList);
                                 break;
                             case "datetime":
                             case "datetime-local":
@@ -689,11 +732,12 @@ MWF.FormImport.Html = new Class({
                     case "thead":
                     case "tfoot": break;
                     default:
+                        debugger;
                         if (subNode.childNodes.length===1 && subNode.childNodes[0].nodeType===Node.TEXT_NODE && subNode.childNodes[0].nodeValue.trim()){
                             subNode = this.convertCommonTextNode(subNode, moduleList, tag);
                             nextNode = false;
                         }else{
-                            subNode = this.convertCommonNode(subNode, moduleList, tag);
+                             subNode = this.convertCommonNode(subNode, moduleList, tag);
                         }
                 }
             }
@@ -754,6 +798,6 @@ MWF.FormImport.Office = new Class({
         }.bind(this));
     }
 });
-MWF.FormImport.create = function(type, form){
-    return new MWF.FormImport[type.capitalize()](form);
+MWF.FormImport.create = function(type, form, options){
+    return new MWF.FormImport[type.capitalize()](form, options);
 };

+ 28 - 1
o2web/source/x_component_portal_PageDesigner/Module/Common.js

@@ -20,6 +20,10 @@ MWF.xApplication.portal.PageDesigner.Module.Common = MWF.PCCommon = new Class({
 		this.form = form;
 	},
 
+    _setNodeProperty: function(){
+	    this._setEditStyle_custom("innerHTML");
+    },
+
     _setEditStyle_custom: function(name, obj, oldValue){
         if (name==="tagName"){
             var tagName = this.json.tagName.toString().toLowerCase();
@@ -43,7 +47,30 @@ MWF.xApplication.portal.PageDesigner.Module.Common = MWF.PCCommon = new Class({
                 var text = text = this.json.tagName+"(Common)";
                 this.treeNode.setText("<"+text+"> "+title);
 			}
-
+        }
+        if (name==="innerHTML"){
+            try{
+                if (this.json.innerHTML){
+                    var nodes = this.node.childNodes;
+                    for (var i=0; i<nodes.length; i++){
+                        if (nodes[i].nodeType===Node.ELEMENT_NODE){
+                            if (!nodes[i].get("MWFtype")){
+                                nodes[i].destroy();
+                                i--;
+                            }
+                        }else{
+                            if (nodes[i].removeNode){
+                                nodes[i].removeNode();
+                            }else{
+                                nodes[i].parentNode.removeChild(nodes[i]);
+                            }
+                            i--;
+                            //nodes[i]
+                        }
+                    }
+                    this.node.appendHTML(this.json.innerHTML);
+                }
+            }catch(e){}
         }
     },
     setPropertiesOrStyles: function(name, oldData){

+ 43 - 1
o2web/source/x_component_portal_PageDesigner/Module/Image.js

@@ -19,5 +19,47 @@ MWF.xApplication.portal.PageDesigner.Module.Image = MWF.PCImage = new Class({
 		this.form = form;
 		this.container = null;
 		this.containerNode = null;
-	}
+	},
+    _setEditStyle_custom: function(name){
+        if (name=="src"){
+            if (this.json.src){
+                var src = this.json.src.imageSrc;
+                this.node.src = src;
+                this.setPropertiesOrStyles("styles");
+            }else{
+                this.node.set("src", this.path +this.options.style+"/icon/image1.png");
+            }
+        }
+        debugger;
+        if (name=="srcfile"){
+            var value = this.json.srcfile;
+            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();
+        }
+    }
 });

+ 4 - 0
o2web/source/x_component_portal_PageDesigner/Module/Image/image.html

@@ -21,6 +21,10 @@
                 <td class="editTableTitle">图片</td>
                 <td class="editTableValue"><div class="MWFImageClipper" name="src"></div></td>
             </tr>
+            <tr>
+                <td class="editTableTitle">选择资源</td>
+                <td class="editTableValue"><div class="MWFImageFileSelect" name="srcfile"></div></td>
+            </tr>
         </table>
 
         <div class="MWFMaplist" name="styles" title="样式"></div>

+ 34 - 0
o2web/source/x_component_portal_PageDesigner/Module/Page.js

@@ -683,6 +683,39 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
 		this._setEditStyle_custom(name, obj, oldValue);
 	},
 
+    parseCSS: function(css){
+        var rex = /(url\(.*\))/g;
+        var match;
+        while ((match = rex.exec(css)) !== null) {
+            var pic = match[0];
+            var len = pic.length;
+            var s = pic.substring(pic.length-2, pic.length-1);
+            var n0 = (s==="'" || s==="\"") ? 5 : 4;
+            var n1 = (s==="'" || s==="\"") ? 2 : 1;
+            pic = pic.substring(n0, pic.length-n1);
+
+            if ((pic.indexOf("x_processplatform_assemble_surface")!=-1 || pic.indexOf("x_portal_assemble_surface")!=-1)){
+                var host1 = MWF.Actions.getHost("x_processplatform_assemble_surface");
+                var host2 = MWF.Actions.getHost("x_portal_assemble_surface");
+                if (pic.indexOf("/x_processplatform_assemble_surface")!==-1){
+                    pic = pic.replace("/x_processplatform_assemble_surface", pic+"/x_processplatform_assemble_surface");
+                }else if (pic.indexOf("x_processplatform_assemble_surface")!==-1){
+                    pic = pic.replace("x_processplatform_assemble_surface", pic+"/x_processplatform_assemble_surface");
+                }
+                if (pic.indexOf("/x_portal_assemble_surface")!==-1){
+                    pic = pic.replace("/x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
+                }else if (pic.indexOf("x_portal_assemble_surface")!==-1){
+                    pic = pic.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
+                }
+            }
+            pic = "url('"+pic+"')";
+            var len2 = pic.length;
+
+            css = css.substring(0, match.index) + pic + css.substring(rex.lastIndex, css.length);
+            rex.lastIndex = rex.lastIndex + (len2-len);
+        }
+        return css;
+    },
     reloadCss: function(){
         cssText = (this.json.css) ? this.json.css.code : "";
         //var head = (document.head || document.getElementsByTagName("head")[0] || document.documentElement);
@@ -690,6 +723,7 @@ MWF.xApplication.portal.PageDesigner.Module.Page = MWF.PCPage = new Class({
         var styleNode = $("style"+this.json.id);
         if (styleNode) styleNode.destroy();
         if (cssText){
+            cssText = this.parseCSS(cssText);
             var rex = new RegExp("(.+)(?=\\{)", "g");
             var match;
             var id = this.json.id.replace(/\-/g, "");

File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_classical.json


File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_common.json


+ 2 - 2
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_file.json

@@ -993,7 +993,7 @@
             "height": "25px",
             "cursor": "pointer",
             "min-width": "80px",
-            "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabAreaBg.gif) center center",
+            "background": "url(/o2_core/o2/widget/$Tab/default/tabAreaBg.gif) center center",
             "border-top-left-radius": "5px",
             "border-top-right-radius": "5px",
             "border": "1px solid #999"
@@ -1015,7 +1015,7 @@
             "float": "left",
             "height": "30px",
             "min-width": "80px",
-            "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabNodeCurrentBg.gif) center center",
+            "background": "url(/o2_core/o2/widget/$Tab/default/tabNodeCurrentBg.gif) center center",
             "border-top-left-radius": "5px",
             "border-top-right-radius": "5px",
             "border-top": "1px solid #999",

+ 2 - 2
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_mobile.json

@@ -702,7 +702,7 @@
             "height": "25px",
             "cursor": "pointer",
             "min-width": "60px",
-            "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabAreaBg.gif) center center",
+            "background": "url(/o2_core/o2/widget/$Tab/default/tabAreaBg.gif) center center",
             "border-top-left-radius": "5px",
             "border-top-right-radius": "5px",
             "border": "1px solid #999"
@@ -724,7 +724,7 @@
             "float": "left",
             "height": "30px",
             "min-width": "60px",
-            "background": "url(/x_desktop/res/mwf4/package/widget/$Tab/default/tabNodeCurrentBg.gif) center center",
+            "background": "url(/o2_core/o2/widget/$Tab/default/tabNodeCurrentBg.gif) center center",
             "border-top-left-radius": "5px",
             "border-top-right-radius": "5px",
             "border-top": "1px solid #999",

File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_project.json


File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_tab.json


File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_portal_PageDesigner/Module/Page/template/page_tab_red.json


+ 55 - 5
o2web/source/x_component_portal_PortalManager/FileExplorer.js

@@ -21,6 +21,44 @@ MWF.xApplication.portal.PortalManager.FileExplorer = new Class({
         // this.app.desktop.openApplication(e, "process.FileDesigner", options);
         new MWF.xApplication.portal.PortalManager.FileDesigner(this);
     },
+    getNewData: function(){
+        return {
+            "id": "",
+            "name": "",
+            "alias": "",
+            "description": "",
+            "portal": (this.app.options.application || this.app.application).id,
+            "fileName": ""
+        }
+    },
+    implodeFiles: function(){
+        MWF.require("MWF.widget.Upload", function(){
+            new MWF.widget.Upload(this.app.content, {
+                "action": MWF.Actions.get("x_portal_assemble_designer").action,
+                "multiple": true,
+                "method": "uploadFile",
+                "parameter": {"id": ""},
+                "onBeforeUploadEntry": function(file, up){
+                    var data = this.getNewData();
+                    data.name = file.name;
+                    data.fileName = file.name;
+                    data.description = file.name+" "+this.getSizeText(file.size);
+                    data.updateTime = (new Date()).format("db");
+                    MWF.Actions.get("x_portal_assemble_designer").saveFile(data, function(json){
+                        up.options.parameter = {"id": json.data.id};
+
+                        var node = this.elementContentListNode.getFirst();
+                        if (node) if (node.hasClass("noElementNode")){
+                            node.destroy();
+                        }
+
+                        var itemObj = this._getItemObject(data);
+                        itemObj.load();
+                    }.bind(this), null, false);
+                }.bind(this)
+            }).load();
+        }.bind(this));
+    },
     _getItemObject: function(item){
         return new MWF.xApplication.portal.PortalManager.FileExplorer.File(this, item)
     }
@@ -113,14 +151,14 @@ MWF.xApplication.portal.PortalManager.FileDesigner = new Class({
 
     upload: function(){
         if (!this.data.id){
-            var data = this.getData();
-            this.data = Object.merge(this.data, data);
-            MWF.Actions.get("x_portal_assemble_designer").saveFile(this.data, function(){
-                this.explorer.reload();
+            // var data = this.getData();
+            // this.data = Object.merge(this.data, data);
+            // MWF.Actions.get("x_portal_assemble_designer").saveFile(this.data, function(){
+            //     this.explorer.reload();
                 this.uploadFile(function(){
                     this.app.notice(this.lp.file.uploadSuccess, "success");
                 }.bind(this));
-            }.bind(this));
+            // }.bind(this));
         }else{
             this.uploadFile(function(){
                 this.app.notice(this.lp.file.uploadSuccess, "success");
@@ -138,8 +176,20 @@ MWF.xApplication.portal.PortalManager.FileDesigner = new Class({
                     this.modifyContentFileUrl();
                     if (callback) callback();
                 }.bind(this),
+                "onBeforeUpload": function(files, up){
+                    var name = files[0].name;
+                    this.nameInput.set("value", name);
+                    var data = this.getData();
+                    this.data = Object.merge(this.data, data);
+                    MWF.Actions.get("x_portal_assemble_designer").saveFile(this.data, function(json){
+                        this.explorer.reload();
+                        up.options.parameter = {"id": json.data.id};
+                    }.bind(this), null, false);
+                }.bind(this),
                 "onEvery": function(json, current, count, file){
+                    debugger;
                     //this.data.description = file.name+" "+this.getSizeText(file.size);
+                    //this.data.id = json.data.id;
                     this.data.fileName = file.name;
                     this.data.description = file.name+" "+this.getSizeText(file.size);
                     this.descriptionInput.set("value", this.data.description);

+ 0 - 1
o2web/source/x_component_portal_PortalManager/Main.js

@@ -1,6 +1,5 @@
 MWF.xDesktop.requireApp("portal.PortalManager", "package", null, false);
 //MWF.xDesktop.requireApp("portal.PortalManager", "Actions.RestActions", null, false);
-MWF.xDesktop.requireApp("Organization", "Selector.package", null, false);
 MWF.require("MWF.xAction.org.express.RestActions", null,false);
 MWF.require("MWF.widget.Identity", null,false);
 MWF.xDesktop.requireApp("process.ProcessManager", "", null, false);

+ 3 - 3
o2web/source/x_component_portal_PortalManager/widget/ApplicationSelector.js

@@ -89,8 +89,8 @@ MWF.xApplication.process.ProcessManager.widget.ApplicationSelector = new Class({
     },
 
     loadContent: function(){
-        MWF.xDesktop.requireApp("process.ProcessManager", "Actions.RestActions", function(){
-            if (!this.restActions) this.restActions = new MWF.xApplication.process.ProcessManager.Actions.RestActions();
+        //MWF.xDesktop.requireApp("process.ProcessManager", "Actions.RestActions", function(){
+            if (!this.restActions) this.restActions = MWF.Actions.get("x_processplatform_assemble_designer");
 
             this.restActions.listApplication("", function(json){
                 json.data.each(function(app){
@@ -103,7 +103,7 @@ MWF.xApplication.process.ProcessManager.widget.ApplicationSelector = new Class({
                 }.bind(this));
             }.bind(this));
 
-        }.bind(this));
+        //}.bind(this));
     },
     //selected: function(script){
     //    this.scriptData = script.data;

+ 3 - 3
o2web/source/x_component_portal_PortalManager/widget/ProcessSelector.js

@@ -27,8 +27,8 @@ MWF.xApplication.process.ProcessManager.widget.ProcessSelector = new Class({
         this.loadContent();
     },
     loadContent: function(){
-        MWF.xDesktop.requireApp("process.ProcessManager", "Actions.RestActions", function(){
-            if (!this.restActions) this.restActions = new MWF.xApplication.process.ProcessManager.Actions.RestActions();
+        //MWF.xDesktop.requireApp("process.ProcessManager", "Actions.RestActions", function(){
+            if (!this.restActions) this.restActions = MWF.Actions.get("x_processplatform_assemble_designer");
 
             this.applicationIds.each(function(id){
 
@@ -42,7 +42,7 @@ MWF.xApplication.process.ProcessManager.widget.ProcessSelector = new Class({
 
             }.bind(this));
 
-        }.bind(this));
+        //}.bind(this));
     },
     clearSelected: function(){
         this.processes.each(function(pro){

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

@@ -2,7 +2,7 @@ MWF.xApplication.portal.ScriptDesigner.options = {
 	"multitask": true,
 	"executable": false
 };
-MWF.xDesktop.requireApp("portal.PortalManager", "Actions.RestActions", null, false);
+//MWF.xDesktop.requireApp("portal.PortalManager", "Actions.RestActions", null, false);
 MWF.xDesktop.requireApp("portal.ScriptDesigner", "Script", null, false);
 MWF.require("MWF.xDesktop.UserData", null, false);
 MWF.xApplication.portal.ScriptDesigner.Main = new Class({

+ 1 - 1
o2web/source/x_component_portal_WidgetDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 0 - 1
o2web/source/x_component_process_Application/MyWorkExplorer.js

@@ -1,4 +1,3 @@
-MWF.xDesktop.requireApp("Organization", "Selector.package", null, false);
 MWF.xDesktop.requireApp("process.Application", "WorkExplorer", null, false);
 MWF.xApplication.process.Application.MyWorkExplorer = new Class({
 	Extends: MWF.xApplication.process.Application.WorkExplorer,

+ 1 - 1
o2web/source/x_component_process_DictionaryDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 1 - 1
o2web/source/x_component_process_FormDesigner/$Main/blank.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <script src="res/framework/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
+    <script src="/o2_lib/mootools/mootools-core-1.4.5-full-nocompat.js"></script>
 </head>
 <body>
 111

+ 2 - 2
o2web/source/x_component_process_FormDesigner/$Main/default/css.wcss

@@ -8,7 +8,7 @@
 	//	"background-color": "#cfebaa"
 	},
 	"propertyNode": {
-		"width": "350px",
+		"width": "360px",
 		"overflow": "hidden",
 		"float": "right",
 		"-webkit-user-select": "text",
@@ -16,7 +16,7 @@
 	},
 	"formNode": {
 		"margin-left": "141px",
-		"margin-right": "301px",
+		"margin-right": "361px",
 		"border-right": "1px solid #505050",
 		"border-left": "1px solid #505050",
 		"background-color": "#FFF",

+ 2 - 2
o2web/source/x_component_process_FormDesigner/$Preview/preview1.html

@@ -13,8 +13,8 @@
     <script>
         layout = window.layout || {};
         COMMON.DOM.addReady(function(){
-            COMMON.AjaxModule.load("/x_desktop/res/framework/mootools/plugin/mBox.Notice.js", null, false);
-            COMMON.AjaxModule.load("/x_desktop/res/framework/mootools/plugin/mBox.Tooltip.js", null, false);
+            COMMON.AjaxModule.load("/o2_lib/mootools/plugin/mBox.Notice.js", null, false);
+            COMMON.AjaxModule.load("/o2_lib/mootools/plugin/mBox.Tooltip.js", null, false);
 
             COMMON.setContentPath("/x_desktop");
             COMMON.AjaxModule.load("mwf", function(){

+ 2 - 2
o2web/source/x_component_process_FormDesigner/Main.js

@@ -142,7 +142,7 @@ MWF.xApplication.process.FormDesigner.Main = new Class({
                             "styles": {"display": "none"},
                             "html": html
                         }).inject(this.content);
-
+debugger;
                         //var pid = "";
                         Object.each(json, function (moduleJson) {
                             var oid = moduleJson.id;
@@ -408,7 +408,7 @@ MWF.xApplication.process.FormDesigner.Main = new Class({
         }
         this.form.unSelectedMulti();
 
-        if (this.page.designTabPageScriptAreaNode) this.page.designTabPageScriptAreaNode.hide();
+        if (this.form.designTabPageScriptAreaNode) this.form.designTabPageScriptAreaNode.hide();
         this.form = this.pcForm;
 
         if ((this.scriptPage && this.scriptPage.isShow) || this.scriptPanel){

+ 28 - 1
o2web/source/x_component_process_FormDesigner/Module/Common.js

@@ -20,6 +20,10 @@ MWF.xApplication.process.FormDesigner.Module.Common = MWF.FCCommon = new Class({
 		this.form = form;
 	},
 
+    _setNodeProperty: function(){
+        this._setEditStyle_custom("innerHTML");
+    },
+
     _setEditStyle_custom: function(name, obj, oldValue){
         if (name==="tagName"){
             var tagName = this.json.tagName.toString().toLowerCase();
@@ -43,7 +47,30 @@ MWF.xApplication.process.FormDesigner.Module.Common = MWF.FCCommon = new Class({
                 var text = text = this.json.tagName+"(Common)";
                 this.treeNode.setText("<"+text+"> "+title);
 			}
-
+        }
+        if (name==="innerHTML"){
+            try{
+                if (this.json.innerHTML){
+                    var nodes = this.node.childNodes;
+                    for (var i=0; i<nodes.length; i++){
+                        if (nodes[i].nodeType===Node.ELEMENT_NODE){
+                            if (!nodes[i].get("MWFtype")){
+                                nodes[i].destroy();
+                                i--;
+                            }
+                        }else{
+                            if (nodes[i].removeNode){
+                                nodes[i].removeNode();
+                            }else{
+                                nodes[i].parentNode.removeChild(nodes[i]);
+                            }
+                            i--;
+                            //nodes[i]
+                        }
+                    }
+                    this.node.appendHTML(this.json.innerHTML);
+                }
+            }catch(e){}
         }
     },
     setPropertiesOrStyles: function(name, oldData){

+ 35 - 1
o2web/source/x_component_process_FormDesigner/Module/Form.js

@@ -629,7 +629,7 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
     // },
     implodeHTML: function(){
         MWF.xDesktop.requireApp("portal.PageDesigner", "Import", function(){
-            MWF.FormImport.create("html", this);
+            MWF.FormImport.create("html", this, {"type": "process"});
         }.bind(this));
     },
     implodeOffice: function(){
@@ -700,6 +700,39 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
 		this._setEditStyle_custom(name, obj, oldValue);
 	},
 
+    parseCSS: function(css){
+        var rex = /(url\(.*\))/g;
+        var match;
+        while ((match = rex.exec(css)) !== null) {
+            var pic = match[0];
+            var len = pic.length;
+            var s = pic.substring(pic.length-2, pic.length-1);
+            var n0 = (s==="'" || s==="\"") ? 5 : 4;
+            var n1 = (s==="'" || s==="\"") ? 2 : 1;
+            pic = pic.substring(n0, pic.length-n1);
+
+            if ((pic.indexOf("x_processplatform_assemble_surface")!=-1 || pic.indexOf("x_portal_assemble_surface")!=-1)){
+                var host1 = MWF.Actions.getHost("x_processplatform_assemble_surface");
+                var host2 = MWF.Actions.getHost("x_portal_assemble_surface");
+                if (pic.indexOf("/x_processplatform_assemble_surface")!==-1){
+                    pic = pic.replace("/x_processplatform_assemble_surface", pic+"/x_processplatform_assemble_surface");
+                }else if (pic.indexOf("x_processplatform_assemble_surface")!==-1){
+                    pic = pic.replace("x_processplatform_assemble_surface", pic+"/x_processplatform_assemble_surface");
+                }
+                if (pic.indexOf("/x_portal_assemble_surface")!==-1){
+                    pic = pic.replace("/x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
+                }else if (pic.indexOf("x_portal_assemble_surface")!==-1){
+                    pic = pic.replace("x_portal_assemble_surface", host2+"/x_portal_assemble_surface");
+                }
+            }
+            pic = "url('"+pic+"')";
+            var len2 = pic.length;
+
+            css = css.substring(0, match.index) + pic + css.substring(rex.lastIndex, css.length);
+            rex.lastIndex = rex.lastIndex + (len2-len);
+        }
+        return css;
+    },
     reloadCss: function(){
         cssText = (this.json.css) ? this.json.css.code : "";
         //var head = (document.head || document.getElementsByTagName("head")[0] || document.documentElement);
@@ -707,6 +740,7 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
         var styleNode = $("style"+this.json.id);
         if (styleNode) styleNode.destroy();
         if (cssText){
+            cssText = this.parseCSS(cssText);
             var rex = new RegExp("(.+)(?=\\{)", "g");
             var match;
             var id = this.json.id.replace(/\-/g, "");

File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_classical.json


File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_cms_publish.json


File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_common.json


File diff suppressed because it is too large
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_file.json


Some files were not shown because too many files changed in this diff