list.jsp
11.3 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" %>
<%@ page import="weaver.general.*" %>
<%
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String userid = request.getParameter("userid");
String clienttype = Util.null2String((String)request.getParameter("clienttype"));
String opengps = Util.null2String((String)request.getParameter("opengps"));
%>
<!DOCTYPE html>
<html>
<head>
<title>Attention List</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="Weaver E-Mobile Dev Group" />
<meta name="description" content="Weaver E-mobile" />
<meta name="keywords" content="weaver,e-mobile" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="text/javascript" src="/js/jquery/jquery.js"></script>
<script type="text/javascript" src="/js/mylibs/showLoading/jquery.showLoading.js"></script>
<script type="text/javascript" src="/js/mylibs/asyncbox/AsyncBox.v1.4.js"></script>
<link rel="stylesheet" href="/js/mylibs/asyncbox/skins/ZCMS/asyncbox.css">
<link rel="stylesheet" href="/mobile/plugin/11/css/blog_wev8.css">
<script type="text/javascript" src="/js/script.js"></script>
<script type="text/javascript">
/*
function afterAndroidRedirect(id, flag) {
try {
if ((flag + "") == "1") {
$("#wfisnew_" + id).remove();
$("#wf_" + id).remove();
}
} catch(e) {
}
}
*/
function showItemDetailed(requestid,isnew) {
//var path = "/workflow/edit.do?requestid=" + requestid + "&module=" + $("input[name='module']").val() + "&scope=" + $("input[name='scope']").val() + "&unread=false&isnew=" + isnew;
//window.location.href = path;
}
$(document).ready(function () {
bindNavEvent();
//加载数据
getDataList(getUrlParam(), true);
});
/**
* 获取url参数
*/
function getUrlParam(pageindex) {
var sessionkey = $("input[name='sessionkey']").val();
var module = $("input[name='module']").val();
var scope = $("input[name='scope']").val();
var userid = $("input[name='userid']").val();
var comefrom = $("input[name='comefrom']").val();
var pagesize = config.newListPageSize;
var paras = "method=getpage&page=BlogOperation&dataType=json&userid="+userid+"&";
if (!util.isNullOrEmpty(pageindex)) {
paras=paras+"operation=getAttentionList"; //加载非第一页
}else {
paras=paras+"operation=viewAttention"; //加载第一页
}
paras =paras+"&sessionkey=" + sessionkey +
"&module=" + module +
"&scope=" + scope +
"&pagesize=" + pagesize +
"&comefrom=" + comefrom +
"&tk" + new Date().getTime() +"=1";
if (!util.isNullOrEmpty(pageindex)) {
paras += "&pageindex=" + pageindex;
}
return paras;
}
function getDataList(paras, isFirst){
util.getData({
"loadingTarget" : document.body,
"paras" : paras,//得数据的URL,
"callback" : function (data){
if(data.error){
$("#listArea").html("<div class=\"listitem listitemmore\">没有数据</div><div class=\"blankLines\"></div>");
} else {
var pageindex = data.pageindex;
var pagesize = data.pagesize;
var count = data.count;
var ishavepre = data.ishavepre;
var ishavenext = data.ishavenext
var pagecount = data.pagecount;
$("input[name='pageindex']").val(pageindex);
$("input[name='pagesize']").val(pagesize);
$("input[name='count']").val(count);
$("input[name='ishavepre']").val(ishavepre);
$("input[name='ishavenext']").val(ishavenext);
$("input[name='pagecount']").val(pagecount);
if(isFirst){
//菜单数字提醒
var unReadCount=data.menuItemCount[0];
//var attentionCount=data.menuItemCount.attentionCount;
var remindCount=data.menuItemCount[1];
$("#unReadCount").html(unReadCount>0?"("+unReadCount+")":"");
$("#remindCount").html(remindCount>0?"("+remindCount+")":"");
}
var listItemString = "<div id=\"pagecontent_" + pageindex + "\">";
var listItems="";
var currentPageDataCnt = 0;
if(data.attentionList.length==0)
listItemString=listItemString+"<div class=\"listitem listitemmore\">没有关注的人</div><div class=\"blankLines\"></div>";
$.each(data.attentionList, function (i, item){
currentPageDataCnt++;
var userid=item.userid;
var username=item.username;
var subName=item.subName;
var deptName=item.deptName;
var jobtitle=item.jobtitle;
var isnew=item.isnew;
var imageUrl=item.imageUrl;
listItemString=listItemString+"<div class='listitem' onclick='javascript:showItemDetailed();'>"
+" <table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0' style='table-layout:fixed;'>"
+" <tr onclick='openBlog("+userid+")'>"
+" <TD class='itempreview'>"
+" <img src='"+imageUrl+"'>"
+" </TD>"
+" <TD class='itemcontent'>"
+" <div class='itemcontenttitle'>"
+" <table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0' style='table-layout:fixed;'>"
+" <tr>"
+" <TD class='ictwz'>"
+" <span> "+username+" </span><span class='ictwz_gw'>"+jobtitle+"</span>"
+" </TD>"
+" <TD class='ictnew' valign='bottom'>"
+" <img src='images/blog/new_wev8.png' width='20' style='display:"+(isnew=="1"?"":"none")+"'>"
+" </TD>"
+" </TR>"
+" </TABLE>"
+" </div>"
+" <div class='itemcontentitdt'> "+subName+" "+deptName+"</div>"
+" </TD>"
+" <TD class='itemnavpoint'>"
+" <img src='images/rightArrow_wev8.png'> "
+" </TD>"
+" </TR>"
+" </TABLE>"
+" </div>"
+"<div class='blankLines'></div>";
});
//alert(listItems);
listItemString += "</div>";
if (isFirst == true && currentPageDataCnt != 0) {
$("#listArea").html("");
if (ishavenext == "1") {
listItemString += "<div class=\"listitem listitemmore\" id=\"listItemMore\">更多...</div><div class=\"blankLines\"></div>";
}
$("#listArea").append(listItemString);
$("#listItemMore").bind("click", function () {
$("#listItemMore").html("<img src=\"/images/ajax-loader_wev8.gif\" style=\"vertical-align:middle;\"> 正在加载...");
getDataList(getUrlParam(parseInt($("input[name='pageindex']").val()) + 1), false);
});
} else {
//$("#listArea").append(listItemString);
$("#listItemMore").before(listItemString);
if (ishavenext == "1") {
$("#listItemMore").html("更多...");
} else {
$("#listItemMore").hide();
}
}
}
}
});
//最后更新时间
$("#lastupdatedate").html("最后更新 今天:" + util.getCurrentDate4Format("hh:mm:ss") + " ");
}
/**
* resize
*/
window.onresize = function () {
};
function bindNavEvent() {
$(".navbtn").bind("click", function () {
var oldObj = $(".navbtnslt");
oldObj.removeClass("navbtnslt");
$(this).addClass("navbtnslt");
var url=$(this).attr("url");
jQuery(document.body).showLoading();
window.location.href=url;
});
}
function openBlog(blogid){
jQuery(document.body).showLoading();
window.location.href="viewBlog.jsp?userid=<%=request.getParameter("userid")%>&module=<%=request.getParameter("module")%>&scope=<%=request.getParameter("scope")%>&blogid="+blogid;
}
function goBack() {
location = "/home.do";
}
</script>
</head>
<body onload="setTimeout(function() { window.scrollTo(0, 1) }, 100);" />
<div id="view_page">
<div id="view_header" style="<%if ("".equals(clienttype)||clienttype.equals("Webclient")) {%>display:block;<%} else {%>display:none;<%}%>">
<table style="width: 100%; height: 40px;">
<tr>
<td width="10%" align="left" valign="middle" style="padding-left:5px;">
<a href="javascript:goBack();" style="text-decoration: none;">
<div style="width:56px;height:26px;background:url('/images/bg-top-btn_wev8.png') no-repeat;text-align:center;line-height:26px;color:#000;">
返回
</div>
</a>
</td>
<td align="center" valign="middle">
<div id="view_title">工作微博</div>
</td>
<td width="10%" align="right" valign="middle" style="padding-right:5px;">
</td>
</tr>
</table>
</div>
<div class="content">
<!-- 存放必须数据区域 START -->
<input type="hidden" name="sessionkey" value="<%=request.getParameter("mobileSession") %>">
<input type="hidden" name="module" value="<%=request.getParameter("module") %>">
<input type="hidden" name="scope" value="<%=request.getParameter("scope") %>">
<input type="hidden" name="userid" value="<%=userid%>">
<!-- 当前页索引 -->
<input type="hidden" name="pageindex" value="">
<!-- 每页记录条数 -->
<input type="hidden" name="pagesize" value="5">
<!-- 总记录条数 -->
<input type="hidden" name="count" value="">
<!-- 是否有上一页 -->
<input type="hidden" name="ishavepre" value="">
<!-- 是否有下一页 -->
<input type="hidden" name="ishavenext" value="">
<!-- 总页数 -->
<input type="hidden" name="pagecount" value="">
<!-- 客户端类型 -->
<input type="hidden" name="comefrom" value="<%=clienttype%>">
<!-- 存放必须数据区域 END -->
<!-- 微薄顶部导航区域 START -->
<div class="navblock">
<div class="navbtnblock">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;color:#395582;">
<tr>
<td width="25%" align="center">
<div class="navbtn navbtncenter navbtnleft" url="/mobile/plugin/11/mainPage.jsp?module=<%=request.getParameter("module")%>&scope=<%=request.getParameter("scope")%>&userid=<%=request.getParameter("userid")%>&clienttype=<%=clienttype%>&opengps=<%=opengps%>">
主页<span id="unReadCount"></span>
</div>
</td>
<td width="25%" align="center">
<div class="navbtn navbtnslt" url="/mobile/plugin/11/list.jsp?module=<%=request.getParameter("module")%>&scope=<%=request.getParameter("scope")%>&userid=<%=request.getParameter("userid")%>&clienttype=<%=clienttype%>&opengps=<%=opengps%>">
关注<span id="attentionCount"></span>
</div>
</td>
<td width="25%" align="center">
<div class="navbtn navbtncenter" url="/mobile/plugin/11/viewBlog.jsp?module=<%=request.getParameter("module")%>&scope=<%=request.getParameter("scope")%>&userid=<%=request.getParameter("userid")%>&clienttype=<%=clienttype%>&opengps=<%=opengps%>">
我的
</div>
</td>
<td width="*" align="center">
<div class="navbtn navbtncenter navbtnright" url="/mobile/plugin/11/comment.jsp?module=<%=request.getParameter("module")%>&scope=<%=request.getParameter("scope")%>&userid=<%=request.getParameter("userid")%>&clienttype=<%=clienttype%>&opengps=<%=opengps%>">
评论<span id="remindCount"></span>
</div>
</td>
</tr>
</table>
</div>
</div>
<!-- 微薄顶部导航区域 END -->
<!-- 列表区域 -->
<div class="listArea" id="listArea"></div>
<div class="lastupdatedate" id="lastupdatedate">
最后更新 今天:16:12:18
</div>
</div>
</div>
</body>
</html>