Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
9c12f10a
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9c12f10a
编写于
6月 11, 2020
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复流程脚本在使用monaco编辑器时,点击保存按钮无法保存的问题
上级
4ce7a8fd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
75 addition
and
75 deletion
+75
-75
o2web/source/o2_core/o2/widget/JavascriptEditor.js
o2web/source/o2_core/o2/widget/JavascriptEditor.js
+1
-1
o2web/source/x_component_portal_ScriptDesigner/$Main/default/toolbars.html
...mponent_portal_ScriptDesigner/$Main/default/toolbars.html
+11
-11
o2web/source/x_component_portal_ScriptDesigner/Script.js
o2web/source/x_component_portal_ScriptDesigner/Script.js
+30
-30
o2web/source/x_component_process_ProcessDesigner/widget/ScriptText.js
.../x_component_process_ProcessDesigner/widget/ScriptText.js
+10
-10
o2web/source/x_component_process_ScriptDesigner/$Main/default/toolbars.html
...ponent_process_ScriptDesigner/$Main/default/toolbars.html
+11
-11
o2web/source/x_component_process_ScriptDesigner/Script.js
o2web/source/x_component_process_ScriptDesigner/Script.js
+12
-12
未找到文件。
o2web/source/o2_core/o2/widget/JavascriptEditor.js
浏览文件 @
9c12f10a
...
...
@@ -373,7 +373,7 @@ o2.widget.JavascriptEditor = new Class({
var
ev
=
name
;
switch
(
ev
)
{
case
"
change
"
:
ev
=
"
onDidChangeModelContent
"
;
break
;
case
"
blu
e
"
:
ev
=
"
onDidBlurEditorText
"
;
break
;
case
"
blu
r
"
:
ev
=
"
onDidBlurEditorText
"
;
break
;
}
if
(
this
.
editor
[
ev
])
this
.
editor
[
ev
](
fun
);
...
...
o2web/source/x_component_portal_ScriptDesigner/$Main/default/toolbars.html
浏览文件 @
9c12f10a
<div
id=
"MWFFormToolbar"
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"save.gif"
title=
"保存
数据字典
"
MWFButtonAction=
"saveScript"
MWFButtonText=
""
></span>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"saveNew.gif"
title=
"数据字典另存为"
MWFButtonAction=
"saveScriptAs"
MWFButtonText=
""
></span
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"formExplode.gif"
title=
"数据字典导出"
MWFButtonAction=
"scriptExplode"
MWFButtonText=
""
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"formImplode.gif"
title=
"数据字典导入"
MWFButtonAction=
"scriptImplode"
MWFButtonText=
""
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"save.gif"
title=
"保存
脚本
"
MWFButtonAction=
"saveScript"
MWFButtonText=
""
></span>
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="saveNew.gif" title="数据字典另存为" MWFButtonAction="saveScriptAs" MWFButtonText=""></span>--
>
<!-- -->
<!-- <span MWFnodetype="MWFToolBarSeparator"></span>--
>
<!-- -->
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="formExplode.gif" title="数据字典导出" MWFButtonAction="scriptExplode" MWFButtonText=""></span>--
>
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="formImplode.gif" title="数据字典导入" MWFButtonAction="scriptImplode" MWFButtonText=""></span>--
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"help.png"
title=
"帮助"
MWFButtonAction=
"scriptHelp"
MWFButtonText=
""
id=
"MWFScriptAutoCode"
></span
>
<!-- <span MWFnodetype="MWFToolBarSeparator"></span>--
>
<!-- -->
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="help.png" title="帮助" MWFButtonAction="scriptHelp" MWFButtonText="" id="MWFScriptAutoCode"></span>--
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span>
<input
type=
"checkbox"
value=
"autoSave"
id=
"MWFScriptAutoSaveCheck"
>
自动保存
...
...
@@ -85,4 +85,4 @@
</div>
\ No newline at end of file
</div>
o2web/source/x_component_portal_ScriptDesigner/Script.js
浏览文件 @
9c12f10a
...
...
@@ -83,8 +83,8 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
this
.
setPropertyContent
();
this
.
setIncludeNode
();
if
(
this
.
editor
.
editor
){
this
.
editor
.
editor
.
focus
();
if
(
this
.
editor
){
this
.
editor
.
focus
();
//this.editor.editor.navigateFileStart();
}
}.
bind
(
this
));
...
...
@@ -100,7 +100,7 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
this
.
editor
=
new
MWF
.
widget
.
JavascriptEditor
(
this
.
areaNode
);
this
.
editor
.
load
(
function
(){
if
(
this
.
data
.
text
){
this
.
editor
.
editor
.
setValue
(
this
.
data
.
text
);
this
.
editor
.
setValue
(
this
.
data
.
text
);
}
this
.
editor
.
addEditorEvent
(
"
change
"
,
function
(){
if
(
!
this
.
isChanged
){
...
...
@@ -117,20 +117,20 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
this
.
editor
.
addEvent
(
"
save
"
,
function
(){
this
.
save
();
}.
bind
(
this
));
this
.
editor
.
addEvent
(
"
reference
"
,
function
(
editor
,
e
,
e1
){
if
(
!
this
.
scriptReferenceMenu
){
MWF
.
require
(
"
MWF.widget.ScriptHelp
"
,
function
(){
this
.
scriptReferenceMenu
=
new
MWF
.
widget
.
ScriptHelp
(
null
,
this
.
editor
.
editor
,
{
"
onPostLoad
"
:
function
(){
this
.
showReferenceMenu
();
}.
bind
(
this
)
});
this
.
scriptReferenceMenu
.
getEditor
=
function
(){
return
this
.
editor
.
editor
;}.
bind
(
this
)
}.
bind
(
this
));
}
else
{
this
.
showReferenceMenu
();
}
}.
bind
(
this
));
//
this.editor.addEvent("reference", function(editor, e, e1){
//
if (!this.scriptReferenceMenu){
//
MWF.require("MWF.widget.ScriptHelp", function(){
//
this.scriptReferenceMenu = new MWF.widget.ScriptHelp(null, this.editor.editor, {
//
"onPostLoad": function(){
//
this.showReferenceMenu();
//
}.bind(this)
//
});
//
this.scriptReferenceMenu.getEditor = function(){return this.editor.editor;}.bind(this)
//
}.bind(this));
//
}else{
//
this.showReferenceMenu();
//
}
//
}.bind(this));
var
options
=
this
.
designer
.
styleSelectNode
.
options
;
for
(
var
i
=
0
;
i
<
options
.
length
;
i
++
){
...
...
@@ -202,7 +202,7 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
var
tabSize
=
this
.
tab
.
tabNodeContainer
.
getSize
();
var
y
=
size
.
y
-
tabSize
.
y
;
this
.
areaNode
.
setStyle
(
"
height
"
,
""
+
y
+
"
px
"
);
if
(
this
.
editor
)
if
(
this
.
editor
.
editor
)
this
.
editor
.
editor
.
resize
();
if
(
this
.
editor
)
this
.
editor
.
resize
();
},
addInclude
:
function
(){
...
...
@@ -234,7 +234,7 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
this
.
data
.
alias
=
alias
;
this
.
data
.
description
=
description
;
this
.
data
.
validated
=
validated
;
this
.
data
.
text
=
this
.
editor
.
editor
.
getValue
();
this
.
data
.
text
=
this
.
editor
.
getValue
();
this
.
isSave
=
true
;
this
.
designer
.
actions
.
saveScript
(
this
.
data
,
function
(
json
){
...
...
@@ -262,17 +262,17 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
},
saveSilence
:
function
(
callback
){
if
(
!
this
.
isSave
){
var
session
=
this
.
editor
.
editor
.
getSession
();
var
annotations
=
session
.
getAnnotations
();
var
validated
=
true
;
for
(
var
i
=
0
;
i
<
annotations
.
length
;
i
++
){
if
(
annotations
[
i
].
type
==
"
error
"
){
validated
=
false
;
break
;
}
}
// var session = this.editor.editor.getSession();
// var annotations = session.getAnnotations();
// var validated = true;
// for (var i=0; i<annotations.length; i++){
// if (annotations[i].type=="error"){
// validated = false;
// break;
// }
// }
var
validated
=
this
.
editor
.
validated
();
if
(
this
.
designer
.
currentScript
==
this
){
var
name
=
this
.
designer
.
propertyNameNode
.
get
(
"
value
"
);
var
alias
=
this
.
designer
.
propertyAliasNode
.
get
(
"
value
"
);
...
...
@@ -286,7 +286,7 @@ MWF.xApplication.portal.ScriptDesigner.Script = new Class({
this
.
data
.
description
=
description
;
this
.
data
.
validated
=
validated
;
}
this
.
data
.
text
=
this
.
editor
.
editor
.
getValue
();
this
.
data
.
text
=
this
.
editor
.
getValue
();
this
.
isSave
=
true
;
this
.
designer
.
actions
.
saveScript
(
this
.
data
,
function
(
json
){
...
...
o2web/source/x_component_process_ProcessDesigner/widget/ScriptText.js
浏览文件 @
9c12f10a
...
...
@@ -74,15 +74,15 @@ MWF.xApplication.process.ProcessDesigner.widget.ScriptText = new Class({
// this.fireEvent("change", [value]);
// }.bind(this));
this
.
createScriptReferenceMenu
();
this
.
editor
.
addEvent
(
"
reference
"
,
function
(
editor
,
e
,
e1
){
if
(
!
this
.
scriptReferenceMenu
){
this
.
createScriptReferenceMenu
(
this
.
showReferenceMenu
.
bind
(
this
));
}
else
{
this
.
showReferenceMenu
();
}
}.
bind
(
this
));
//
this.createScriptReferenceMenu();
//
//
this.editor.addEvent("reference", function(editor, e, e1){
//
if (!this.scriptReferenceMenu){
//
this.createScriptReferenceMenu(this.showReferenceMenu.bind(this));
//
}else{
//
this.showReferenceMenu();
//
}
//
}.bind(this));
if
(
callback
)
callback
();
...
...
@@ -167,4 +167,4 @@ MWF.xApplication.process.ProcessDesigner.widget.ScriptText = new Class({
//getValue()
});
\ No newline at end of file
});
o2web/source/x_component_process_ScriptDesigner/$Main/default/toolbars.html
浏览文件 @
9c12f10a
<div
id=
"MWFFormToolbar"
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"save.gif"
title=
"保存
数据字典
"
MWFButtonAction=
"saveScript"
MWFButtonText=
""
></span>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"saveNew.gif"
title=
"数据字典另存为"
MWFButtonAction=
"saveScriptAs"
MWFButtonText=
""
></span
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"formExplode.gif"
title=
"数据字典导出"
MWFButtonAction=
"scriptExplode"
MWFButtonText=
""
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"formImplode.gif"
title=
"数据字典导入"
MWFButtonAction=
"scriptImplode"
MWFButtonText=
""
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"save.gif"
title=
"保存
脚本
"
MWFButtonAction=
"saveScript"
MWFButtonText=
""
></span>
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="saveNew.gif" title="数据字典另存为" MWFButtonAction="saveScriptAs" MWFButtonText=""></span>--
>
<!-- -->
<!-- <span MWFnodetype="MWFToolBarSeparator"></span>--
>
<!-- -->
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="formExplode.gif" title="数据字典导出" MWFButtonAction="scriptExplode" MWFButtonText=""></span>--
>
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="formImplode.gif" title="数据字典导入" MWFButtonAction="scriptImplode" MWFButtonText=""></span>--
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span
>
<span
MWFnodetype=
"MWFToolBarButton"
MWFButtonImage=
"help.png"
title=
"帮助"
MWFButtonAction=
"scriptHelp"
MWFButtonText=
""
id=
"MWFScriptAutoCode"
></span
>
<!-- <span MWFnodetype="MWFToolBarSeparator"></span>--
>
<!-- -->
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="help.png" title="帮助" MWFButtonAction="scriptHelp" MWFButtonText="" id="MWFScriptAutoCode"></span>--
>
<span
MWFnodetype=
"MWFToolBarSeparator"
></span>
<input
type=
"checkbox"
value=
"autoSave"
id=
"MWFScriptAutoSaveCheck"
>
自动保存
...
...
@@ -74,4 +74,4 @@
<option
value=
"monaco"
>
monaco
</option>
</select></div>
</div>
\ No newline at end of file
</div>
o2web/source/x_component_process_ScriptDesigner/Script.js
浏览文件 @
9c12f10a
...
...
@@ -278,17 +278,17 @@ MWF.xApplication.process.ScriptDesigner.Script = new Class({
},
saveSilence
:
function
(
callback
){
if
(
!
this
.
isSave
){
var
session
=
this
.
editor
.
editor
.
getSession
();
var
annotations
=
session
.
getAnnotations
();
var
validated
=
true
;
for
(
var
i
=
0
;
i
<
annotations
.
length
;
i
++
){
if
(
annotations
[
i
].
type
==
"
error
"
){
validated
=
false
;
break
;
}
}
// var session = this.editor.editor.getSession();
// var annotations = session.getAnnotations();
// var validated = true;
// for (var i=0; i<annotations.length; i++){
// if (annotations[i].type=="error"){
// validated = false;
// break;
// }
// }
var
validated
=
this
.
editor
.
validated
();
if
(
this
.
designer
.
currentScript
==
this
)
{
var
name
=
this
.
designer
.
propertyNameNode
.
get
(
"
value
"
);
var
alias
=
this
.
designer
.
propertyAliasNode
.
get
(
"
value
"
);
...
...
@@ -302,7 +302,7 @@ MWF.xApplication.process.ScriptDesigner.Script = new Class({
this
.
data
.
description
=
description
;
this
.
data
.
validated
=
validated
;
}
this
.
data
.
text
=
this
.
editor
.
editor
.
getValue
();
this
.
data
.
text
=
this
.
editor
.
getValue
();
this
.
isSave
=
true
;
this
.
designer
.
actions
.
saveScript
(
this
.
data
,
function
(
json
){
...
...
@@ -331,4 +331,4 @@ MWF.xApplication.process.ScriptDesigner.Script = new Class({
explode
:
function
(){},
implode
:
function
(){}
});
\ No newline at end of file
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录