From dcc1de9aa3ef89fca97c41eab13d0697bf9fb2e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Jun 2021 00:01:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E5=9B=BE=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=9D=A1=E4=BB=B6=E8=84=9A=E6=9C=AC=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/o2_core/o2/widget/JavascriptEditor.js | 3 ++- o2web/source/o2_core/o2/widget/ScriptArea.js | 4 +++- o2web/source/x_component_Profile/Main.js | 6 ++++++ o2web/source/x_component_Profile/lp/en.js | 1 + o2web/source/x_component_Profile/lp/zh-cn.js | 1 + .../x_component_query_ViewDesigner/widget/ViewFilter.js | 1 + 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/o2web/source/o2_core/o2/widget/JavascriptEditor.js b/o2web/source/o2_core/o2/widget/JavascriptEditor.js index 643ea717b9..e7a58be101 100644 --- a/o2web/source/o2_core/o2/widget/JavascriptEditor.js +++ b/o2web/source/o2_core/o2/widget/JavascriptEditor.js @@ -6,6 +6,7 @@ o2.widget.JavascriptEditor = new Class({ options: { //"type": "ace", "type": "monaco", + "forceType": null, "title": "JavascriptEditor", "style": "default", "option": { @@ -55,7 +56,7 @@ o2.widget.JavascriptEditor = new Class({ }, load: function(callback){ this.getEditorTheme(function(json){ - this.options.type = o2.editorData.javascriptEditor.editor || "monaco"; + this.options.type = this.options.forceType || o2.editorData.javascriptEditor.editor || "monaco"; if (this.options.type.toLowerCase()=="ace"){ this.loadAce(callback); } diff --git a/o2web/source/o2_core/o2/widget/ScriptArea.js b/o2web/source/o2_core/o2/widget/ScriptArea.js index 28999308b7..a778287cb4 100644 --- a/o2web/source/o2_core/o2/widget/ScriptArea.js +++ b/o2web/source/o2_core/o2/widget/ScriptArea.js @@ -13,7 +13,8 @@ o2.widget.ScriptArea = new Class({ "isbind": true, "mode": "javascript", "runtime": "all", - "key": "code" + "key": "code", + "forceType": null }, initialize: function(node, options){ this.setOptions(options); @@ -187,6 +188,7 @@ o2.widget.ScriptArea = new Class({ value = (value) ? value : ""; this.jsEditor = new o2.widget.JavascriptEditor(this.contentNode,{ "runtime": this.options.runtime || "all", + "forceType": this.options.forceType, "option": { "value": value, "lineNumbers": false, diff --git a/o2web/source/x_component_Profile/Main.js b/o2web/source/x_component_Profile/Main.js index 81e0d58167..70f2155100 100644 --- a/o2web/source/x_component_Profile/Main.js +++ b/o2web/source/x_component_Profile/Main.js @@ -1297,6 +1297,12 @@ MWF.xApplication.Profile.emPowerPopupForm = new Class({ sdata.toPerson = data.toPerson.split("@")[0]; sdata.startTime = data.startDateInput+" "+data.startTimeInput+":00"; sdata.completedTime = data.endDateInput+" "+data.endTimeInput+":00"; + + if( Date.parse(sdata.completedTime) - Date.parse(sdata.startTime) < 0 ){ + this.app.notice(this.lp.startTimeEarlyCompleteTime,"error"); + return; + } + sdata.enable = true; if(data.type=="all"){ diff --git a/o2web/source/x_component_Profile/lp/en.js b/o2web/source/x_component_Profile/lp/en.js index 74b478e934..b4e9d52d3e 100644 --- a/o2web/source/x_component_Profile/lp/en.js +++ b/o2web/source/x_component_Profile/lp/en.js @@ -90,6 +90,7 @@ MWF.xApplication.Profile.LP = { "type_process":"Process", "type_filter":"File type", "saveNotAll":"Partial save failed", + "startTimeEarlyCompleteTime": "The start time cannot be later than the end time", "title":"Title", "activityName":"Activity", "createTime":"Commission time", diff --git a/o2web/source/x_component_Profile/lp/zh-cn.js b/o2web/source/x_component_Profile/lp/zh-cn.js index 358b7984f5..a5fbcb3e24 100644 --- a/o2web/source/x_component_Profile/lp/zh-cn.js +++ b/o2web/source/x_component_Profile/lp/zh-cn.js @@ -91,6 +91,7 @@ MWF.xApplication.Profile.LP = { "type_process":"流程", "type_filter":"文件类型", "saveNotAll":"部分保存失败", + "startTimeEarlyCompleteTime": "开始时间不能晚于结束时间", "title":"标题", "activityName":"状态", "createTime":"委托时间", diff --git a/o2web/source/x_component_query_ViewDesigner/widget/ViewFilter.js b/o2web/source/x_component_query_ViewDesigner/widget/ViewFilter.js index 0bd356439e..bc06ad63b4 100644 --- a/o2web/source/x_component_query_ViewDesigner/widget/ViewFilter.js +++ b/o2web/source/x_component_query_ViewDesigner/widget/ViewFilter.js @@ -73,6 +73,7 @@ MWF.xApplication.query.ViewDesigner.widget.ViewFilter = new Class({ "title": title, "isload" : true, "isbind" : false, + "forceType": "ace", "maxObj": this.app.formContentNode || this.app.pageContentNode, "onChange": function(){ this.customFilterValueScriptData = this.customFilterValueScriptArea.toJson(); -- GitLab