toolbar_search_upload.jsp
10 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/formmode/checkright4setting.jsp" %>
<%@ page import="weaver.general.Util" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rci" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%
String loginid = Util.null2String(request.getParameter("loginid"));
String isclosed = Util.null2String(request.getParameter("isclosed"));
String requestFrom=Util.null2String(request.getParameter("requestFrom")); //页面请求来自哪里 homepage表示来自主页左侧菜单设置图标请求
String iconUrl=Util.null2String(request.getParameter("iconUrl"));
String defaultUrl="/messager/images/logo_big_wev8.jpg";
String sysUrl="";
String strSql="select resourceimageid,messagerurl from hrmresource where loginid='"+loginid+"'";
rs.executeSql(strSql);
if(rs.next()){
String messagerurl=Util.null2String(rs.getString("messagerurl"));
int resourceimageid=Util.getIntValue(rs.getString("resourceimageid"),0);
if(!"".equals(messagerurl)) {
defaultUrl=messagerurl;
}
if(resourceimageid!=0) {
sysUrl="/weaver/weaver.file.FileDownload?fileid="+resourceimageid;
}
}
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(803,user.getLanguage());
String needfav ="1";
String needhelp ="";
%>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(24504,user.getLanguage())+",javascript:doApply();,_self} " ;
RCMenuHeight += RCMenuHeightStep ;
//RCMenu += "{"+SystemEnv.getHtmlLabelName(24505,user.getLanguage())+",javascript:reSelect();,_self} " ;
//RCMenuHeight += RCMenuHeightStep ;
%>
<style type="text/css">
* {font:12px Microsoft YaHei}
html,body{
height: 100%;
margin: 0px;
padding: 0px 0 0 2px;
}
.e8_right_top{
padding: 10px 0px 0px 0px;
position: relative;
}
.e8_right_top .e8_baseinfo{
border-bottom: 1px solid #E9E9E9;
padding-bottom: 16px;
}
.e8_right_top .e8_baseinfo_name{
font-size: 18px;
color: #333;
}
.e8_right_top .e8_baseinfo_modify{
font-size: 12px;
color: #AFAFAF;
}
.e8_right_top ul{
list-style: none;
right: 20px;
bottom: 15px;
}
.e8_right_top ul li{
float: left;
padding: 0px 20px 0px 0px;
}
.e8_right_top ul li .def{
display: block;
font-size: 15px;
color: rgb(13,147,246);
padding: 1px;
text-decoration: none;
cursor: pointer;
border-bottom: 2px solid #fff;
}
.e8_right_top ul li .undef{
display: block;
font-size: 15px;
color: #A3A3A3;
padding: 1px;
text-decoration: none;
cursor: pointer;
border-bottom: 2px solid #fff;
}
.e8_right_center{
overflow: hidden;
padding: 0px 10px;
}
.e8_right_center .e8_right_frameContainer{
display: none;
height: 100%;
}
.e8_btn_top_first{
color:#fff;
background-color:#30b5ff;
padding-left:25px !important;
padding-right:25px !important;
height:28px;
line-height:22px;
vertical-align:middle;
border:1px solid #30b5ff;
cursor:pointer;
}
.gradient{
position:absolute;
width:100px;
opacity:0;
filter:alpha(opacity=0);
}
</style>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<SCRIPT LANGUAGE="JavaScript">
function addformtabsubmit0(){
var imageid = $("#imagefileid").val();
var imageSource = "";
if(imageid == ""){
imageSource = "local";
}else{
imageSource = "url";
}
var frame = window.frames['ifrmSrcImg'];
if(frame.document.getElementById("ferret") != null){
var src = frame.document.getElementById("ferret").getAttribute("src");
var url = dialog.currentWindow.document.getElementById("aurl");
var url2 = dialog.currentWindow.document.getElementById("aurl2");
url.style.display ="none";
dialog.currentWindow.document.getElementById("imageUrl2").src=src;
dialog.currentWindow.document.getElementById("imageRelUrl").value=src;
dialog.currentWindow.document.getElementById("imageid").value=imageid;
dialog.currentWindow.document.getElementById("imageSource").value=imageSource;
url2.style.display ="block";
}
dialog.closeByHand();
}
</SCRIPT>
<HTML>
<HEAD>
<LINK REL="stylesheet" type="text/css" HREF="/css/Weaver_wev8.css">
<script type="text/javascript">
var parentWin = parent.parent.getParentWindow(parent);
var dialog = parent.parent.getDialog(parent);
</script>
</HEAD>
<div class="zDialog_div_content">
<body style="margin: 0px;padding: 0px;overflow: hidden;">
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(30986, user.getLanguage()) %>" id="zd_btn_submit" class="e8_btn_top" onclick="javascript:addformtabsubmit0()">
<span title="<%=SystemEnv.getHtmlLabelName(83721, user.getLanguage()) %>" class="cornerMenu"></span>
</td>
</tr>
</table>
<form name="frmMain" method="post" action="/messager/GetUserIconOpreate.jsp?temploginid=<%=loginid%>&trmphomepage=<%=requestFrom%>" enctype="multipart/form-data">
<input name="loginid" value="<%=loginid%>" type="hidden">
<input name="method" value="usericon" type="hidden">
<input name="requestFrom" value="<%=requestFrom%>" type="hidden">
<input type="hidden" name="imagefileid" id="imagefileid"/>
<table id="tabs" style="padding-left:20px;" cellspacing="10" >
<tr>
<td>
<div class="e8_right_top">
<ul>
<li><a class="def" href="#" onclick="changetab(this);"><%=SystemEnv.getHtmlLabelName(125077,user.getLanguage()) %></a></li>
<li>|</li>
<li><a class="undef" href="#" onclick="changetab(this);" ><%=SystemEnv.getHtmlLabelName(125078,user.getLanguage()) %></a></li>
<li>|</li>
<input type="hidden" id="urltype" value="1">
</ul>
</div>
</td>
</tr>
<tr>
<td id="local">
<div id="tt" style="position:absolute;">
<input class="e8_btn_top_first" type="button" value="<%=SystemEnv.getHtmlLabelName(125080,user.getLanguage()) %>">
</div>
<div id="div1">
<input class="url gradient" id="fileSrcUrl" type="file" name="fileSrcUrl" hidefocus>
</div>
<font style="color:#a3a3a3;font-size:15px;margin-left:110px;"><%=SystemEnv.getHtmlLabelName(125081,user.getLanguage()) %></font>
</td>
<td id="url" style="display:none;">
<div class="e8_right_top">
<ul>
<li><a class="def" href="#" onclick="changetab(this);"><%=SystemEnv.getHtmlLabelName(125079,user.getLanguage()) %></a></li>
<input type="text" style="width:270px;" id="urlbrowser">
</ul>
</div>
</td>
</tr>
</table>
<table style="width:100%;padding-left:20px;height:200px;">
<tr>
<td >
<iframe id="ifrmSrcImg" src="" name="ifrmSrcImg" style="border:0px solid #DDDDDD;" height="100%" width="100%" BORDER="0"
FRAMEBORDER="no" NORESIZE="NORESIZE" scrolling="auto">
</iframe>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
resizeDialog(document);
});
</script>
</body>
</HTML>
<SCRIPT LANGUAGE="JavaScript">
$(document).ready( function() {
$("#fileSrcUrl").bind("change",function(){
var urltype = $("#urltype").val();
var imgUrl=this.value;
if(imgUrl!=''){
if(imgUrl.toLowerCase().indexOf(".gif")==-1 && imgUrl.toLowerCase().indexOf("jpg")==-1) {
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(24506, user.getLanguage())%>");
return;
}
$(ifrmSrcImg.document.body).append("<img src='/images/messageimages/loading_wev8.gif'/><%=SystemEnv.getHtmlLabelName(19819, user.getLanguage())%>...");
frmMain.target="ifrmSrcImg";
frmMain.action="/formmode/setup/toolbar_search_onlyImage.jsp?urltype="+urltype;
frmMain.submit();
}
});
$("#urlbrowser").bind("blur",function(){
var urltype = $("#urltype").val();
var urlbrowser = $("#urlbrowser").val();
if( urlbrowser != ""){
$(ifrmSrcImg.document.body).append("<img src='/images/messageimages/loading_wev8.gif'/><%=SystemEnv.getHtmlLabelName(19819, user.getLanguage())%>...");
frmMain.target="ifrmSrcImg";
frmMain.action="/formmode/setup/toolbar_search_onlyImage.jsp?urltype="+urltype;
frmMain.submit();
}else{
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(124909, user.getLanguage())%>");
return;
}
});
});
function changetab(obj){
var li = $(".e8_right_top").find("a");
for(var i=0;i<li.length;i++){
if(obj == li[i]){
$(obj).removeClass().addClass("def");
}else{
$(li[i]).removeClass().addClass("undef");
}
}
if($(obj).html() == "<%=SystemEnv.getHtmlLabelName(125078,user.getLanguage()) %>"){
$("#url").show();
$("#local").hide();
$("#urltype").val("2");
}else{
$("#url").hide();
$("#local").show();
$("#urlbrowser").val("");
$("#urltype").val("1");
}
}
function doApply(){
var srcUrl=frmMain.fileSrcUrl.value;
if($.trim(srcUrl)==""){
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(24506, user.getLanguage())%>");
return;
} else if (srcUrl.toLowerCase().indexOf(".gif")==-1 && srcUrl.toLowerCase().indexOf("jpg")==-1){
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(24506, user.getLanguage())%>");
return;
} else {
addformtabsubmit0();
}
}
function reSelect(){
frmMain.action="/formmode/setup/add_toolbarSearch_upload.jsp?dialog=1&isFromMode=1";
window.location.replace(window.location.href);
}
</script>