diff --git a/o2web/gulpfile.js b/o2web/gulpfile.js index a21c6d8cdbbcf27d04339240aae8834149e3ac9c..2e19a5241edc7a418ba3cca3b863285d5df41fd1 100644 --- a/o2web/gulpfile.js +++ b/o2web/gulpfile.js @@ -253,6 +253,7 @@ function createCMSXFormConcatTask(path, isMin, thisOptions) { 'source/' + processPath + '/Common.js', 'source/' + processPath + '/Image.js', 'source/' + processPath + '/ImageClipper.js', + 'source/' + processPath + '/WritingBoard.js', 'source/' + processPath + '/Html.js', 'source/' + processPath + '/Radio.js', 'source/' + processPath + '/Select.js', @@ -290,6 +291,7 @@ function createCMSXFormConcatTask(path, isMin, thisOptions) { 'source/' + path + '/Datatemplate.js', 'source/' + path + '/Htmleditor.js', 'source/' + path + '/ImageClipper.js', + 'source/' + path + '/WritingBoard.js', 'source/' + path + '/Label.js', 'source/' + path + '/Number.js', 'source/' + path + '/Radio.js', diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/htmleditor.png b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/htmleditor.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4cf7ec816a2cfccdd70df3c2b1b27c493478a8b0 100644 Binary files a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/htmleditor.png and b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/htmleditor.png differ diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/writingBoard.png b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/writingBoard.png new file mode 100644 index 0000000000000000000000000000000000000000..61e33165b4bfcd27a15f0de10e4a9cd4374717b7 Binary files /dev/null and b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/writingBoard.png differ diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json index 583e96fac4c3208627bb489864f8c147585cbdb7..58a2397b1892ef4c4f0dc893213fc2b2ab38b49c 100644 --- a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json +++ b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json @@ -224,5 +224,10 @@ "icon": "importer.png", "text": MWF.xApplication.cms.FormDesigner.LP.modules.importer, "className": "Importer" + }, + "writingBoard": { + "icon": "writingBoard.png", + "text": MWF.xApplication.cms.FormDesigner.LP.modules.writingBoard, + "className": "WritingBoard" } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/default/icon/writingBoard.png b/o2web/source/x_component_cms_FormDesigner/$Main/default/icon/writingBoard.png new file mode 100644 index 0000000000000000000000000000000000000000..61e33165b4bfcd27a15f0de10e4a9cd4374717b7 Binary files /dev/null and b/o2web/source/x_component_cms_FormDesigner/$Main/default/icon/writingBoard.png differ diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json b/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json index a8afabc8b0cfd0c814f138ca8251cd64b409ff32..ad5fd6a248118372825f281ca6c1519565880fac 100644 --- a/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json +++ b/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json @@ -225,5 +225,10 @@ "icon": "importer.png", "text": MWF.xApplication.cms.FormDesigner.LP.modules.importer, "className": "Importer" + }, + "writingBoard": { + "icon": "writingBoard.png", + "text": MWF.xApplication.cms.FormDesigner.LP.modules.writingBoard, + "className": "WritingBoard" } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_blue-simple.json b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_blue-simple.json index a9d32f268bd5fa4670e5b4f44db793bf2f9ce577..e34db50d8342c023019b07f116e1cf9d75e21931 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_blue-simple.json +++ b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_blue-simple.json @@ -481,5 +481,25 @@ "style": "xform_blue_simple", "customIconStyle" : "blue", "customIconOverStyle" : "white" + }, + "writingBoard": { + "styles": { + "overflow": "hidden" + }, + "actionStyles": { + "float": "right", + "border": "1px solid #6681a5", + "border-radius": "3px", + "cursor": "pointer", + "height": "25px", + "line-height": "25px", + "min-width": "30px", + "padding-left": "24px", + "padding-right": "5px", + "margin-left": "5px", + "background": "url(../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center" + }, + "imageStyles": { + } } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_default.json b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_default.json index 574dda319689ad03f88f73fc85bab7b9857209a1..d0b50bea0849a6798ddd54545e9a80e03c2a8053 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_default.json +++ b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_default.json @@ -454,5 +454,25 @@ "style": "xform_blue_simple", "customIconStyle" : "blue", "customIconOverStyle" : "white" + }, + "writingBoard": { + "styles": { + "overflow": "hidden" + }, + "actionStyles": { + "float": "right", + "border": "1px solid #6681a5", + "border-radius": "3px", + "cursor": "pointer", + "height": "25px", + "line-height": "25px", + "min-width": "30px", + "padding-left": "24px", + "padding-right": "5px", + "margin-left": "5px", + "background": "url(../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center" + }, + "imageStyles": { + } } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_defaultMobile.json b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_defaultMobile.json index ba948abfc962b553991c899fd899208e04ecd0e8..429a0dc7bfed4616c17a178b36d6f7c7c216b5cd 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_defaultMobile.json +++ b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_defaultMobile.json @@ -457,5 +457,25 @@ "style": "xform_blue_simple", "customIconStyle" : "blue", "customIconOverStyle" : "white" + }, + "writingBoard": { + "styles": { + "overflow": "hidden" + }, + "actionStyles": { + "float": "right", + "border": "1px solid #6681a5", + "border-radius": "3px", + "cursor": "pointer", + "height": "25px", + "line-height": "25px", + "min-width": "30px", + "padding-left": "24px", + "padding-right": "5px", + "margin-left": "5px", + "background": "url(../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center" + }, + "imageStyles": { + } } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_none.json b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_none.json index e81aff9c4b93255a9aa1f3a2f1655a165d34adec..27b97137ce3f653546eb8faed9864d29aa9ba87a 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_none.json +++ b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_none.json @@ -194,5 +194,25 @@ "style": "xform_blue_simple", "customIconStyle" : "blue", "customIconOverStyle" : "white" + }, + "writingBoard": { + "styles": { + "overflow": "hidden" + }, + "actionStyles": { + "float": "right", + "border": "1px solid #6681a5", + "border-radius": "3px", + "cursor": "pointer", + "height": "25px", + "line-height": "25px", + "min-width": "30px", + "padding-left": "24px", + "padding-right": "5px", + "margin-left": "5px", + "background": "url(../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center" + }, + "imageStyles": { + } } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_red-simple.json b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_red-simple.json index d23fe2aae3b65acf625a86935ae04b0c6e111dc2..052b9af4da75834be60b099fdd57dbc1a6f4e874 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_red-simple.json +++ b/o2web/source/x_component_cms_FormDesigner/Module/Form/skin/styles_red-simple.json @@ -482,5 +482,25 @@ "style": "xform_red_simple", "customIconStyle" : "red", "customIconOverStyle" : "white" + }, + "writingBoard": { + "styles": { + "overflow": "hidden" + }, + "actionStyles": { + "float": "right", + "border": "1px solid #6681a5", + "border-radius": "3px", + "cursor": "pointer", + "height": "25px", + "line-height": "25px", + "min-width": "30px", + "padding-left": "24px", + "padding-right": "5px", + "margin-left": "5px", + "background": "url(../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center" + }, + "imageStyles": { + } } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Package.js b/o2web/source/x_component_cms_FormDesigner/Module/Package.js index 83d30591b71079ef9fe9ca4a803c210a1b2dff86..f062176694e41fd8c82aefc08ca5663fcf1a44ec 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Package.js +++ b/o2web/source/x_component_cms_FormDesigner/Module/Package.js @@ -47,4 +47,5 @@ MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Office", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Comment", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Statement", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Module.StatementSelector", null, false); -MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Importer", null, false); \ No newline at end of file +MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Importer", null, false); +MWF.xDesktop.requireApp("cms.FormDesigner", "Module.WritingBoard", null, false); \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/WritingBoard.js b/o2web/source/x_component_cms_FormDesigner/Module/WritingBoard.js new file mode 100644 index 0000000000000000000000000000000000000000..d04584326a97462701dddb7453e24f5e142958ad --- /dev/null +++ b/o2web/source/x_component_cms_FormDesigner/Module/WritingBoard.js @@ -0,0 +1,6 @@ +MWF.xApplication.cms.FormDesigner.Module = MWF.xApplication.cms.FormDesigner.Module || {}; +MWF.xDesktop.requireApp("process.FormDesigner", "Module.WritingBoard", null, false); +MWF.xApplication.cms.FormDesigner.Module.WritingBoard = MWF.CMSFCWritingBoard = new Class({ + Extends: MWF.FCWritingBoard, + Implements : [MWF.CMSFCMI] +}); diff --git a/o2web/source/x_component_cms_FormDesigner/Script.js b/o2web/source/x_component_cms_FormDesigner/Script.js index 838037e160e48e5fc43f9d6c38fde24001953e78..9e28897555cef7d40ae867c831532418043b177d 100644 --- a/o2web/source/x_component_cms_FormDesigner/Script.js +++ b/o2web/source/x_component_cms_FormDesigner/Script.js @@ -82,6 +82,8 @@ MWF.xApplication.cms.FormDesigner.Script = new Class({ this.loadHtmleditorScript(v); break; case "ImageClipper": this.loadImageClipperScript(v); break; + case "WritingBoard": + this.loadWritingBoardScript(v); break; case "Log": this.loadLogScript(v); break; case "Monitor": diff --git a/o2web/source/x_component_cms_Xform/$Form/default/css.wcss b/o2web/source/x_component_cms_Xform/$Form/default/css.wcss index f15cd14086505de1f3e2dba147699ea2e38e4bf3..7704cfe0ccbd173f6eee411b93bc3c5d8bc082e3 100644 --- a/o2web/source/x_component_cms_Xform/$Form/default/css.wcss +++ b/o2web/source/x_component_cms_Xform/$Form/default/css.wcss @@ -571,4 +571,35 @@ "background": "#ffffff" }, + "inputOpinionHandwritingAction": { + "float": "right", + "border": "1px solid #6681a5", + "border-radius": "3px", + "cursor": "pointer", + "padding-left": "24px", + "padding-right": "5px", + "margin-left": "5px", + "cursor": "pointer", + "background": "url("+"../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center" + }, + "handwritingNode": { + "position": "absolute", + "background": "#ffffff", + "border": "2px solid #999", + "border-radius": "8px", + "box-shadow": "0px 0px 10px #666", + }, + "handwritingActionNode": { + "height": "30px", + "line-height": "30px", + "margin": "5px auto", + "width": "70%", + "min-width": "100px", + "border-radius": "5px", + "text-align": "center", + "background-color": "#6681a5", + "color": "#ffffff", + "font-size": "16px", + "cursor": "pointer" + } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_Xform/WritingBoard.js b/o2web/source/x_component_cms_Xform/WritingBoard.js new file mode 100644 index 0000000000000000000000000000000000000000..60eabed6b7e9ec6642322da537154a3fd4c449c0 --- /dev/null +++ b/o2web/source/x_component_cms_Xform/WritingBoard.js @@ -0,0 +1,79 @@ +MWF.xDesktop.requireApp("process.Xform", "WritingBoard", null, false); +MWF.xApplication.cms.Xform.WritingBoard = MWF.CMSWritingBoard = new Class({ + Extends: MWF.APPWritingBoard, + upload: function( callback ){ + var image = this.tablet.getImage( null, true ); + o2.xDesktop.uploadImageByScale( + this.form.businessData.document.id, + "cmsDocument", + 0, //maxSize + this.tablet.getFormData(image), + image, + function (json) { + if(callback)callback(json); + }.bind(this), + function () { + + }.bind(this) + ); + }, + validationConfigItem: function(routeName, data){ + var flag = (data.status=="all") ? true: (routeName == "publish"); + if (flag){ + var n = this.getData(); + var v = (data.valueType=="value") ? n : n.length; + switch (data.operateor){ + case "isnull": + if (!v){ + this.notValidationMode(data.prompt); + return false; + } + break; + case "notnull": + if (v){ + this.notValidationMode(data.prompt); + return false; + } + break; + case "gt": + if (v>data.value){ + this.notValidationMode(data.prompt); + return false; + } + break; + case "lt": + if (v