houzhongyi
2024-07-11 e7c1260db32209a078a962aaa0ad5492c35774fb
提交 | 用户 | 时间
e7c126 1 <!DOCTYPE html>
H 2 <html>
3 <head>
4       <#import "../common/common.macro.ftl" as netCommon>
5     <@netCommon.commonStyle />
6     <link rel="stylesheet" href="${request.contextPath}/static/plugins/codemirror/lib/codemirror.css">
7     <link rel="stylesheet" href="${request.contextPath}/static/plugins/codemirror/addon/hint/show-hint.css">
8     <title>${I18n.admin_name}</title>
9     <style type="text/css">
10         .CodeMirror {
11               font-size:16px;
12             width: 100%;
13               height: 100%;
14             /*bottom: 0;
15             top: 0px;*/
16             position: absolute;
17         }
18     </style>
19 </head>
20 <body class="skin-blue fixed layout-top-nav">
21
22     <div class="wrapper">
23
24         <header class="main-header">
25             <nav class="navbar navbar-static-top">
26                 <div class="container">
27                     <#-- icon -->
28                     <div class="navbar-header">
29                         <a class="navbar-brand"><b>Web</b>IDE</a>
30                         <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
31                             <i class="fa fa-bars"></i>
32                         </button>
33                     </div>
34
35                     <#-- left nav -->
36                     <div class="collapse navbar-collapse pull-left" id="navbar-collapse">
37                         <ul class="nav navbar-nav">
38                             <li class="active" ><a href="javascript:;">
39                                 <span class="sr-only">(current)</span>
40                                 【<#list GlueTypeEnum as item><#if item == jobInfo.glueType>${item.desc}</#if></#list>】
41                                 ${jobInfo.jobDesc}
42                             </a></li>
43                         </ul>
44                     </div>
45
46                     <#-- right nav -->
47                     <div class="navbar-custom-menu">
48                         <ul class="nav navbar-nav">
49                             <li class="dropdown">
50                                 <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">${I18n.jobinfo_glue_rollback} <span class="caret"></span></a>
51                                 <ul class="dropdown-menu" role="menu">
52                                     <li <#if jobLogGlues?exists && jobLogGlues?size gt 0 >style="display: none;"</#if> >
53                                         <a href="javascript:;" class="source_version" version="version_now" glueType="${jobInfo.glueType}" >
54                                             <#list GlueTypeEnum as item><#if item == jobInfo.glueType>${item.desc}</#if></#list>: ${jobInfo.glueRemark}
55                                         </a>
56                                     </li>
57                                     <textarea id="version_now" style="display:none;" >${jobInfo.glueSource}</textarea>
58                                     <#if jobLogGlues?exists && jobLogGlues?size gt 0 >
59                                         <#list jobLogGlues as glue>
60                                             <li>
61                                                 <a href="javascript:;" class="source_version" version="version_${glue.id}" glueType="${glue.glueType}" >
62                                                     <#list GlueTypeEnum as item><#if item == glue.glueType>${item.desc}</#if></#list>: ${glue.glueRemark}
63                                                 </a>
64                                             </li>
65                                             <textarea id="version_${glue.id}" style="display:none;" >${glue.glueSource}</textarea>
66                                         </#list>
67                                     </#if>
68                                 </ul>
69                             </li>
70                             <li id="save" >
71                                 <a href="javascript:;" >
72                                     <i class="fa fa-fw fa-save" ></i>
73                                     ${I18n.system_save}
74                                 </a>
75                             </li>
76                             <li>
77                                 <a href="javascript:window.close();" >
78                                     <i class="fa fa-fw fa-close" ></i>
79                                 ${I18n.system_close}
80                                 </a>
81                             </li>
82                         </ul>
83                     </div>
84
85                 </div>
86             </nav>
87         </header>
88
89         <div class="content-wrapper" id="ideWindow" ></div>
90
91         <!-- footer -->
92         <#--<@netCommon.commonFooter />-->
93     </div>
94
95     <!-- 保存.模态框 -->
96     <div class="modal fade" id="saveModal" tabindex="-1" role="dialog"  aria-hidden="true">
97         <div class="modal-dialog ">
98             <div class="modal-content">
99                 <div class="modal-header">
100                     <h4 class="modal-title" ><i class="fa fa-fw fa-save"></i>${I18n.system_save}</h4>
101                 </div>
102                 <div class="modal-body">
103                     <div class="form-horizontal form" role="form" >
104                         <div class="form-group">
105                             <label for="lastname" class="col-sm-2 control-label">${I18n.jobinfo_glue_remark}<font color="red">*</font></label>
106                             <div class="col-sm-10"><input type="text" class="form-control" id="glueRemark" placeholder="${I18n.system_please_input}${I18n.jobinfo_glue_remark}" maxlength="64" ></div>
107                         </div>
108                         <hr>
109                         <div class="form-group">
110                             <div class="col-sm-offset-3 col-sm-6">
111                                 <button type="button" class="btn btn-primary ok" >${I18n.system_save}</button>
112                                 <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
113                             </div>
114                         </div>
115                     </div>
116                 </div>
117             </div>
118         </div>
119     </div>
120     
121 <@netCommon.commonScript />
122
123
124     <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js" />
125     <#assign glueTypeIdeMode = "text/x-java" />
126
127     <#if jobInfo.glueType == "GLUE_GROOVY" >
128         <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js" />
129         <#assign glueTypeIdeMode = "text/x-java" />
130     <#elseif jobInfo.glueType == "GLUE_SHELL" >
131         <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/shell/shell.js" />
132         <#assign glueTypeIdeMode = "text/x-sh" />
133     <#elseif jobInfo.glueType == "GLUE_PYTHON" >
134         <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/python/python.js" />
135         <#assign glueTypeIdeMode = "text/x-python" />
136     <#elseif jobInfo.glueType == "GLUE_PHP" >
137         <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/php/php.js" />
138         <#assign glueTypeIdeMode = "text/x-php" />
139         <#assign glueTypeModeSrc02 = "${request.contextPath}/static/plugins/codemirror/mode/clike/clike.js" />
140     <#elseif jobInfo.glueType == "GLUE_NODEJS" >
141         <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/javascript/javascript.js" />
142         <#assign glueTypeIdeMode = "text/javascript" />
143     <#elseif jobInfo.glueType == "GLUE_POWERSHELL" >
144         <#assign glueTypeModeSrc = "${request.contextPath}/static/plugins/codemirror/mode/powershell/powershell.js" />
145         <#assign glueTypeIdeMode = "powershell" />
146     </#if>
147
148
149 <script src="${request.contextPath}/static/plugins/codemirror/lib/codemirror.js"></script>
150 <script src="${glueTypeModeSrc}"></script>
151 <#if glueTypeModeSrc02?exists>
152     <script src="${glueTypeModeSrc02}"></script>
153 </#if>
154 <script src="${request.contextPath}/static/plugins/codemirror/addon/hint/show-hint.js"></script>
155 <script src="${request.contextPath}/static/plugins/codemirror/addon/hint/anyword-hint.js"></script>
156
157 <script>
158 var id = '${jobInfo.id}';
159 var ideMode = '${glueTypeIdeMode}';
160 </script>
161 <script src="${request.contextPath}/static/js/jobcode.index.1.js"></script>
162
163 </body>
164 </html>