Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
48d30d77
提交
48d30d77
authored
9月 05, 2017
作者:
xuxueli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Wed IDE加载优化
上级
76cc89bc
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
36 行增加
和
26 行删除
+36
-26
jobcode.index.ftl
...rc/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
+23
-5
jobcode.index.1.js
xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js
+13
-21
javascript.js
...p/static/plugins/codemirror/mode/javascript/javascript.js
+0
-0
没有找到文件。
xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
浏览文件 @
48d30d77
...
@@ -109,16 +109,34 @@
...
@@ -109,16 +109,34 @@
</div>
</div>
<
@
netCommon
.
commonScript
/>
<
@
netCommon
.
commonScript
/>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js"
/>
<
#
assign
glueTypeIdeMode =
"text/x-java"
/>
<
#
if
jobInfo
.
glueType =
=
"
GLUE_GROOVY
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js"
/>
<
#
assign
glueTypeIdeMode =
"text/x-java"
/>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_SHELL
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/shell/shell.js"
/>
<
#
assign
glueTypeIdeMode =
"text/x-sh"
/>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_PYTHON
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/python/python.js"
/>
<
#
assign
glueTypeIdeMode =
"text/x-python"
/>
<
#
elseif
jobInfo
.
glueType =
=
"
GLUE_NODEJS
"
>
<
#
assign
glueTypeModeSrc =
"${request.contextPath}/static/plugins/codemirror/mode/javascript/javascript.js"
/>
<
#
assign
glueTypeIdeMode =
"text/javascript"
/>
</
#
if>
<script
src=
"${request.contextPath}/static/plugins/codemirror/lib/codemirror.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/lib/codemirror.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js"
></script>
<script
src=
"${glueTypeModeSrc}"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/shell/shell.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/python/python.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/javascript/javascript.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/addon/hint/show-hint.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/addon/hint/show-hint.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/addon/hint/anyword-hint.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/addon/hint/anyword-hint.js"
></script>
<script>
<script>
var
id
=
'${jobInfo.id}'
;
var
id
=
'${jobInfo.id}'
;
var
glueType
=
'${jobInfo.glueTyp
e}'
;
var
ideMode
=
'${glueTypeIdeMod
e}'
;
</script>
</script>
<script
src=
"${request.contextPath}/static/js/jobcode.index.1.js"
></script>
<script
src=
"${request.contextPath}/static/js/jobcode.index.1.js"
></script>
...
...
xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js
浏览文件 @
48d30d77
...
@@ -8,36 +8,28 @@ $(function() {
...
@@ -8,36 +8,28 @@ $(function() {
});*/
});*/
var
codeEditor
;
var
codeEditor
;
function
initIde
(
glue
Type
,
glue
Source
)
{
function
initIde
(
glueSource
)
{
var
ideMode
=
"text/x-java"
;
if
(
codeEditor
==
null
)
{
if
(
'GLUE_GROOVY'
==
glueType
)
{
codeEditor
=
CodeMirror
(
document
.
getElementById
(
"ideWindow"
),
{
ideMode
=
"text/x-java"
;
mode
:
ideMode
,
}
else
if
(
'GLUE_SHELL'
==
glueType
){
lineNumbers
:
true
,
ideMode
=
"text/x-sh"
;
matchBrackets
:
true
,
}
else
if
(
'GLUE_PYTHON'
==
glueType
){
value
:
glueSource
ideMode
=
"text/x-python"
;
})
;
}
else
if
(
'GLUE_NODEJS'
==
glueType
)
{
}
else
{
ideMode
=
"text/javascript"
codeEditor
.
setValue
(
glueSource
);
}
}
codeEditor
=
CodeMirror
(
document
.
getElementById
(
"ideWindow"
),
{
mode
:
ideMode
,
lineNumbers
:
true
,
matchBrackets
:
true
,
value
:
glueSource
});
}
}
initIde
(
glueType
,
$
(
"#version_now"
).
val
());
initIde
(
$
(
"#version_now"
).
val
());
// code change
// code change
$
(
".source_version"
).
click
(
function
(){
$
(
".source_version"
).
click
(
function
(){
var
glueType
=
$
(
this
).
attr
(
'glueType'
);
var
sourceId
=
$
(
this
).
attr
(
'version'
);
var
sourceId
=
$
(
this
).
attr
(
'version'
);
var
temp
=
$
(
"#"
+
sourceId
).
val
();
var
temp
=
$
(
"#"
+
sourceId
).
val
();
codeEditor
.
setValue
(
''
);
//
codeEditor.setValue('');
initIde
(
glueType
,
temp
);
initIde
(
temp
);
});
});
// code source save
// code source save
...
...
xxl-job-admin/src/main/webapp/static/plugins/codemirror/mode/javascript/javascript.js
100644 → 100755
浏览文件 @
48d30d77
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论