common.macro.ftl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <#macro commonStyle>
  2. <meta charset="utf-8">
  3. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  4. <!-- Tell the browser to be responsive to screen width -->
  5. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  6. <!-- Bootstrap 3.3.5 -->
  7. <link rel="stylesheet" href="${request.contextPath}/static/adminlte/bootstrap/css/bootstrap.min.css">
  8. <!-- Font Awesome -->
  9. <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> -->
  10. <link rel="stylesheet" href="${request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css">
  11. <!-- Ionicons -->
  12. <!-- <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> -->
  13. <link rel="stylesheet" href="${request.contextPath}/static/plugins/ionicons-2.0.1/css/ionicons.min.css">
  14. <!-- Theme style -->
  15. <link rel="stylesheet" href="${request.contextPath}/static/adminlte/dist/css/AdminLTE-local.min.css">
  16. <!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. -->
  17. <link rel="stylesheet" href="${request.contextPath}/static/adminlte/dist/css/skins/_all-skins.min.css">
  18. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  19. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  20. <!--[if lt IE 9]>
  21. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  22. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  23. <![endif]-->
  24. <!-- scrollup -->
  25. <link rel="stylesheet" href="${request.contextPath}/static/plugins/scrollup/image.css">
  26. <!-- pace -->
  27. <link rel="stylesheet" href="${request.contextPath}/static/plugins/pace/pace-theme-minimal.css">
  28. </#macro>
  29. <#macro commonScript>
  30. <!-- jQuery 2.1.4 -->
  31. <script src="${request.contextPath}/static/adminlte/plugins/jQuery/jQuery-2.1.4.min.js"></script>
  32. <!-- Bootstrap 3.3.5 -->
  33. <script src="${request.contextPath}/static/adminlte/bootstrap/js/bootstrap.min.js"></script>
  34. <!-- FastClick -->
  35. <script src="${request.contextPath}/static/adminlte/plugins/fastclick/fastclick.js"></script>
  36. <!-- AdminLTE App -->
  37. <script src="${request.contextPath}/static/adminlte/dist/js/app.min.js"></script>
  38. <!-- scrollup -->
  39. <script src="${request.contextPath}/static/plugins/scrollup/jquery.scrollUp.min.js"></script>
  40. <!-- pace -->
  41. <script src="${request.contextPath}/static/plugins/pace/pace.min.js"></script>
  42. <script src="${request.contextPath}/static/plugins/jquery/jquery.cookie.js"></script>
  43. <script src="${request.contextPath}/static/js/common.1.js"></script>
  44. </#macro>
  45. <#macro commonHeader>
  46. <header class="main-header">
  47. <a href="${request.contextPath}/" class="logo">
  48. <span class="logo-mini"><b>X</b>XL</span>
  49. <span class="logo-lg"><b>任务调度</b>中心</span>
  50. </a>
  51. <nav class="navbar navbar-static-top" role="navigation">
  52. <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"><span class="sr-only">切换导航</span></a>
  53. <div class="navbar-custom-menu">
  54. <ul class="nav navbar-nav">
  55. <li class="dropdown user user-menu">
  56. <a href=";" id="logoutBtn" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
  57. <span class="hidden-xs">注销</span>
  58. </a>
  59. </li>
  60. </ul>
  61. </div>
  62. </nav>
  63. </header>
  64. </#macro>
  65. <#macro commonLeft>
  66. <!-- Left side column. contains the logo and sidebar -->
  67. <aside class="main-sidebar">
  68. <!-- sidebar: style can be found in sidebar.less -->
  69. <section class="sidebar">
  70. <!-- sidebar menu: : style can be found in sidebar.less -->
  71. <ul class="sidebar-menu">
  72. <li class="header">常用模块</li>
  73. <li class="nav-click" ><a href="${request.contextPath}/jobinfo"><i class="fa fa-circle-o text-red"></i> <span>调度管理</span></a></li>
  74. <li class="nav-click" ><a href="${request.contextPath}/joblog"><i class="fa fa-circle-o text-yellow"></i><span>调度日志</span></a></li>
  75. <li class="nav-click" ><a href="${request.contextPath}/help"><i class="fa fa-circle-o text-yellow"></i><span>使用教程</span></a></li>
  76. </ul>
  77. </section>
  78. <!-- /.sidebar -->
  79. </aside>
  80. </#macro>
  81. <#macro commonControl >
  82. <!-- Control Sidebar -->
  83. <aside class="control-sidebar control-sidebar-dark">
  84. <!-- Create the tabs -->
  85. <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
  86. <li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
  87. <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
  88. </ul>
  89. <!-- Tab panes -->
  90. <div class="tab-content">
  91. <!-- Home tab content -->
  92. <div class="tab-pane active" id="control-sidebar-home-tab">
  93. <h3 class="control-sidebar-heading">近期活动</h3>
  94. <ul class="control-sidebar-menu">
  95. <li>
  96. <a href="javascript::;">
  97. <i class="menu-icon fa fa-birthday-cake bg-red"></i>
  98. <div class="menu-info">
  99. <h4 class="control-sidebar-subheading">张三今天过生日</h4>
  100. <p>2015-09-10</p>
  101. </div>
  102. </a>
  103. </li>
  104. <li>
  105. <a href="javascript::;">
  106. <i class="menu-icon fa fa-user bg-yellow"></i>
  107. <div class="menu-info">
  108. <h4 class="control-sidebar-subheading">Frodo 更新了资料</h4>
  109. <p>更新手机号码 +1(800)555-1234</p>
  110. </div>
  111. </a>
  112. </li>
  113. <li>
  114. <a href="javascript::;">
  115. <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
  116. <div class="menu-info">
  117. <h4 class="control-sidebar-subheading">Nora 加入邮件列表</h4>
  118. <p>nora@example.com</p>
  119. </div>
  120. </a>
  121. </li>
  122. <li>
  123. <a href="javascript::;">
  124. <i class="menu-icon fa fa-file-code-o bg-green"></i>
  125. <div class="menu-info">
  126. <h4 class="control-sidebar-subheading">001号定时作业调度</h4>
  127. <p>5秒前执行</p>
  128. </div>
  129. </a>
  130. </li>
  131. </ul>
  132. <!-- /.control-sidebar-menu -->
  133. </div>
  134. <!-- /.tab-pane -->
  135. <!-- Settings tab content -->
  136. <div class="tab-pane" id="control-sidebar-settings-tab">
  137. <form method="post">
  138. <h3 class="control-sidebar-heading">个人设置</h3>
  139. <div class="form-group">
  140. <label class="control-sidebar-subheading"> 左侧菜单自适应
  141. <input type="checkbox" class="pull-right" checked>
  142. </label>
  143. <p>左侧菜单栏样式自适应</p>
  144. </div>
  145. <!-- /.form-group -->
  146. </form>
  147. </div>
  148. <!-- /.tab-pane -->
  149. </div>
  150. </aside>
  151. <!-- /.control-sidebar -->
  152. <!-- Add the sidebar's background. This div must be placed immediately after the control sidebar -->
  153. <div class="control-sidebar-bg"></div>
  154. </#macro>
  155. <#macro commonFooter >
  156. <footer class="main-footer">
  157. <div class="pull-right hidden-xs">
  158. <b>Version</b> 1.0
  159. </div>
  160. <strong>Copyright &copy; 2015-2015 &nbsp;
  161. <a href="https://github.com/xuxueli/xxl-job" target="_blank" >github</a>&nbsp;
  162. <a href="http://www.cnblogs.com/xuxueli/p/5021979.html" target="_blank" >cnblog</a>.
  163. </strong> All rights reserved.
  164. </footer>
  165. </#macro>
  166. <#macro comAlert >
  167. <!-- ComAlert.模态框Modal -->
  168. <div class="modal fade" id="ComAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  169. <div class="modal-dialog">
  170. <div class="modal-content">
  171. <!-- <div class="modal-header"><h4 class="modal-title"><strong>提示:</strong></h4></div> -->
  172. <div class="modal-body"><div class="alert alert-success"></div></div>
  173. <div class="modal-footer">
  174. <div class="text-center" >
  175. <button type="button" class="btn btn-default ok" data-dismiss="modal" >确认</button>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <!-- ComConfirm.模态框Modal -->
  182. <div class="modal fade" id="ComConfirm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  183. <div class="modal-dialog">
  184. <div class="modal-content">
  185. <div class="modal-body"><div class="alert alert-success"></div></div>
  186. <div class="modal-footer">
  187. <div class="text-center" >
  188. <button type="button" class="btn btn-primary ok" data-dismiss="modal" >确认</button>
  189. <button type="button" class="btn btn-default cancel" data-dismiss="modal" >取消</button>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. <!-- ComAlertTec.模态框Modal-科技感 -->
  196. <div class="modal fade" id="ComAlertTec" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  197. <div class="modal-dialog">
  198. <div class="modal-content-tec">
  199. <div class="modal-body"><div class="alert" style="color:#fff;"></div></div>
  200. <div class="modal-footer">
  201. <div class="text-center" >
  202. <button type="button" class="btn btn-info ok" data-dismiss="modal" >确认</button>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. <script>
  209. // 通用提示
  210. var ComAlert = {
  211. show:function(type, msg, callback){
  212. // 弹框初始
  213. if (type == 1) {
  214. $('#ComAlert .alert').attr('class', 'alert alert-success');
  215. } else {
  216. $('#ComAlert .alert').attr('class', 'alert alert-warning');
  217. }
  218. $('#ComAlert .alert').html(msg);
  219. $('#ComAlert').modal('show');
  220. $('#ComAlert .ok').click(function(){
  221. $('#ComAlert').modal('hide');
  222. if(typeof callback == 'function') {
  223. callback();
  224. }
  225. });
  226. // $("#ComAlert").on('hide.bs.modal', function () { }); // 监听关闭
  227. }
  228. };
  229. // 通用确认弹框
  230. var ComConfirm = {
  231. show:function(msg, callback){
  232. // 弹框初始
  233. $('#ComConfirm .alert').attr('class', 'alert alert-warning');
  234. $('#ComConfirm .alert').html(msg);
  235. $('#ComConfirm').modal('show');
  236. $('#ComConfirm .ok').unbind("click"); // 解绑陈旧事件
  237. $('#ComConfirm .ok').click(function(){
  238. $('#ComConfirm').modal('hide');
  239. if(typeof callback == 'function') {
  240. callback();
  241. return;
  242. }
  243. });
  244. $('#ComConfirm .cancel').click(function(){
  245. $('#ComConfirm').modal('hide');
  246. return;
  247. });
  248. }
  249. };
  250. // 提示-科技主题
  251. var ComAlertTec = {
  252. show:function(msg, callback){
  253. // 弹框初始
  254. $('#ComAlertTec .alert').html(msg);
  255. $('#ComAlertTec').modal('show');
  256. $('#ComAlertTec .ok').click(function(){
  257. $('#ComAlertTec').modal('hide');
  258. if(typeof callback == 'function') {
  259. callback();
  260. }
  261. });
  262. }
  263. };
  264. </script>
  265. </#macro>