shareObj.jsp
7.22 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
<%@ page import="weaver.general.Util" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.rdeploy.doc.PrivateSeccategoryManager" %>
<%
int folderid = Util.getIntValue(request.getParameter("folderid"),-1);
int fileid = Util.getIntValue(request.getParameter("fileid"),-1);
String sharername = Util.null2String(request.getParameter("sharername"));
sharername = sharername.replaceAll("'","''");
PrivateSeccategoryManager seccategoryManager = new PrivateSeccategoryManager();
List<Map<String,String>> shareObjs = seccategoryManager.getShareObjects(user,fileid,folderid,sharername);
%>
<HTML><HEAD>
<LINK REL=stylesheet type=text/css HREF=/css/Browser_wev8.css>
<LINK REL=stylesheet type=text/css HREF=/css/Weaver_wev8.css>
<script type="text/javascript">
var parentWin = null;
var dialog = null;
try{
var topWi = window;
var curWi = window;
while(topWi != topWi.parent){
curWi = topWi;
topWi = topWi.parent;
}
parentWin = topWi.getParentWindow(curWi);
dialog = topWi.getDialog(curWi);
}catch(e){}
</script>
<script>
function onClose(){
if(dialog){
dialog.close();
}else{
window.parent.close();
}
}
function dataBack(data){
if(dialog){
try{
dialog.callback(data);
}catch(e){}
try{
dialog.close(data);
}catch(e){}
}else{
window.parent.returnValue = data;
window.parent.close();
}
}
function onSearch(){
document.SearchForm.submit();
}
function checkAll(thi){
var $obj;
if(thi.checked){
$obj = jQuery("#userList .jNiceCheckbox").not(jQuery("#userList .jNiceCheckbox.jNiceChecked"));
}else{
$obj = jQuery("#userList .jNiceCheckbox.jNiceChecked");
}
$obj.each(function(){
jQuery(this).toggleClass("jNiceChecked");
});
}
window.ajaxSend = false;
function cancelShare(){
if(window.ajaxSend){
return;
}
if(jQuery("#userList .jNiceCheckbox.jNiceChecked").length == 0){
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83066,user.getLanguage())%>");// 请选择要删除的对象!
return;
}
window.top.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(129242,user.getLanguage())%>",function(){
var ids = "";
jQuery("#userList .jNiceCheckbox.jNiceChecked").each(function(){
ids += "," + jQuery(this).siblings(".jNiceHidden").val();
});
window.ajaxSend = true;
ids = ids.substring(1);
jQuery.ajax({
url : "/rdeploy/chatproject/doc/eventForAjax.jsp",
data : {
type : "cancelShareObj",
shareids : ids
},
type : "post",
dataType : "json",
success : function(data){
if(data && data.flag == 1){
jQuery("#userList .jNiceCheckbox.jNiceChecked").closest("li").remove();
try{
dialog.sendCancel2Msg(data.mesList);
}catch(e){}
hasObj();
}else{
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83473,user.getLanguage())%>");// 删除失败!
}
},
complete : function(){
window.ajaxSend = false;
}
})
});
}
function hasObj(){
if(jQuery("#userList li").length == 0){
parent.removeChildView({
folderid : "<%=folderid%>",
fileid : "<%=fileid%>"
});
onClose();
}
}
jQuery(function(){
jQuery("#userList li .jNiceCheckbox").unbind("click");
jQuery("#userList li").click(function(e){
jQuery(this).find(".jNiceCheckbox").toggleClass("jNiceChecked");
});
});
</script>
<style>
#sharername{
background:url(/rdeploy/assets/img/cproj/searchbtn.png) right center no-repeat;
padding-right:22px;
}
li{
list-style:none;
}
</style>
</HEAD>
<BODY style="overflow:hidden;">
<div class="zDialog_div_content">
<table cellpadding="0" cellspacing="0" style="width:100%;border-bottom:1px solid #CCCCCC">
<tr>
<td style="padding:8px">
<img src="/rdeploy/assets/img/cproj/doc/icon.png" width="40px"
height="40px" style="float:left;"/>
<%--500883分享对象--%>
<span style="float:left;font-size:14px;margin-left:8px"><%=SystemEnv.getHtmlLabelName(500883,user.getLanguage())%><span>
<div style="clear:both"></div>
</td>
<td class="rightSearchSpan" style="text-align:right;vertical-align:bottom;padding:8px">
<div style="float:right">
<input style="float:left;margin-top:3px" type="button" onClick="cancelShare()" class="e8_btn_top_first" value="<%=SystemEnv.getHtmlLabelName(32136,user.getLanguage()) %>"/>
<form name="SearchForm" id="SearchForm" method="post" action="shareObj.jsp" style="float:left">
<input type="hidden" name="fileid" value="<%=fileid %>"/>
<input type="hidden" name="folderid" value="<%=folderid %>"/>
<input style="float:left;margin-top:3px;margin-left:8px" type="text" class="InputStyle" name="sharername" id="sharername" value='<%=sharername %>'/>
</form>
<span style="float:left" title="<%=SystemEnv.getHtmlLabelName(81804,user.getLanguage()) %>" class="cornerMenu"></span>
</div>
</td>
</tr>
</table>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<DIV align=right style="display:none">
<%
systemAdminMenu = "";
RCMenu += "{"+SystemEnv.getHtmlLabelName(197,user.getLanguage())+",javascript:onSearch(),_top} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(309,user.getLanguage())+",javascript:onClose(),_top} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<BUTTON type="button" class=btn accessKey=2 onclick="clearCategory()" id=btnclear><U></U><%=SystemEnv.getHtmlLabelName(311,user.getLanguage())%></BUTTON>
</DIV>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<div>
<div style="background-color:#f8f8f8;height:40px;line-height:40px;border-bottom:2px solid #B7E0FE;padding-left:10px">
<input style="width:74px" type="checkbox" class="checkAll" onClick="checkAll(this)"/><%=SystemEnv.getHtmlLabelName(500883,user.getLanguage())%>
</div>
<div style="height:370px;overflow:auto">
<ul id="userList" >
<%for(Map<String,String> shareObj : shareObjs){ %>
<li style="padding-left:10px;border-bottom:1px solid #F2F2F2">
<div style="float:left;padding:5px 0;margin-top:15px"><input type="checkbox" value="<%=shareObj.get("id")%>"/></div>
<div style="float:left;;padding:5px">
<img src="<%=shareObj.get("icon")%>" style="float:left;width:35px;height:35px;border-radius:50%;margin-top:10px"/>
<div style="float:left;margin-left:10px">
<p><%=shareObj.get("sharername") %></p>
<p style="color:#B3BED8"><%="user".equals(shareObj.get("type")) ? (shareObj.get("department") + "/" + shareObj.get("company")) : (shareObj.get("number") + "人") %></p>
<%--391245 分享时间 --%>
<p style="color:#B3BED8"><%=SystemEnv.getHtmlLabelName(391245,user.getLanguage())%>:<%=shareObj.get("sharetime") %></p>
</div>
</div>
<div style="clear:both"></div>
</li>
<%} %>
</ul>
</div>
</div>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="" attributes="{'groupDisplay':'none'}">
<wea:item type="toolbar">
<input type="button" accessKey="T" id="btncancel" value="<%="T-"+SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" id="zd_btn_cancle" class="zd_btn_cancle" onclick="onClose();">
</wea:item>
</wea:group>
</wea:layout>
</div>
</BODY></HTML>