DocComponents.jsp
12.5 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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.*" %>
<%@ page import="weaver.systeminfo.*" %>
<%@ page import="weaver.hrm.*" %>
<%
User user = HrmUserVarify.getUser (request , response) ;
if(user == null) return ;
String mode = Util.null2String(request.getParameter("mode"));
String docid = Util.null2String(request.getParameter("docid"));
String secid = Util.null2String(request.getParameter("secid"));
String pagename = Util.null2String(request.getParameter("pagename"));
String operation = Util.null2String(request.getParameter("operation"));
int maxUploadImageSize = Util.getIntValue(Util.null2String(request.getParameter("maxUploadImageSize")),0);
int bacthDownloadFlag = Util.getIntValue(Util.null2String(request.getParameter("bacthDownloadFlag")),0);
String canShare = Util.null2String(request.getParameter("canShare"));
int language = user.getLanguage();
String isEnableExtranetHelp = KtreeHelp.getInstance().isEnableExtranetHelp;
%>
<%
if(operation.equals("getBase")){
%>
<style>
#loading{
position:absolute;
left:45%;
background:#ffffff;
top:40%;
padding:8px;
z-index:20001;
height:auto;
border:1px solid #ccc;
}
</style>
<div id="loading">
<span><img src="/images/loading2_wev8.gif" align="absmiddle"></span>
<span id="loading-msg"><%=SystemEnv.getHtmlLabelName(19945, language)%></span>
</div>
<link rel="stylesheet" type="text/css" href="/js/extjs/resources/css/ext-all_wev8.css" />
<link rel="stylesheet" type="text/css" href="/js/extjs/resources/css/xtheme-gray_wev8.css" />
<link rel="stylesheet" type="text/css" href="/css/weaver-ext_wev8.css" />
<script type="text/javascript">
document.getElementById('loading-msg').innerHTML = "<%=SystemEnv.getHtmlLabelName(19945, user.getLanguage())%>"
try{
if(parent.jQuery("#loading")[0].style.display != "none"){
document.getElementById('loading').style.display = "none";
}
}catch(e){}
try{
if(parent.parent.jQuery("#loading")[0].style.display != "none"){
document.getElementById('loading').style.display = "none";
}
}catch(e){}
</script>
<SCRIPT LANGUAGE="vbscript">
dim id
</SCRIPT>
<link rel="stylesheet" type="text/css" href="/css/column-tree_wev8.css" />
<script type="text/javascript" src="/js/extjs/adapter/ext/ext-base_wev8.js"></script>
<script type="text/javascript" src="/js/extjs/ext-all_wev8.js"></script>
<script type="text/javascript" src="/js/extjs/build/ux/miframe_wev8.js"></script>
<SCRIPT LANGUAGE="javascript">
function ExtonReady(){
Ext.Ajax.timeout=300000;
Ext.QuickTips.init();
Ext.BLANK_IMAGE_URL = '/js/extjs/resources/images/default/s_wev8.gif';
Ext.useShims = true;
//Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Ext.override(Ext.grid.GridView, {
templates: {
cell: new Ext.Template(
'<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>',
'<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>',
"</td>"
)
}
});
}
var isLoadExt = false;
function loadExt() {
if(!isLoadExt){
try {
//loadFile("/js/extjs/adapter/ext/ext-base_wev8.js","js");
//loadFile("/js/extjs/ext-all_wev8.js","js");
loadFile("/js/TabCloseMenu_wev8.js","js");
<%if(language==7) {%>
loadFile("/js/extjs/build/locale/ext-lang-zh_CN_gbk_wev8.js","js");
<%} else if(language==8) {%>
loadFile("/js/extjs/build/locale/ext-lang-en_wev8.js","js");
<%} else if(language==9) {%>
loadFile("/js/extjs/build/locale/ext-lang-zh_TW_wev8.js","js");
<%}%>
loadFile("/js/ColumnNodeUI_wev8.js","js");
//loadFile("/js/extjs/build/ux/miframe_wev8.js","js");
loadFile("/js/Cookies_wev8.js","js");
ExtonReady();
loadFile("/js/doc/DocCommonExt_wev8.js","js");
isLoadExt = true;
} catch(e){}
}
}
function finalDo(mode){
//需要加上收藏与帮助按钮
var divContentTabObj=document.getElementById('divContentTab');
var divFavorite = document.createElement("DIV");
divFavorite.id="divFavorite";
//alert("params : "+params);
divFavorite.innerHTML="<img src='/images/btnFavorite_wev8.gif' style='cursor:hand' onclick=\"openFavouriteBrowser();\" title="+wmsg.base.addToFavorite+">" +
" <img src='/images/help2_wev8.gif' style='cursor:hand' onclick='showHelp()' title="+wmsg.base.help+">";
divFavorite.style.position="absolute";
divFavorite.style.top="8";
divFavorite.style.right="15";
jQuery("#divDocTile").append(divFavorite)
//divContentTabObj.firstChild.appendChild(divFavorite);
//alert(divContentTabObj.className)
document.getElementById('loading').style.display="none";
try{
parent.jQuery("#loading").hide();
parent.parent.jQuery("#loading").hide();
}catch(e){}
}
function showHelp(){
var pathKey = window.location.pathname;
//alert(pathKey);
if(pathKey!=""){
pathKey = pathKey.substr(1);
}
var operationPage = "http://help.e-cology.com.cn/help/RemoteHelp.jsp";
//var operationPage = "http://localhost/help/RemoteHelp.jsp";
var screenWidth = window.screen.width*1;
var screenHeight = window.screen.height*1;
var isEnableExtranetHelp = <%=isEnableExtranetHelp%>;
if(isEnableExtranetHelp==1){
operationPage = "http://e-cology.com.cn/formmode/apps/ktree/ktreeHelp.jsp";
}
window.open(operationPage+"?pathKey="+pathKey,"_blank","top=0,left="+(screenWidth-800)/2+",height="+(screenHeight-90)+",width=800,status=no,scrollbars=yes,toolbar=yes,menubar=no,location=no");
}
jQuery(window).bind('resize', function() {
adjustContentHeight("resize");
});
function openFavouriteBrowser(){
var favpagename = setFavPageName();
var favuri = setFavUri();
var favquerystring = setFavQueryString();
jQuery.post("/systeminfo/FavouriteSession.jsp",{pagename:favpagename},function (data) {
var sessionKey = data.sessionKey;
window.showModalDialog('/systeminfo/BrowserMain.jsp?url=/favourite/FavouriteBrowser.jsp&fav_pagename='+sessionKey+'&fav_uri='+favuri+'&fav_querystring='+favquerystring+'&mouldID=doc');
});
}
function loadFile(filePath, type){
var element=null;
if (type=="js"){
element=document.createElement('script')
element.setAttribute("type","text/javascript")
element.setAttribute("src", filePath)
}else if (type=="css"){
element=document.createElement("link")
element.setAttribute("rel", "stylesheet")
element.setAttribute("type", "text/css")
element.setAttribute("href", filePath)
}else{
return ;
}
var eHead=document.getElementsByTagName("head");
if(eHead!=null)
eHead[0].appendChild(element)
}
function getX(element){
var x=0;
while(element){
x=x+element.offsetLeft;
element=element.offsetParent;
}
return x;
}
function getY(element){
var y=0;
while(element){
y=y+element.offsetTop;
element=element.offsetParent;
}
return y;
}
function showPrompt(content){
Ext.get('loading').fadeIn();
document.getElementById('loading-msg').innerHTML = content;
}
function hiddenPrompt(){
var showTableDiv = document.getElementById('loading');
if(showTableDiv!=null)
showTableDiv.style.display="none";
}
</script>
<%
} else if(operation.equals("getDivAcc")){
%>
<div id="DocDivAcc" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivAcc;
function doGetdivAcc(){
if(!getDivAcc){
getDivAcc = new Ext.Panel({
id:'DocDivAccPanel',
layout:'fit',
applyTo: 'DocDivAcc',
monitorResize: true,
items:[
DocCommonExt.getDocImgPanel("<%=maxUploadImageSize%>","<%=mode%>","<%=docid%>",true,"<%=bacthDownloadFlag%>")
]
});
}
getDivAcc.doLayout();
}
function resizedivAcc(){
Ext.getCmp("DocImgs").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocImgs").setHeight(156);
Ext.getCmp("DocDivAccPanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocImgs").syncSize();
Ext.getCmp("DocDivAccPanel").syncSize();
}
</script>
<%
} else if(operation.equals("getDivShare")){
%>
<script type="text/javascript" src="/js/doc/DocShareSnip_wev8.js"></script>
<div id="DocDivShare" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivShare;
function doGetdivShare(){
if(!getDivShare){
getDivShare = new Ext.Panel({
id:'DocDivSharePanel',
layout:'fit',
applyTo: 'DocDivShare',
monitorResize: true,
items:[
new DocShareSnip("<%=docid%>","<%=canShare%>").getGrid()
]
});
}
getDivShare.doLayout();
}
function resizedivShare(){
Ext.getCmp("DocShare").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocShare").setHeight(195);
Ext.getCmp("DocDivSharePanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocShare").syncSize();
Ext.getCmp("DocDivSharePanel").syncSize();
}
</script>
<%
} else if(operation.equals("getDivMark")){
%>
<div id="DocDivMark" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivMark;
function doGetdivMark(){
if(!getDivMark){
getDivMark = new Ext.Panel({
id:'DocDivMarkPanel',
layout:'fit',
applyTo: 'DocDivMark',
monitorResize: true,
items:[
DocCommonExt.getDocMarkPanel()
]
});
}
getDivMark.doLayout();
}
function resizedivMark(){
Ext.getCmp("docMark").setWidth(document.body.clientWidth-1);
Ext.getCmp("docMark").setHeight(195);
Ext.getCmp("DocDivMarkPanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("docMark").syncSize();
Ext.getCmp("DocDivMarkPanel").syncSize();
}
</script>
<%
} else if(operation.equals("getDivReplay")){
%>
<div id="DocDivReplay" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivReplay;
function doGetdivReplay(){
if(!getDivReplay){
getDivReplay = new Ext.Panel({
id:'DocDivReplayPanel',
layout:'fit',
applyTo: 'DocDivReplay',
monitorResize: true,
items:[
DocCommonExt.getDocReplyPanel()
]
});
}
getDivReplay.doLayout();
}
function resizedivReplay(){
Ext.getCmp("DocReply").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocReply").setHeight(195);
Ext.getCmp("DocDivReplayPanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocReply").syncSize();
Ext.getCmp("DocDivReplayPanel").syncSize();
}
</script>
<%
} else if(operation.equals("getDivVer")){
%>
<div id="DocDivVer" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivVer;
function doGetdivVer(){
if(!getDivVer){
getDivVer = new Ext.Panel({
id:'DocDivVerPanel',
layout:'fit',
applyTo: 'DocDivVer',
monitorResize: true,
items:[
DocCommonExt.getDocVerPanel()
]
});
}
getDivVer.doLayout();
}
function resizedivVer(){
Ext.getCmp("DocVersion").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocVersion").setHeight(195);
Ext.getCmp("DocDivVerPanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocVersion").syncSize();
Ext.getCmp("DocDivVerPanel").syncSize();
}
</script>
<%
} else if(operation.equals("getDivViewLog")){
%>
<%@ include file="/docs/DocDetailLog.jsp"%>
<div id="DocDivViewLog" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivViewLog;
function doGetdivViewLog(){
if(!getDivViewLog){
getDivViewLog = new Ext.Panel({
id:'DocDivViewLogPanel',
layout:'fit',
applyTo: 'DocDivViewLog',
monitorResize: true,
items:[
getDocDetailLogPane(docid,500,300,true)
]
});
}
getDivViewLog.doLayout();
}
function resizedivViewLog(){
Ext.getCmp("DocDetailLog").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocDetailLog").setHeight(195);
Ext.getCmp("DocDivViewLogPanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocDetailLog").syncSize();
Ext.getCmp("DocDivViewLogPanel").syncSize();
}
</script>
<%
} else if(operation.equals("getDivRelationResource")){
%>
<script type="text/javascript" src="/js/doc/DocRelationable_wev8.js"></script>
<div id="DocDivRelationResource" style="width:100%;height:100%;"></div>
<script type="text/javascript">
var getDivRelationResource;
function doGetdivRelationResource(){
if(!getDivRelationResource){
getDivRelationResource = new Ext.Panel({
id:'DocDivRelationResourcePanel',
layout:'fit',
applyTo: 'DocDivRelationResource',
monitorResize: true,
items:[
new DocRelationable(docid).getGrid()
]
});
}
getDivRelationResource.doLayout();
}
function resizedivRelationResource(){
Ext.getCmp("DocRelation").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocRelation").setHeight(195);
Ext.getCmp("DocDivRelationResourcePanel").setWidth(document.body.clientWidth-1);
Ext.getCmp("DocRelation").syncSize();
Ext.getCmp("DocDivRelationResourcePanel").syncSize();
}
</script>
<%
}
%>