diff --git a/o2web/source/x_component_process_FormDesigner/$Main/default/icon/yozoOffice.png b/o2web/source/x_component_process_FormDesigner/$Main/default/icon/yozoOffice.png new file mode 100644 index 0000000000000000000000000000000000000000..8766cf25848a7ff57b56eb410e292a1dd58ca7de Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/$Main/default/icon/yozoOffice.png differ diff --git a/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json b/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json index bcb905e5ccfb8d63b0758d74fcaf55d2ccf86a22..ea99cae241843d90afbeee65979b54a934295bc6 100644 --- a/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json +++ b/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json @@ -212,6 +212,11 @@ "text": "iWebOffice", "className": "IWebOffice" }, + "yozoOffice": { + "icon": "yozo.png", + "text": "yozoOffice", + "className": "YozoOffice" + }, "statementSelector": { "icon": "statementSelector.png", "text": MWF.xApplication.process.FormDesigner.LP.modules.statementSelector, diff --git a/o2web/source/x_component_process_FormDesigner/Module/Package.js b/o2web/source/x_component_process_FormDesigner/Module/Package.js index b0d5cf52907a4a7c3080fee00537ce9d0627be15..ad8dc02f04873c8a33413d2b80400616911ff524 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/Package.js +++ b/o2web/source/x_component_process_FormDesigner/Module/Package.js @@ -40,6 +40,7 @@ MWF.xDesktop.requireApp("process.FormDesigner", "Module.Documenteditor", null, f MWF.xDesktop.requireApp("process.FormDesigner", "Module.Htmleditor", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.Office", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.IWebOffice", null, false); +MWF.xDesktop.requireApp("process.FormDesigner", "Module.YozoOffice", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.Attachment", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.Orgfield", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.Org", null, false); diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice.js b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice.js new file mode 100644 index 0000000000000000000000000000000000000000..328e51d379ef903b809cc1d0b1a5933be7c12777 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice.js @@ -0,0 +1,99 @@ +MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {}; +MWF.xDesktop.requireApp("process.FormDesigner", "Module.$Element", null, false); +MWF.xApplication.process.FormDesigner.Module.YozoOffice = MWF.FCYozoOffice = new Class({ + Extends: MWF.FC$Element, + Implements: [Options, Events], + options: { + "style": "default", + "propertyPath": "../x_component_process_FormDesigner/Module/YozoOffice/office.html" + }, + + initialize: function(form, options){ + this.setOptions(options); + + this.path = "../x_component_process_FormDesigner/Module/YozoOffice/"; + this.cssPath = "../x_component_process_FormDesigner/Module/YozoOffice/"+this.options.style+"/css.wcss"; + + this._loadCss(); + this.moduleType = "element"; + this.moduleName = "yozoOffice"; + + this.form = form; + this.container = null; + this.containerNode = null; + }, + + _createMoveNode: function(){ + this.moveNode = new Element("div", { + "MWFType": "yozoOffice", + "id": this.json.id, + "styles": this.css.moduleNodeMove, + "events": { + "selectstart": function(){ + return false; + } + } + }).inject(this.form.container); + }, + _createNode: function(){ + this.node = this.moveNode.clone(true, true); + this.node.setStyles(this.css.moduleNode); + this.node.set("id", this.json.id); + this.node.addEvent("selectstart", function(){ + return false; + }); + + this.iconNode = new Element("div", { + "styles": this.css.iconNode + }).inject(this.node); + var icon = new Element("div", { + "styles": this.css.iconNodeIcon + }).inject(this.iconNode); + var text = new Element("div", { + "styles": this.css.iconNodeText, + "text": "YozoOffice" + }).inject(this.iconNode); + + this.setIcon(); + }, + + _loadNodeStyles: function(){ + this.iconNode = this.node.getElement("div").setStyles(this.css.iconNode); + this.iconNode.getFirst("div").setStyles(this.css.iconNodeIcon); + this.iconNode.getLast("div").setStyles(this.css.iconNodeText); + this.setIcon(); + }, + + setIconNode: function(img, txt, color, width){ + if (this.iconNode){ + this.iconNode.setStyle("width", width); + var icon = this.iconNode.getFirst(); + var text = this.iconNode.getLast(); + icon.setStyle("background-image", "url("+this.path+this.options.style+"/icon/"+img+".png)"); + text.set("text", txt); + text.setStyles({ + "color": color, + "width": width-34 + }); + } + }, + setIcon: function(){ + if (this.json.officeType=="word"){ + this.setIconNode("word", "Word", "#2b5797", 90); + } + if (this.json.officeType=="excel"){ + this.setIconNode("excel", "Excel", "#1e7145", 86); + } + if (this.json.officeType=="ppt"){ + this.setIconNode("ppt", "PowerPoint", "#d04525", 130); + } + if (this.json.officeType=="other"){ + this.setIconNode("office", "Office", "#f36523", 96); + } + }, + _setEditStyle_custom: function(name){ + if (name=="officeType"){ + this.setIcon(); + } + } +}); diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/css.wcss b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..ecb8b9f7c257acee2e732c1f789ae750be4da48b --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/css.wcss @@ -0,0 +1,79 @@ +{ + "moduleNodeMove": { + "border": "2px dashed #ffa200", + "height": "22px", + "line-height": "22px", + "overflow": "hidden", + "margin": "3px", + "display": "block", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "absolute", + "z-index": 10002, + "opacity": 0.7, + "width": "100px", + "cursor": "move", + "background-color": "#EEE" + }, + "moduleNodeShow": { + "border": "1px dashed #333", + "height": "2px", + "cursor": "pointer", + "line-height": "22px", + "overflow": "hidden", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "static", + "display": "block", + "top": "auto", + "left": "auto", + "width": "auto", + "opacity": 0.5, + "background": "#ffa200" + }, + "moduleNode": { + "border": "1px dashed #333", + "min-height": "300px", + "cursor": "pointer", + "line-height": "22px", + "overflow": "hidden", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "static", + "display": "block", + "top": "auto", + "left": "auto", + "width": "auto", + "opacity": 1, + "background-color": "#ffffff" + }, + "iconNode": { + "width": "100px", + "height": "34px", + "color": "#999", + "font-size": "12px", + "margin": "auto", + "margin-top": "36px", + // "background": "#FFF", + "position": "static", + "float": "none" + }, + "iconNodeIcon":{ + "width": "34px", + "height": "34px", + "background": "url("+"../x_component_process_FormDesigner/Module/Office/default/icon/office.png) 5px center no-repeat", + "float": "left" + }, + "iconNodeText":{ + "line-height": "34px", + "height": "34px", + "width": "66px", + "float": "right", + "font-family": "Gadugi", + "font-weight": "bold", + "font-size": "16px", + "color": "#f36523" + } +} \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/close.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/close.png new file mode 100644 index 0000000000000000000000000000000000000000..64042801dea3f13cad138907921dbe7e6f1f6fcc Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/close.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/copy.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/copy.png new file mode 100644 index 0000000000000000000000000000000000000000..195dc6d6c365d298e466026b37c1959d96119ea7 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/copy.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/copy1.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/copy1.png new file mode 100644 index 0000000000000000000000000000000000000000..1398026fb8577130ad7d3bfebf8f4f148dc312a9 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/copy1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/delete.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..08f249365afd29594b51210c6e21ba253897505d Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/delete.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/delete1.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/delete1.png new file mode 100644 index 0000000000000000000000000000000000000000..8f420087aae2f5a6e8cb22376e257d0ee8b2e12e Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/delete1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/excel.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/excel.png new file mode 100644 index 0000000000000000000000000000000000000000..f9ea0279aeb66412d37a2a3e853c6f8ba1970682 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/excel.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/iframe.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/iframe.png new file mode 100644 index 0000000000000000000000000000000000000000..72ad24e6796ca9bfe9418b9b1a702aabad012fc3 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/iframe.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/move.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/move.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb1887d01afffceac856906a84243c331ee6ad1 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/move.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/move1.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/move1.png new file mode 100644 index 0000000000000000000000000000000000000000..c50bda51149245dfc2f8d081b359c898173eb2f3 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/move1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/office.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/office.png new file mode 100644 index 0000000000000000000000000000000000000000..a08199c71cc49a9d9eaedceca9bf246902395434 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/office.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/ppt.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/ppt.png new file mode 100644 index 0000000000000000000000000000000000000000..5b8e57a6c9582e4a0d55953eccba19c267484091 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/ppt.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/word.png b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/word.png new file mode 100644 index 0000000000000000000000000000000000000000..87d41404d72e1993f79bb1be8435d4680848c035 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/default/icon/word.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/office.html b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/office.html new file mode 100644 index 0000000000000000000000000000000000000000..c7ca004229f43235534984e911085ad5e6b70f53 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/office.html @@ -0,0 +1,75 @@ +
diff --git a/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/template.json b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/template.json new file mode 100644 index 0000000000000000000000000000000000000000..6faae2b14b752ca473226f6ef013e7c3a21186dc --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/YozoOffice/template.json @@ -0,0 +1,48 @@ +{ + "id": "", + "name": "", + "type": "YozoOffice", + "description": "", + "officeType": "word", + "template": "", + "isNotLoadNow": false, + "trackRevisions" : "0", + "script": { + "code": "", + "html": "" + }, + "yozoOfficeEditProperties": { + "Menubar": "0", + "ToolBars": "1", + "IsNoCopy": "0" + }, + "yozoOfficeReadProperties": { + "Menubar": "0", + "ToolBars": "0", + "IsNoCopy": "0" + }, + "menuReadButtons": ["revisions","fullscreen","preview"], + "menuEditButtons": ["revisions","fullscreen","toolbar","preview"], + "events": { + "afterOpen": { + "code": "", + "html": "" + }, + "afterCreate": { + "code": "", + "html": "" + }, + "beforeSave": { + "code": "", + "html": "" + }, + "afterSave": { + "code": "", + "html": "" + } + }, + "properties": {}, + "class": "", + "styles": {}, + "container": "" +} diff --git a/o2web/source/x_component_process_Xform/Package.js b/o2web/source/x_component_process_Xform/Package.js index 7bc72b18bb4ca1ee4da835b12a0a132d6c74a239..3c7dfb51d5762c4cff0a1be2a2dd3b32c714c011 100644 --- a/o2web/source/x_component_process_Xform/Package.js +++ b/o2web/source/x_component_process_Xform/Package.js @@ -31,6 +31,7 @@ MWF.xApplication.process.Xform.require = function(callback){ ["process.Xform", "Htmleditor"], ["process.Xform", "Office"], ["process.Xform", "IWebOffice"], + ["process.Xform", "YozoOffice"], ["process.Xform", "Attachment"], ["process.Xform", "Actionbar"], ["process.Xform", "Sidebar"], diff --git a/o2web/source/x_component_process_Xform/YozoOffice.js b/o2web/source/x_component_process_Xform/YozoOffice.js new file mode 100644 index 0000000000000000000000000000000000000000..02db36e92f3d5d1c8042d34e3a142b674acca41d --- /dev/null +++ b/o2web/source/x_component_process_Xform/YozoOffice.js @@ -0,0 +1,141 @@ +MWF.xDesktop.requireApp("process.Xform", "$Module", null, false); +MWF.xApplication.process.Xform.YozoOffice = MWF.APPYozoOffice = new Class({ + Extends: MWF.APP$Module, + options:{ + + "moduleEvents": [ + "afterOpen", + "afterCreate", + "beforeSave", + "afterSave" + ] + }, + initialize: function(node, json, form, options){ + this.node = $(node); + this.node.store("module", this); + this.json = json; + this.form = form; + this.field = true; + this.openedAttachment = null; + this.mode = "write"; + }, + _loadUserInterface: function(){ + this.node.empty(); + this.node.setStyles({ + "min-height": "100px" + }); + this.file = null; + if (!this.form.officeList) this.form.officeList=[]; + this.form.officeList.push(this); + }, + _afterLoaded: function(){ + if(!layout.serviceAddressList["x_yozofile_assemble_control"]){ + this.node.set("html","