SocialTopButtonsDetail.jsp
13.6 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.crm.util.CrmUtil"%>
<%@page import="java.util.regex.*"%>
<%@ include file="/page/maint/common/initNoCache.jsp" %>
<jsp:useBean id="Util" class="weaver.general.Util" scope="page" />
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="BrowserComInfo" class="weaver.workflow.field.BrowserComInfo" scope="page" />
<%@ page import="weaver.general.Util, weaver.docs.docs.CustomFieldManager" %>
<jsp:useBean id="SocialManageService" class="weaver.social.manager.SocialManageService" scope="page"/>
<%
if (!HrmUserVarify.checkUserRight("message:manager", user)) {
response.sendRedirect("/notice/noright.jsp");
return;
}
//抓取单点登录配置信息
RecordSet.execute("select sysid,name from outter_sys");
HashMap<String, String> ssoMap = new HashMap<String, String>();
while(RecordSet.next()){
ssoMap.put(RecordSet.getString("sysid"), RecordSet.getString("name"));
}
%>
<LINK href="/social/css/manager_wev8.css" type=text/css rel=STYLESHEET>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<link href="/js/checkbox/jquery.tzCheckbox_wev8.css" type=text/css rel=STYLESHEET>
<script language=javascript src="/js/checkbox/jquery.tzCheckbox_wev8.js"></script>
<div id="ssoMapOptions" style="display:none;">
<% for(Map.Entry<String, String> entry : ssoMap.entrySet()) {%>
<option value="<%=entry.getKey() %>"><%=entry.getValue() %></option>
<%} %>
</div>
<TABLE class=ListStyle id="oTable" cols=7 border=0 cellspacing=0>
<COLGROUP>
<COL width="8%">
<COL width="15%">
<COL width="17%">
<COL width="17%">
<COL width="7%">
<COL width="10%">
<COL width="14%">
<COL width="12%">
</COLGROUP>
<TBODY>
<tr class=header>
<th width="8%"><input name="chkAll" type="checkbox" onclick="formCheckAll(this)"></th>
<th width="15%"><%=SystemEnv.getHtmlLabelName(21557,user.getLanguage())%></th>
<th width="17%"><%=SystemEnv.getHtmlLabelName(125075,user.getLanguage())%>(18*18)</th>
<th width="17%"><%=SystemEnv.getHtmlLabelName(126765,user.getLanguage())%>(18*18)</th>
<th width="7%"><input name="chkAll" type="checkbox" onclick="formCheckAll1(this)"><%=SystemEnv.getHtmlLabelName(31835,user.getLanguage())%></th>
<th width="10%"><%=SystemEnv.getHtmlLabelName(33234,user.getLanguage())%></th>
<th width="14%">URL/<%=SystemEnv.getHtmlLabelName(126766,user.getLanguage())%></th>
<th width="12%"><%=SystemEnv.getHtmlLabelName(126767,user.getLanguage())%>URL</th>
</tr>
<%
String trClass="DataLight";
int rowsum=0;
String icouri = "", hoticouri = "", linkuri = "", numberuri = "", ifshowon;
int fieldid, labelindexid, showindex, uritype, ifsysico;
boolean ifcandel = true, ifcanedit = true;
String fieldname = "";
String sql = "select * from Social_Pc_UrlIcons where icotype = '0' order by showindex";
RecordSet.executeSql(sql);
Pattern pattern = Pattern.compile("[0-9]*");
while(RecordSet.next()){
fieldid = RecordSet.getInt("id");
labelindexid = RecordSet.getInt("labelindexid");
showindex = RecordSet.getInt("showindex");
uritype = RecordSet.getInt("uritype");
icouri = RecordSet.getString("icouri");
icouri = pattern.matcher(icouri).matches()?"/weaver/weaver.file.FileDownload?fileid="+icouri:icouri;
hoticouri = RecordSet.getString("hoticouri");
System.err.println(hoticouri);
hoticouri = (pattern.matcher(hoticouri).matches())?"/weaver/weaver.file.FileDownload?fileid="+hoticouri:hoticouri;
System.err.println(hoticouri);
linkuri = RecordSet.getString("linkuri");
numberuri = RecordSet.getString("numberuri");
ifshowon = RecordSet.getString("ifshowon");
ifsysico = RecordSet.getInt("ifsysico");
System.err.println("ifsysico:"+ifsysico);
if(labelindexid != 0 && labelindexid != -1){
fieldname = SystemEnv.getHtmlLabelName(labelindexid, user.getLanguage());
}else{
fieldname = RecordSet.getString("labeltemp");
}
//如果是单点登录,则显示的是系统的名称而不是标识
if(uritype == 2){
linkuri = ssoMap.get(linkuri);
}
%>
<TR class=<%=trClass%> forsort="ON">
<TD>
<%if(ifcandel && ifsysico != 1){ %>
<input type='checkbox' name='check_select' value="<%=fieldid%>_<%=rowsum%>">
<input type='hidden' name='modifyflag_<%=rowsum%>' value="<%=fieldid%>">
<input type="hidden" name="candel_<%=rowsum %>" value="y">
<input type="hidden" name="ifsysico" value="<%=ifsysico %>">
<%}else{ %>
<input type='hidden' name='check_select' value="<%=fieldid%>_<%=rowsum%>">
<input type='hidden' name='modifyflag_<%=rowsum%>' value="<%=fieldid%>">
<input type="hidden" name="candel_<%=rowsum %>" value="n">
<input type="checkbox" disabled="disabled">
<%} %>
<img moveimg="" src="/CRM/images/move_wev8.png" title="<%=SystemEnv.getHtmlLabelName(82783, user.getLanguage()) %>" >
</TD>
<TD>
<%if(ifcanedit){ %>
<input class=Inputstyle type=<%=(!ifcandel)?"hidden":"text" %> id="itemDspName_<%=rowsum%>" name="itemDspName_<%=rowsum%>" style="width:90%" value="<%=Util.toScreen(fieldname,user.getLanguage())%>" onfocus="checkUriTypeByRow(<%=rowsum%>);" onchange="checkinput('itemDspName_<%=rowsum%>','itemDspName_<%=rowsum%>_span');setChange(<%=rowsum%>)">
<span id="itemDspName_<%=rowsum%>_span"><%=(!ifcandel)?Util.toScreen(fieldname,user.getLanguage()):"" %></span>
<input type="hidden" name="olditemDspName_<%=rowsum%>" value="<%=Util.toScreen(fieldname,user.getLanguage())%>" >
<input type="hidden" name="labelIndexId_<%=rowsum%>" value="<%=labelindexid %>" >
<%}else{%>
<input type="hidden" name="itemDspName_<%=rowsum%>" value="<%=Util.toScreen(fieldname,user.getLanguage())%>">
<span id="itemDspName_<%=rowsum%>_span"><%=Util.toScreen(fieldname,user.getLanguage())%></span>
<input type="hidden" name="olditemDspName_<%=rowsum%>" value="<%=Util.toScreen(fieldname,user.getLanguage())%>" >
<input type="hidden" name="labelIndexId_<%=rowsum%>" value="<%=labelindexid %>" >
<%}%>
</TD>
<TD>
<%if(ifcanedit && ifsysico != 1){ %>
<div style="display: inline-block;height: 24px;width: 24px;float: left;text-align: center;">
<span style="height: 100%;display: inline-block;vertical-align: middle;"></span><img id="navico_<%=rowsum %>" onerror="javascript:this.src='/social/images/pcmodels/htb_default_wev8.png'" src="<%=icouri %>" style="max-width: 24px; max-height: 24px;vertical-align: middle;"/>
</div>
<div class="navicobtn" style="position: relative;display: none;margin-left: 20px;">
<button type = 'button' style="background: #30b5ff;color: #fff; width: 75px;height: 24px;text-align: center;">
<%=SystemEnv.getHtmlLabelName(126779, user.getLanguage()) %>
</button>
<input id="navicobrowser_<%=rowsum %>" type="file" name="navico_<%=rowsum %>" onchange="checkFileType(this);" target="navico" class="Inputstyle" style="position: absolute;left: 0;top: 0;opacity: 0;width: 75px;heigth: 24px;cursor: pointer;" multiple="false" accept="image/gif, image/jpeg, image/png, image/gif">
<input type="hidden" name="oldnavico_<%=rowsum %>" value="<%=icouri %>">
</div>
<div style="clear:both;"></div>
<%}else{%>
<div style="display: inline-block;height: 24px;width: 24px;float: left;text-align: center;">
<span style="height: 100%;display: inline-block;vertical-align: middle;"></span><img id="navico_<%=rowsum %>" onerror="javascript:this.src='/social/images/pcmodels/htb_default_wev8.png'" src="<%=icouri %>" style="max-width: 24px; max-height: 24px;vertical-align: middle;"/>
</div>
<input type="hidden" name="oldnavico_<%=rowsum %>" value="<%=icouri %>">
<%}%>
</TD>
<TD nowrap = 'nowrap'>
<%if(ifcanedit && ifsysico != 1){ %>
<div style="display: inline-block;height: 24px;width: 24px;float: left;text-align: center;">
<span style="height: 100%;display: inline-block;vertical-align: middle;"></span><img id="navhotico_<%=rowsum %>" onerror="javascript:this.src='/social/images/pcmodels/htb_default_h_wev8.png'" src="<%=hoticouri%>" style="max-width: 24px; max-height: 24px;"/>
</div>
<div class="navhoticobtn" style="position: relative;display: none;margin-left: 20px;">
<button type = 'button' style="background: #30b5ff;color: #fff; width: 75px;height: 24px;text-align: center;">
<%=SystemEnv.getHtmlLabelName(126779, user.getLanguage()) %>
</button>
<input id="navhoticobrowser_<%=rowsum %>" type="file" name="navhotico_<%=rowsum %>" onchange="checkFileType(this);" target="navhotico" class="Inputstyle" style="position: absolute;left: 0;top: 0;opacity: 0;width: 75px;heigth: 24px;cursor: pointer;" multiple="false" accept="image/gif, image/jpeg, image/png, image/gif">
<input type="hidden" name="oldnavhotico_<%=rowsum %>" value="<%=hoticouri %>">
</div>
<div style="clear:both;"></div>
<%}else{%>
<div style="display: inline-block;height: 24px;width: 24px;float: left;text-align: center;">
<span style="height: 100%;display: inline-block;vertical-align: middle;"></span><img id="navhotico_<%=rowsum %>" onerror="javascript:this.src='/social/images/pcmodels/htb_default_h_wev8.png'" src="<%=hoticouri%>" style="max-width: 24px; max-height: 24px;"/>
</div>
<input type="hidden" name="oldnavhotico_<%=rowsum %>" value="<%=hoticouri %>">
<%}%>
</TD>
<TD NOWRAP>
<input type='checkbox' name='isopen_<%=rowsum%>' value='<%=ifshowon%>' rowindex='<%=rowsum%>' <%if(ifshowon.equals("1")){%>checked<%}%> <%if(!ifcanedit){%>disabled="disabled"<%}%> onchange="checkSelect(this,'<%=rowsum %>');setChange('<%=rowsum %>');">
<input type='hidden' name='isopen_<%=rowsum%>' value="<%=ifshowon%>">
</TD>
<TD NOWRAP>
<select name='groupid_<%=rowsum %>' <%if(!ifcanedit || ifsysico == 1){out.print("disabled='true'");}%> onchange='checkUriType(this,"<%=rowsum %>");setChange("<%=rowsum %>")' style='width:100px;'>
<option <%if(uritype == 0){%>selected<%}%> value='0'><%=SystemEnv.getHtmlLabelName(126788, user.getLanguage()) %></option>
<option <%if(uritype == 1){%>selected<%}%> value='1'><%=SystemEnv.getHtmlLabelName(126787, user.getLanguage()) %></option>
<option <%if(uritype == 2){%>selected<%}%> value='2'><%=SystemEnv.getHtmlLabelName(126789, user.getLanguage()) %></option>
</select>
</TD>
<TD NOWRAP>
<%if(ifcanedit && ifsysico != 1){ %>
<input class=Inputstyle type=<%=(!ifcandel)?"hidden":"text" %> name="itemLinkUri_<%=rowsum%>" style="width:90%"
value="<%=Util.toScreen(linkuri,user.getLanguage())%>" onfocus="checkUriTypeByRow(<%=rowsum%>);"
onchange="checkinput('itemLinkUri_<%=rowsum%>','itemLinkUri_<%=rowsum%>_span');setChange(<%=rowsum%>)">
<!-- 单点登录选择框 -->
<span class="ssoWrap_<%=rowsum%>_span" style="display:none;">
<select name="itemLinkUri_<%=rowsum%>" style="width:160px;" onchange="checkUriTypeByRow(<%=rowsum%>);setChange(<%=rowsum%>)">
<% for(Map.Entry<String, String> entry : ssoMap.entrySet()) {%>
<option value="<%=entry.getKey() %>" <%=entry.getValue().equals(linkuri)?"selected":""%>><%=entry.getValue() %></option>
<%} %>
</select>
</span>
<span id="itemLinkUri_<%=rowsum%>_span" style="overflow: hidden;display:inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 188px;"><%=(!ifcandel)?Util.toScreen(linkuri,user.getLanguage()):"" %></span>
<input type="hidden" name="olditemLinkUri_<%=rowsum%>" value="<%=Util.toScreen(linkuri,user.getLanguage())%>" >
<%}else{%>
<input type="hidden" name="itemLinkUri_<%=rowsum%>" value="<%=Util.toScreen(linkuri,user.getLanguage())%>">
<span id="itemLinkUri_<%=rowsum%>_span" style="overflow: hidden;display:inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 188px;"><%=Util.toScreen(linkuri,user.getLanguage())%></span>
<input type="hidden" name="olditemLinkUri_<%=rowsum%>" value="<%=Util.toScreen(linkuri,user.getLanguage())%>" >
<%}%>
</TD>
<TD NOWRAP>
<%if(ifcanedit && ifsysico != 1){ %>
<input class=Inputstyle type=<%=(!ifcandel)?"hidden":"text" %> name="itemNumLinkUri_<%=rowsum%>" style="width:90%"
value="<%=Util.toScreen(numberuri,user.getLanguage())%>" onfocus="checkUriTypeByRow(<%=rowsum%>);"
onchange="checkinput('itemNumLinkUri_<%=rowsum%>','itemNumLinkUri_<%=rowsum%>_span');setChange(<%=rowsum%>)">
<span id="itemNumLinkUri_<%=rowsum%>_span" class="span-ellipsis-188"><%=(!ifcandel)?Util.toScreen(numberuri,user.getLanguage()):"" %></span>
<input type="hidden" name="olditemNumLinkUri_<%=rowsum%>" value="<%=Util.toScreen(numberuri,user.getLanguage())%>" >
<%}else{%>
<input type="hidden" name="itemNumLinkUri_<%=rowsum%>" value="<%=Util.toScreen(numberuri,user.getLanguage())%>">
<span id="itemNumLinkUri_<%=rowsum%>_span" class="span-ellipsis-188"><%=Util.toScreen(numberuri,user.getLanguage())%></span>
<input type="hidden" name="olditemNumLinkUri_<%=rowsum%>" value="<%=Util.toScreen(numberuri,user.getLanguage())%>" >
<%}%>
</TD>
</TR>
<%
rowsum++;
} %>
</TBODY>
</TABLE>