DocDspHtmlShowContent.jsp
7.88 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.general.Util"%>
<%@ page import="weaver.hrm.*" %>
<%@ page import="weaver.systeminfo.*" %>
<%User user = HrmUserVarify.getUser (request , response) ;
if(user == null) return ;
String doccontentbackgroud=Util.null2String(request.getParameter("doccontentbackgroud"));%>
<html>
<head>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
<script language="javascript" type="text/javascript" src="/js/init_wev8.js"></script>
<script language="javascript" type="text/javascript" src="/FCKEditor/swfobject_wev8.js"></script>
<script type="text/javascript" src="/js/ecology8/lang/weaver_lang_<%=user.getLanguage()%>_wev8.js"></script>
<link rel="stylesheet" type="text/css" href="/ueditor/themes/iframe_wev8.css">
<style type='text/css'>
body{margin:0 auto;}
body,td{font-size:12px;font-family:微软雅黑;}
#message_table td,td{
border:none;
}
#message_table td{
border:none;
}
#message_table td a{
border:none;
}
#message_table td img{
border:none;
}
a{color:blue;text-decoration:none;}
a:hover{color:#018efb;}
#content table{margin-bottom:10px;border-collapse:collapse;display:table;}
#content .selectTdClass{background-color:#edf5fa !important}
#content table.noBorderTable td,
#content table.noBorderTable th,
#content table.noBorderTable caption{border:1px dashed #ddd !important}
#content caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}
#content th{border-top:1px solid #BBB;background-color:#F7F7F7;}
#content table tr.firstRow th{border-top-width:2px;}
#content .ue-table-interlace-color-single{ background-color: #fcfcfc; }
#content .ue-table-interlace-color-double{ background-color: #f7faff; }
#content td p{margin:0;padding:0;}
#content .loadingclass{display:inline-block;cursor:default;background: url(/ueditor/themes/default/images/loading_wev8.gif) no-repeat center center transparent;border:1px solid #cccccc;margin-left:1px;height: 22px;width: 22px;}
#content .loaderrorclass{display:inline-block;cursor:default;background: url(/ueditor/themes/default/images/loaderror_wev8.png) no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}
#content pre{margin:.5em 0;padding:.4em .6em;border-radius:8px;background:#f8f8f8;}
#content .anchorclass{background: url(/ueditor/themes/default/images/anchor_wev8.gif) no-repeat scroll left center transparent;cursor: auto;display: inline-block;height: 16px;width: 15px;}
#content .pagebreak{display:block;clear:both !important;cursor:default !important;width: 100% !important;margin:0;}
#content .edui-editor-imagescale{display:none;position:absolute;border:1px solid #38B2CE;cursor:hand;-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;}
#content .edui-editor-imagescale span{position:absolute;width:6px;height:6px;overflow:hidden;font-size:0px;display:block;background-color:#3C9DD0;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand0{cursor:nw-resize;top:0;margin-top:-4px;left:0;margin-left:-4px;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand1{cursor:n-resize;top:0;margin-top:-4px;left:50%;margin-left:-4px;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand2{cursor:ne-resize;top:0;margin-top:-4px;left:100%;margin-left:-3px;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand3{cursor:w-resize;top:50%;margin-top:-4px;left:0;margin-left:-4px;}'
#content .edui-editor-imagescale .edui-editor-imagescale-hand4{cursor:e-resize;top:50%;margin-top:-4px;left:100%;margin-left:-3px;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand5{cursor:sw-resize;top:100%;margin-top:-3px;left:0;margin-left:-4px;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand6{cursor:s-resize;top:100%;margin-top:-3px;left:50%;margin-left:-4px;}
#content .edui-editor-imagescale .edui-editor-imagescale-hand7{cursor:se-resize;top:100%;margin-top:-3px;left:100%;margin-left:-3px;}
#content .view{padding:0;word-wrap:break-word;cursor:text;height:90%;}body{margin:8px;font-family:sans-serif;font-size:12px;}p{margin:5px 0;}
img{
max-width:1024px!important;
}
#content img{
cursor:pointer;
}
#content{word-break: break-all;}
</style>
<script type="text/javascript">
var mouldImgs = [];
parent.parent.jQuery("#mouldhtml img").each(function(){
mouldImgs.push(jQuery(this).attr("src"));
});
jQuery(document).ready(function(){
//不修改人力资源链接的target属性
jQuery("a").each(function(){
var _this=jQuery(this);
var href=_this.attr("href").toLowerCase();
if(-1==href.indexOf("javascript:openhrm("))
{
_this.attr("target","_blank");
}
if(href.indexOf("openfullwindowforxtable(")>0)
{
_this.attr("target","_self");
}
if(href.indexOf("#")==0)
{
_this.attr("target","_self");
}
});
var _style = jQuery("p[data-background]").attr("data-background");
_style="<%=doccontentbackgroud%>"
//_style=_style.replace(/background-repeat: no-repeat;/g,"");
if(_style){
var _style2 = jQuery("body").attr("style");
if(_style2 && _style2.length > 0){
_style2 = /;$/.test(_style2) ? _style2 : (_style2 + ";")
}else{
_style2 = "";
}
jQuery("body").attr("style",_style2 + _style);
}
});
//打开应用连接
function openAppLink(obj,linkid){
var linkType=jQuery(obj).attr("linkType");
if(linkType=="doc")
window.open("/docs/docs/DocDsp.jsp?id="+linkid);
else if(linkType=="task")
window.open("/proj/process/ViewTask.jsp?taskrecordid="+linkid);
else if(linkType=="crm")
window.open("/CRM/data/ViewCustomer.jsp?CustomerID="+linkid);
else if(linkType=="workflow")
window.open("/workflow/request/ViewRequest.jsp?requestid="+linkid);
else if(linkType=="project")
window.open("/proj/data/ViewProject.jsp?ProjID="+linkid);
else if(linkType=="workplan")
window.open("/workplan/data/WorkPlanDetail.jsp?workid="+linkid);
return false;
}
jQuery(function(){
jQuery("#content img").live({
click : function(){
var _src = jQuery(this).attr("src");
for(var i = 0 ;i < mouldImgs.length;i++){
if(_src == mouldImgs[i]) return;
}
playImgs(this);
}
});
})
function playImgs(e){
var imgPool=new Array()
var indexNum = 0;
var imgs = $("#content img");
imgs.each(function(){
var _src = jQuery(this).attr("src");
for(var i = 0 ;i < mouldImgs.length;i++){
if(_src == mouldImgs[i]){
_src = "";
break;
}
}
if(_src != ""){
imgPool.push(_src);
}
});
for(var i = 0; i < imgPool.length ; i ++){
if($(e).attr('src') == imgPool[i]){
break;
}
else{
indexNum++;
}
}
parent.parent.IMCarousel.showImgScanner4Pool(true, imgPool, indexNum, null, window.top);
}
</script>
</head>
<body>
<%@ include file="/hrm/resource/simpleHrmResource_wev8.jsp" %>
<div id="content">
<%
int docid=Util.getIntValue(request.getParameter("docid"),0);
if(docid!=0) {
String str=(String)session.getAttribute("html_"+docid);
out.println(str);
int htmlcounter=Util.getIntValue((String)session.getAttribute("htmlcounter_"+docid),-1);
if(htmlcounter<=1){
session.removeAttribute("html_"+docid);
session.removeAttribute("htmlcounter_"+docid);
}else{
htmlcounter--;
session.setAttribute("htmlcounter_"+docid,""+htmlcounter);
}
}
%>
</div>
</body>
</html>