index.jsp
11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<%@ page language="java" import="weaver.systeminfo.SystemEnv"
pageEncoding="utf-8"%>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="km" class="weaver.general.KnowledgeTransMethod"
scope="page" />
<%@ include file="/systeminfo/init_wev8.jsp"%>
<%
int language = user.getLanguage();
String modename = SystemEnv.getHtmlLabelName(16398, user.getLanguage());//16398:文档目录
//详细设计后台页面
String modeurl = "/docs/category/DocMainCategory.jsp";
//编辑权限验证
if (!HrmUserVarify.checkUserRight("homepage:Maint", user)) {
response.sendRedirect("/notice/noright.jsp");
return;
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="/rdeploy/assets/css/index.css" rel="stylesheet"
type="text/css">
<link rel="stylesheet" href="/css/init_wev8.css" type="text/css" />
<script type="text/javascript"
src="/js/select/script/jquery-1.8.3.min_wev8.js"></script>
<script language="javascript" type="text/javascript"
src="/js/init_wev8.js"></script>
<script type="text/javascript">
$(function () {
//鼠标移到图标上触发事件,显示设置和启用图标
$(".item .itemico img").hover(function (e) {
if (!!$(this).closest(".additem")[0]) {
$(this).attr("src", "/rdeploy/assets/img/new_slt.png");
} else {
$(this).attr("src", "/rdeploy/assets/img/doc/doc_hover.png");
$(this).closest(".item").find(".itemclose").show();
}
});
//只有鼠标移除整个item范围才会隐藏图标
$(".item").hover(null, function () {
var imgobj = $(this).children(".itemico").find("img");
if (!!$(this).closest(".additem")[0]) {
imgobj.attr("src", "/rdeploy/assets/img/new.png");
} else {
imgobj.attr("src", "/rdeploy/assets/img/doc/doc.png");
$(this).find(".itemoperation").hide();
$(this).find(".itemclose").hide();
}
});
//删除图标鼠标悬浮事件
$(".item .itemclose img").hover(function (e) {
$(this).attr("src", "/rdeploy/assets/img/close_slt.png");
}, function () {
$(this).attr("src", "/rdeploy/assets/img/close.png");
});
$(".item .itemclose img").bind("click", function (e) {
var _this = jQuery(this);
top.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(33435, language)%>",function(){
jQuery.ajax({
url:"SecCategoryOperation.jsp?isdialog=1&operation=delete&id="+_this.attr("_dataid"),
type:"post",
beforeSend:function(){
e8showAjaxTips("<%=SystemEnv.getHtmlLabelName(33592, language)%>",true);
},
success:function(data){
try{
var message = data.match(/~~~~\d+~~~~/);
if(message){
message = message[0];
if(message){
message = message.match(/\d+/)[0];
if(parseInt(message)=="87"){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(21536, language)%>");
}else{
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83473, language)%>");
}
}else{
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83472, language)%>");
_this.closest("div.item").remove();
}
}else{
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83472, language)%>");
_this.closest("div.item").remove();
}
}catch(e){
if(window.console)console.log(e,"DocMainCategoryList.jsp#doDel");
}
},
complete:function(){
e8showAjaxTips("",false);
}
});
});
});
//弹出设置界面
$(".item .itemico img").bind("click", function () {
var dialog = new window.top.Dialog();
dialog.currentWindow = window;
if (!!$(this).closest(".additem")[0]) {
dialog.URL = "/rdeploy/doc/DocSecCategoryAdd.jsp";
dialog.Title = "<%=SystemEnv.getHtmlLabelName(84075, user.getLanguage())%>"; //84075:新建目录
dialog.Width = 500;
dialog.Height = 200;
dialog.normalDialog = false;
dialog.Drag = true;
dialog.show();
} else {
jQuery.ajax({
type: "POST",
url: "/rdeploy/doc/CheckHasAdvancedPremission.jsp",
data: {secgoryid:$(this).attr("_dataid"),secnmae:$(this).attr("title")},
cache: false,
async:false,
dataType: 'json',
success: function(msg){
if(msg.hasAdvancedPremission)
{
dialog.URL = "/docs/category/DocCategoryTab.jsp?_fromURL=3&id="+msg.id;
dialog.Title = msg.secnmae;
dialog.Width = 1000;
dialog.Height = 830;
dialog.normalDialog = false;
dialog.Drag = true;
dialog.show();
var altMesflog = true;
jQuery.ajax({
type: "POST",
url: "/rdeploy/doc/CheckHasAltMesConfig.jsp",
cache: false,
async:false,
dataType: 'json',
success: function(msg){
altMesflog = msg.altMesFlog;
}
});
if(altMesflog)
{
myInterval = setInterval((function(){
return(function(){
var dialogFrameDocument = top.document.getElementById("_DialogFrame_"+dialog.ID).contentWindow.document;
if(dialogFrameDocument != null){
var dialogFrameDiv = dialogFrameDocument.getElementById('tabcontentframe').parentNode;
var e8TreeSwitch = dialogFrameDocument.getElementById('e8TreeSwitch');
if(e8TreeSwitch != null){
e8TreeSwitch.remove();
}
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = "@import url('/rdeploy/assets/css/doc/altmes.css')";
var altDiv = document.createElement("div");
altDiv.className = "altDiv";
var altMes = document.createElement("div");
altMes.innerHTML = '<%=SystemEnv.getHtmlLabelName(127880,user.getLanguage()) %>';
altMes.className = "altMes";
var btnDiv = document.createElement("div");
btnDiv.innerHTML = '<%=SystemEnv.getHtmlLabelName(127881,user.getLanguage()) %>';
btnDiv.className = "btnDiv";
altDiv.appendChild(altMes);
dialogFrameDiv.appendChild(style);
dialogFrameDiv.appendChild(btnDiv);
dialogFrameDiv.appendChild(altDiv);
var flag = true;
btnDiv.onclick = function(){
jQuery.ajax({
type: "POST",
url: "/rdeploy/doc/AddAtlMesConfig.jsp",
cache: false,
async:false,
dataType: 'json'
});
flag = false;
clearInterval(myInterval);
(function(o,i,s){
i=0.4;
s=0.01;
outInterval = setInterval((function(){
return(function(){
i+=s;
s = -0.05;
if(o.filters)
o.filters[0].opacity=i*100;
else
o.style.opacity=i;
if(i < 0)
{
clearInterval(outInterval);
altDiv.remove();
}
if(i < 0.3)
{
btnDiv.remove();
}
})
})(),50);
})(altDiv);
}
if(flag)
{
clearInterval(myInterval);
setTimeout(function(){
(function(o,i,s){
i=0.4;
s=0.01;
outInterval = setInterval((function(){
return(function(){
i+=s;
s = -0.05;
if(o.filters)
o.filters[0].opacity=i*100;
else
o.style.opacity=i;
if(i < 0)
{
clearInterval(outInterval);
altDiv.remove();
}
if(i < 0.3)
{
btnDiv.remove();
}
})
})(),50);
})(altDiv);
},8000);
}
}
})
})(),100);
}
}
else
{
dialog.URL = "/rdeploy/doc/DocSecCategoryRightEdit.jsp?id="+msg.id;
dialog.Title = msg.secnmae;
dialog.Width = 604;
dialog.Height = 505;
dialog.normalDialog = false;
dialog.Drag = true;
dialog.show();
}
}
});
}
});
});
</script>
</head>
<body>
<!-- 顶部 -->
<jsp:include page="/rdeploy/indexTop.jsp" flush="false">
<jsp:param name="modename" value="<%=modename%>" />
<jsp:param name="modeurl" value="<%=modeurl%>" />
</jsp:include>
<div class="content">
<%
rs.executeQuery("select id,categoryname from docseccategory where seccategorytype = 0 order by secorder");
while (rs.next()) {
String id = rs.getString("id");
%>
<!-- item block -->
<div class="item">
<div class="itemtitle" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" title="<%=rs.getString("categoryname")%>">
<%=rs.getString("categoryname")%>
</div>
<div class="itemico">
<img title="<%=rs.getString("categoryname")%>"
src="/rdeploy/assets/img/doc/doc.png" _dataid="<%=id%>">
</div>
<%
if (km.getDocDirCheckbox("" + id).equals("true") && km.getDocSecDirCheckbox("" + id).equals("true")) {
%>
<div class="itemclose">
<img src="/rdeploy/assets/img/close.png" width="25px" height="25px"
_dataid="<%=id%>">
</div>
<%
}
%>
</div>
<%
}
%>
<div class="item additem">
<div class="itemtitle">
<%=SystemEnv.getHtmlLabelName(84075, user.getLanguage())%>
<!-- 84075:新建目录 -->
</div>
<div class="itemico">
<img src="/rdeploy/assets/img/new.png">
</div>
</div>
</div>
</body>
</html>