Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
8e2d6d8d
提交
8e2d6d8d
authored
8月 12, 2016
作者:
xueli.xue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公共弹框插件,模块化
上级
70a12160
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
139 行增加
和
114 行删除
+139
-114
common.macro.ftl
.../src/main/webapp/WEB-INF/template/common/common.macro.ftl
+6
-109
help.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/help.ftl
+0
-1
jobcode.index.ftl
...rc/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
+0
-1
jobinfo.index.ftl
...rc/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
+0
-1
joblog.index.ftl
.../src/main/webapp/WEB-INF/template/joblog/joblog.index.ftl
+0
-1
login.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/login.ftl
+0
-1
xxl.alert.1.js
xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js
+133
-0
没有找到文件。
xxl-job-admin/src/main/webapp/WEB-INF/template/common/common.macro.ftl
浏览文件 @
8e2d6d8d
...
...
@@ -44,10 +44,14 @@
<script src="${request.contextPath}/static/plugins/scrollup/jquery.scrollUp.min.js"></script>
<!-- pace -->
<script src="${request.contextPath}/static/plugins/pace/pace.min.js"></script>
<script src="${request.contextPath}/static/plugins/jquery/jquery.cookie.js"></script>
<#-- jquery cookie -->
<script src="${request.contextPath}/static/plugins/jquery/jquery.cookie.js"></script>
<#-- common -->
<script src="${request.contextPath}/static/js/xxl.alert.1.js"></script>
<script src="${request.contextPath}/static/js/common.1.js"></script>
<script>var base_url = '${request.contextPath}';</script>
</#macro>
<#macro commonHeader>
...
...
@@ -175,110 +179,4 @@
<a href="http://my.oschina.net/xuxueli/blog/690978" target="_blank" >oschina</a>
</strong><!-- All rights reserved. -->
</footer>
</#macro>
<#macro comAlert >
<!-- ComAlert.模态框Modal -->
<div class="modal fade" id="ComAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<!-- <div class="modal-header"><h4 class="modal-title"><strong>提示:</strong></h4></div> -->
<div class="modal-body"><div class="alert alert-success"></div></div>
<div class="modal-footer">
<div class="text-center" >
<button type="button" class="btn btn-default ok" data-dismiss="modal" >确认</button>
</div>
</div>
</div>
</div>
</div>
<!-- ComConfirm.模态框Modal -->
<div class="modal fade" id="ComConfirm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body"><div class="alert alert-success"></div></div>
<div class="modal-footer">
<div class="text-center" >
<button type="button" class="btn btn-primary ok" data-dismiss="modal" >确认</button>
<button type="button" class="btn btn-default cancel" data-dismiss="modal" >取消</button>
</div>
</div>
</div>
</div>
</div>
<!-- ComAlertTec.模态框Modal-科技感 -->
<div class="modal fade" id="ComAlertTec" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content-tec">
<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>
<div class="modal-footer">
<div class="text-center" >
<button type="button" class="btn btn-info ok" data-dismiss="modal" >确认</button>
</div>
</div>
</div>
</div>
</div>
<script>
// 通用提示
var ComAlert = {
show:function(type, msg, callback){
// 弹框初始
if (type == 1) {
$('#ComAlert .alert').attr('class', 'alert alert-success');
} else {
$('#ComAlert .alert').attr('class', 'alert alert-warning');
}
$('#ComAlert .alert').html(msg);
$('#ComAlert').modal('show');
$('#ComAlert .ok').click(function(){
$('#ComAlert').modal('hide');
if(typeof callback == 'function') {
callback();
}
});
// $("#ComAlert").on('hide.bs.modal', function () { }); // 监听关闭
}
};
// 通用确认弹框
var ComConfirm = {
show:function(msg, callback){
// 弹框初始
$('#ComConfirm .alert').attr('class', 'alert alert-warning');
$('#ComConfirm .alert').html(msg);
$('#ComConfirm').modal('show');
$('#ComConfirm .ok').unbind("click"); // 解绑陈旧事件
$('#ComConfirm .ok').click(function(){
$('#ComConfirm').modal('hide');
if(typeof callback == 'function') {
callback();
return;
}
});
$('#ComConfirm .cancel').click(function(){
$('#ComConfirm').modal('hide');
return;
});
}
};
// 提示-科技主题
var ComAlertTec = {
show:function(msg, callback){
// 弹框初始
$('#ComAlertTec .alert').html(msg);
$('#ComAlertTec').modal('show');
$('#ComAlertTec .ok').click(function(){
$('#ComAlertTec').modal('hide');
if(typeof callback == 'function') {
callback();
}
});
}
};
</script>
</#macro>
\ No newline at end of file
xxl-job-admin/src/main/webapp/WEB-INF/template/help.ftl
浏览文件 @
8e2d6d8d
...
...
@@ -52,6 +52,5 @@
<
@
netCommon
.
commonFooter
/>
</div>
<
@
netCommon
.
commonScript
/>
<
@
netCommon
.
comAlert
/>
</body>
</html>
xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/jobcode.index.ftl
浏览文件 @
8e2d6d8d
...
...
@@ -88,7 +88,6 @@
<
@
netCommon
.
commonFooter
/>
</div>
<
@
netCommon
.
comAlert
/>
<
@
netCommon
.
commonScript
/>
<script
src=
"${request.contextPath}/static/plugins/codemirror/lib/codemirror.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js"
></script>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
浏览文件 @
8e2d6d8d
...
...
@@ -250,7 +250,6 @@ public class DemoJobHandler extends IJobHandler {
</div>
<
@
netCommon
.
commonScript
/>
<
@
netCommon
.
comAlert
/>
<!-- DataTables -->
<script
src=
"${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"
></script>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/joblog/joblog.index.ftl
浏览文件 @
8e2d6d8d
...
...
@@ -104,7 +104,6 @@
</div>
<
@
netCommon
.
commonScript
/>
<
@
netCommon
.
comAlert
/>
<!-- DataTables -->
<script
src=
"${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"
></script>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/login.ftl
浏览文件 @
8e2d6d8d
...
...
@@ -38,7 +38,6 @@
</form>
</div>
<
@
netCommon
.
commonScript
/>
<
@
netCommon
.
comAlert
/>
<script
src=
"${request.contextPath}/static/plugins/jquery/jquery.validate.min.js"
></script>
<script
src=
"${request.contextPath}/static/plugins/iCheck/icheck.min.js"
></script>
<script
src=
"${request.contextPath}/static/js/login.1.js"
></script>
...
...
xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js
0 → 100644
浏览文件 @
8e2d6d8d
/**
* Created by xuxueli on 16/8/12.
*
* dependency, jquery + bootstrap
*/
// 通用提示
var
ComAlert
=
{
html
:
function
(){
var
html
=
'<div class="modal fade" id="ComAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">'
+
'<div class="modal-dialog">'
+
'<div class="modal-content">'
+
'<div class="modal-header hidden"><h4 class="modal-title"><strong>提示:</strong></h4></div>'
+
'<div class="modal-body"><div class="alert alert-success"></div></div>'
+
'<div class="modal-footer">'
+
'<div class="text-center" >'
+
'<button type="button" class="btn btn-default ok" data-dismiss="modal" >确认</button>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
return
html
;
},
show
:
function
(
type
,
msg
,
callback
){
// dom init
if
(
$
(
'#ComAlert'
).
length
==
0
){
$
(
'body'
).
append
(
ComAlert
.
html
());
}
// 弹框初始
if
(
type
==
1
)
{
$
(
'#ComAlert .alert'
).
attr
(
'class'
,
'alert alert-success'
);
}
else
{
$
(
'#ComAlert .alert'
).
attr
(
'class'
,
'alert alert-warning'
);
}
$
(
'#ComAlert .alert'
).
html
(
msg
);
$
(
'#ComAlert'
).
modal
(
'show'
);
$
(
'#ComAlert .ok'
).
click
(
function
(){
$
(
'#ComAlert'
).
modal
(
'hide'
);
if
(
typeof
callback
==
'function'
)
{
callback
();
}
});
// $("#ComAlert").on('hide.bs.modal', function () { }); // 监听关闭
}
};
// 通用确认弹框
var
ComConfirm
=
{
html
:
function
(){
var
html
=
'<div class="modal fade" id="ComConfirm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">'
+
'<div class="modal-dialog">'
+
'<div class="modal-content">'
+
'<div class="modal-body"><div class="alert alert-success"></div></div>'
+
'<div class="modal-footer">'
+
'<div class="text-center" >'
+
'<button type="button" class="btn btn-primary ok" data-dismiss="modal" >确认</button>'
+
'<button type="button" class="btn btn-default cancel" data-dismiss="modal" >取消</button>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
return
html
;
},
show
:
function
(
msg
,
callback
){
// dom init
if
(
$
(
'#ComConfirm'
).
length
==
0
){
$
(
"body"
).
append
(
ComConfirm
.
html
());
}
// 弹框初始
$
(
'#ComConfirm .alert'
).
attr
(
'class'
,
'alert alert-warning'
);
$
(
'#ComConfirm .alert'
).
html
(
msg
);
$
(
'#ComConfirm'
).
modal
(
'show'
);
$
(
'#ComConfirm .ok'
).
unbind
(
"click"
);
// 解绑陈旧事件
$
(
'#ComConfirm .ok'
).
click
(
function
(){
$
(
'#ComConfirm'
).
modal
(
'hide'
);
if
(
typeof
callback
==
'function'
)
{
callback
();
return
;
}
});
$
(
'#ComConfirm .cancel'
).
click
(
function
(){
$
(
'#ComConfirm'
).
modal
(
'hide'
);
return
;
});
}
};
// 提示-科技主题
var
ComAlertTec
=
{
html
:
function
(){
var
html
=
'<div class="modal fade" id="ComAlertTec" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">'
+
'<div class="modal-dialog">'
+
'<div class="modal-content-tec">'
+
'<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>'
+
'<div class="modal-footer">'
+
'<div class="text-center" >'
+
'<button type="button" class="btn btn-info ok" data-dismiss="modal" >确认</button>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
;
return
html
;
},
show
:
function
(
msg
,
callback
){
// dom init
if
(
$
(
'#ComAlertTec'
).
length
==
0
){
$
(
'body'
).
append
(
ComAlertTec
.
html
());
}
// 弹框初始
$
(
'#ComAlertTec .alert'
).
html
(
msg
);
$
(
'#ComAlertTec'
).
modal
(
'show'
);
$
(
'#ComAlertTec .ok'
).
click
(
function
(){
$
(
'#ComAlertTec'
).
modal
(
'hide'
);
if
(
typeof
callback
==
'function'
)
{
callback
();
}
});
}
};
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论