提交 4b88d267 编写于 作者: 蔡祥熠

Merge branch 'fix/Query.view_script_editor' into 'wrdp'

Merge of fix/Query.view_script_editor 修复视图过滤条件脚本报错的问题 to wrdp

See merge request o2oa/o2oa!4234
...@@ -6,6 +6,7 @@ o2.widget.JavascriptEditor = new Class({ ...@@ -6,6 +6,7 @@ o2.widget.JavascriptEditor = new Class({
options: { options: {
//"type": "ace", //"type": "ace",
"type": "monaco", "type": "monaco",
"forceType": null,
"title": "JavascriptEditor", "title": "JavascriptEditor",
"style": "default", "style": "default",
"option": { "option": {
...@@ -55,7 +56,7 @@ o2.widget.JavascriptEditor = new Class({ ...@@ -55,7 +56,7 @@ o2.widget.JavascriptEditor = new Class({
}, },
load: function(callback){ load: function(callback){
this.getEditorTheme(function(json){ 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"){ if (this.options.type.toLowerCase()=="ace"){
this.loadAce(callback); this.loadAce(callback);
} }
......
...@@ -13,7 +13,8 @@ o2.widget.ScriptArea = new Class({ ...@@ -13,7 +13,8 @@ o2.widget.ScriptArea = new Class({
"isbind": true, "isbind": true,
"mode": "javascript", "mode": "javascript",
"runtime": "all", "runtime": "all",
"key": "code" "key": "code",
"forceType": null
}, },
initialize: function(node, options){ initialize: function(node, options){
this.setOptions(options); this.setOptions(options);
...@@ -187,6 +188,7 @@ o2.widget.ScriptArea = new Class({ ...@@ -187,6 +188,7 @@ o2.widget.ScriptArea = new Class({
value = (value) ? value : ""; value = (value) ? value : "";
this.jsEditor = new o2.widget.JavascriptEditor(this.contentNode,{ this.jsEditor = new o2.widget.JavascriptEditor(this.contentNode,{
"runtime": this.options.runtime || "all", "runtime": this.options.runtime || "all",
"forceType": this.options.forceType,
"option": { "option": {
"value": value, "value": value,
"lineNumbers": false, "lineNumbers": false,
......
...@@ -1297,6 +1297,12 @@ MWF.xApplication.Profile.emPowerPopupForm = new Class({ ...@@ -1297,6 +1297,12 @@ MWF.xApplication.Profile.emPowerPopupForm = new Class({
sdata.toPerson = data.toPerson.split("@")[0]; sdata.toPerson = data.toPerson.split("@")[0];
sdata.startTime = data.startDateInput+" "+data.startTimeInput+":00"; sdata.startTime = data.startDateInput+" "+data.startTimeInput+":00";
sdata.completedTime = data.endDateInput+" "+data.endTimeInput+":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; sdata.enable = true;
if(data.type=="all"){ if(data.type=="all"){
......
...@@ -90,6 +90,7 @@ MWF.xApplication.Profile.LP = { ...@@ -90,6 +90,7 @@ MWF.xApplication.Profile.LP = {
"type_process":"Process", "type_process":"Process",
"type_filter":"File type", "type_filter":"File type",
"saveNotAll":"Partial save failed", "saveNotAll":"Partial save failed",
"startTimeEarlyCompleteTime": "The start time cannot be later than the end time",
"title":"Title", "title":"Title",
"activityName":"Activity", "activityName":"Activity",
"createTime":"Commission time", "createTime":"Commission time",
......
...@@ -91,6 +91,7 @@ MWF.xApplication.Profile.LP = { ...@@ -91,6 +91,7 @@ MWF.xApplication.Profile.LP = {
"type_process":"流程", "type_process":"流程",
"type_filter":"文件类型", "type_filter":"文件类型",
"saveNotAll":"部分保存失败", "saveNotAll":"部分保存失败",
"startTimeEarlyCompleteTime": "开始时间不能晚于结束时间",
"title":"标题", "title":"标题",
"activityName":"状态", "activityName":"状态",
"createTime":"委托时间", "createTime":"委托时间",
......
...@@ -73,6 +73,7 @@ MWF.xApplication.query.ViewDesigner.widget.ViewFilter = new Class({ ...@@ -73,6 +73,7 @@ MWF.xApplication.query.ViewDesigner.widget.ViewFilter = new Class({
"title": title, "title": title,
"isload" : true, "isload" : true,
"isbind" : false, "isbind" : false,
"forceType": "ace",
"maxObj": this.app.formContentNode || this.app.pageContentNode, "maxObj": this.app.formContentNode || this.app.pageContentNode,
"onChange": function(){ "onChange": function(){
this.customFilterValueScriptData = this.customFilterValueScriptArea.toJson(); this.customFilterValueScriptData = this.customFilterValueScriptArea.toJson();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册