article.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  4. <%
  5. String path = request.getContextPath();
  6. String basePath = path + "/common/";
  7. %>
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. <head>
  11. <meta charset="utf-8">
  12. <title>素材列表</title>
  13. <link rel="shortcut icon" href="images/wx/wally.jpg"/>
  14. <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <meta name="description" content="">
  17. <meta name="author" content="">
  18. <link rel="stylesheet" type="text/css" href="<%=basePath %>/css/admin/css/keyset/bootstrap.min.css">
  19. <link rel="stylesheet" type="text/css" href="<%=basePath %>/css/admin/css/keyset/appmsg.css">
  20. <link rel="stylesheet" type="text/css" href="<%=basePath %>/css/admin/css/keyset/theme.css">
  21. <link rel="stylesheet" href="<%=basePath %>/css/admin/css/keyset/font-awesome.css">
  22. <script type="text/javascript" src="<%=basePath %>/js/admin/public/jquery-1.7.2.min.js" ></script>
  23. <script type="text/javascript" src="<%=basePath %>/js/admin/public/bootstrap.js" ></script>
  24. <!-- Demo page code -->
  25. <style type="text/css">
  26. .pagination {
  27. margin: 0 70px;
  28. float: right;
  29. }
  30. #first_col {
  31. display: inline-block;
  32. zoom: 1;
  33. *display: inline;
  34. }
  35. #second_col {
  36. margin-left: 15px;
  37. display: inline-block;
  38. zoom: 1;
  39. *display: inline;
  40. }
  41. .add-btn {
  42. height: 90px;
  43. margin: 0 18px;
  44. color: #b5b5b5;
  45. background: transparent
  46. url('/image/admin/body/appmsg-icon.png')
  47. no-repeat 50% -242px;
  48. }
  49. .multi-access {
  50. background-position: 50% -342px;
  51. }
  52. ul {
  53. padding: 0;
  54. margin: 0;
  55. }
  56. li {
  57. list-style-type: none;
  58. }
  59. .sub-msg-item {
  60. padding: 12px 14px;
  61. overflow: hidden;
  62. zoom: 1;
  63. border-top: 1px solid #c6c6c6;
  64. }
  65. .thumb {
  66. float: right;
  67. font-size: 0;
  68. }
  69. .thumb .default-tip {
  70. font-size: 16px;
  71. color: #c0c0c0;
  72. width: 70px;
  73. line-height: 70px;
  74. border: 1px solid #b2b8bd;
  75. }
  76. .thumb img {
  77. width: 70px;
  78. height: 70px;
  79. border: 1px solid #b2b8bd;
  80. }
  81. .sub-msg-item .msg-t {
  82. margin-left: 0;
  83. margin-right: 85px;
  84. margin-top: 0;
  85. padding-left: 4px;
  86. padding-top: 12px;
  87. line-height: 24px;
  88. max-height: 48px;
  89. font-size: 14px;
  90. overflow: hidden;
  91. }
  92. .sltpic {
  93. background-color: #82FF8C;
  94. }
  95. </style>
  96. <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
  97. <!--[if lt IE 9]>
  98. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  99. <![endif]-->
  100. <script type="text/javascript">
  101. //点击选中图文
  102. function showImg(idx,rid,f){
  103. var id = f + rid, html = $('#'+id).html(), picid = $("#picid").val();
  104. $("#picid").val(id);
  105. if(picid != id){
  106. $('#_'+picid).removeClass("sltpic");
  107. }
  108. $('#_'+id).addClass("sltpic");
  109. $("#html").val(html);
  110. $("#rid").val(rid);
  111. //alert('请点击图文后再点击【确定】按钮!');
  112. //alert('id = '+id+'<br> html = '+html);
  113. }
  114. //确定选中图文
  115. function slt(){
  116. //弹窗改为window.open()解决谷歌浏览器不支持弹窗的特性(原做法是windin.showModalDialog())
  117. /*var array = new Array();
  118. array[0] = $("#html").val();
  119. array[1] = $("#rid").val();
  120. window.returnValue = array;*/
  121. //把当前页面中选择的图文在父页面中显示
  122. this.opener.document.getElementById("preViewDiv").innerHTML = $("#html").val();
  123. this.opener.document.getElementById("picandtext").value = $("#rid").val();
  124. window.close();
  125. }
  126. </script>
  127. </head>
  128. <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  129. <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  130. <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  131. <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  132. <!--[if (gt IE 9)|!(IE)]><!-->
  133. <body class="">
  134. <input type="hidden" id="picid">
  135. <input type="hidden" id="html"/>
  136. <input type="hidden" id="rid"/>
  137. <div class="content">
  138. <div class="container-fluid">
  139. <div class="container">
  140. <div class="containerBox">
  141. <div class="boxHeader">
  142. <h4>图文素材</h4>
  143. </div>
  144. <div class="content">
  145. <h3 class="page-sub-hd">
  146. 图文列表(共<span id="total_count">${totalCount}</span>条)
  147. </h3>
  148. <div class="group page-nav">
  149. <div class="pagination">
  150. <ul>
  151. <%
  152. String start = (String) request.getAttribute("start");
  153. Integer totalCount = (Integer) request.getAttribute("totalCount");
  154. //System.out.println("start: " + start + " == total: " + totalCount);
  155. Integer currPage = Integer.parseInt(start) / 10;
  156. Integer totalPage = totalCount / 10;
  157. if(currPage == 0) {
  158. %>
  159. <li class="disabled"><span>上一页</span></li>
  160. <%
  161. } else {
  162. %>
  163. <li><a
  164. href="<%=basePath %>admin/material/list?start=<%=Integer.parseInt(start) - 10 %>&limit=10">上一页</a></li>
  165. <%
  166. }
  167. for (int i = 0; i < totalPage + 1; i++) {
  168. if (i == currPage) {
  169. %>
  170. <li class="active"><span><%=i + 1 %></span></li>
  171. <%
  172. } else {
  173. %>
  174. <li><a
  175. href="<%=basePath %>admin/material/list?start=<%=i * 10 %>&limit=10"><%=i + 1 %></a></li>
  176. <%
  177. }
  178. }
  179. if( currPage < totalPage) {
  180. %>
  181. <li><a
  182. href="<%=basePath %>admin/material/list?start=<%=(currPage + 1) * 10 %>&limit=10">下一页</a></li>
  183. <%
  184. }
  185. %>
  186. </ul>
  187. </div>
  188. <div class="clr"></div>
  189. </div>
  190. <div class="page-bd">
  191. <div class="tj msg-list">
  192. <!-- 偶数内容 -->
  193. <div id="first_col" class="b-dib vt msg-col">
  194. <c:forEach items="${resultList }" var="entry" varStatus="st">
  195. <c:choose>
  196. <c:when test="${st.index%2==0}">
  197. <c:choose>
  198. <c:when test="${entry.imagetexttype==2}">
  199. <div class="msg-item-wrapper" id="evmore${entry.imagetextno}" onclick="showImg('${st.index}','${entry.imagetextno}','evmore')">
  200. <div class="msg-item multi-msg" id="_evmore${entry.imagetextno}">
  201. <div class="appmsgItem">
  202. <h4 class="msg-t">
  203. <a href="javascript:void();" class="i-title" target="_blank">${entry.title}</a>
  204. <%-- <a href="<%=basePath %>admin/material/detail?type=1&id=${entry.imagetextno}" class="i-title" target="_blank">${entry.title}</a> --%>
  205. </h4>
  206. <p class="msg-meta">
  207. <span class="msg-date"><fmt:formatDate value="${entry.createtime}"/></span>
  208. </p>
  209. <div class="cover">
  210. <p class="default-tip" style="display: none">封面图片</p>
  211. <img src="${entry.imageurl}" class="i-img" style="">
  212. </div>
  213. <p class="msg-text"></p>
  214. </div>
  215. <c:forEach items="${entry.subVoList }" varStatus="s" var="sub">
  216. <!-- 子图文:封面url,id -->
  217. <div class="rel sub-msg-item appmsgItem">
  218. <span class="thumb"> <img src="${sub.imageUrl}" class="i-img" style="">
  219. </span>
  220. <h4 class="msg-t">
  221. <a href="javascript:void();" target="_blank" class="i-title">${sub.title}</a>
  222. </h4>
  223. </div>
  224. </c:forEach>
  225. </div>
  226. </div>
  227. </c:when>
  228. <c:otherwise>
  229. <div class="msg-item-wrapper" id="evone${entry.imagetextno}" onclick="showImg('${st.index}','${entry.imagetextno}','evone')">
  230. <div class="msg-item" id="_evone${entry.imagetextno}">
  231. <!-- 详细地址id,创建时间,封面url,删除编辑的data-rid -->
  232. <h4 class="msg-t">
  233. <a href="javascript:void();" class="i-title" target="_blank">${entry.title}</a>
  234. <%-- <a href="<%=basePath %>admin/material/detail?type=1&id=${entry.imagetextno}" class="i-title" target="_blank">${entry.title}</a> --%>
  235. </h4>
  236. <p class="msg-meta">
  237. <span class="msg-date"><fmt:formatDate value="${entry.createtime}"/></span>
  238. </p>
  239. <div class="cover">
  240. <p class="default-tip" style="display: none">封面图片</p>
  241. <img src="${entry.imageurl}" class="i-img" style="">
  242. </div>
  243. <%-- <p class="msg-text">${entry.digest}</p> --%>
  244. </div>
  245. </div>
  246. </c:otherwise>
  247. </c:choose>
  248. </c:when>
  249. </c:choose>
  250. </c:forEach>
  251. </div>
  252. <!-- 奇数内容 -->
  253. <div id="second_col" class="b-dib vt msg-col">
  254. <c:forEach items="${resultList}" var="entry" varStatus="st">
  255. <c:choose>
  256. <c:when test="${st.index%2!=0}">
  257. <c:choose>
  258. <c:when test="${entry.imagetexttype==2}">
  259. <div class="msg-item-wrapper" id="odmore${entry.imagetextno}" onclick="showImg('${st.index}','${entry.imagetextno}','odmore')">
  260. <div class="msg-item multi-msg" id="_odmore${entry.imagetextno}">
  261. <div class="appmsgItem">
  262. <h4 class="msg-t">
  263. <a href="javascript:void();" class="i-title" target="_blank">${entry.title}</a>
  264. <%-- <a href="<%=basePath %>admin/material/detail?type=1&id=${entry.imagetextno}" class="i-title" target="_blank">${entry.title}</a> --%>
  265. </h4>
  266. <p class="msg-meta">
  267. <span class="msg-date"><fmt:formatDate value="${entry.createtime}"/></span>
  268. </p>
  269. <div class="cover">
  270. <p class="default-tip" style="display: none">封面图片</p>
  271. <img src="${entry.imageurl}" class="i-img" style="">
  272. </div>
  273. <p class="msg-text"></p>
  274. </div>
  275. <c:forEach items="${entry.subVoList}" varStatus="s" var="sub">
  276. <!-- 子图文:封面url,id -->
  277. <div class="rel sub-msg-item appmsgItem">
  278. <span class="thumb"> <img src="${sub.imageUrl}" class="i-img" style="">
  279. </span>
  280. <h4 class="msg-t">
  281. <a href="javascript:void();" target="_blank" class="i-title">${sub.title}</a>
  282. <%-- <a href="<%=basePath %>admin/material/detail?type=2&id=${sub.moreImageTextNo}" target="_blank" class="i-title">${sub.title}</a> --%>
  283. </h4>
  284. </div>
  285. </c:forEach>
  286. </div>
  287. </div>
  288. </c:when>
  289. <c:otherwise>
  290. <div class="msg-item-wrapper" id="odone${entry.imagetextno}" onclick="showImg('${st.index}','${entry.imagetextno}','odone')">
  291. <div class="msg-item" id="_odone${entry.imagetextno}">
  292. <!-- 详细地址id,创建时间,封面url,删除编辑的data-rid -->
  293. <h4 class="msg-t">
  294. <a href="javascript:void();" class="i-title" target="_blank">${entry.title}</a>
  295. <%-- <a href="<%=basePath %>admin/material/detail?type=1&id=${entry.imagetextno}" class="i-title" target="_blank">${entry.title}</a> --%>
  296. </h4>
  297. <p class="msg-meta">
  298. <span class="msg-date"><fmt:formatDate value="${entry.createtime}"/></span>
  299. </p>
  300. <div class="cover">
  301. <p class="default-tip" style="display: none">封面图片</p>
  302. <img src="${entry.imageurl}" class="i-img" style="">
  303. </div>
  304. <p class="msg-text">${entry.digest}</p>
  305. </div>
  306. </div>
  307. </c:otherwise>
  308. </c:choose>
  309. </c:when>
  310. </c:choose>
  311. </c:forEach>
  312. </div>
  313. <!-- 奇数内容结束 -->
  314. </div>
  315. </div>
  316. <!-- page_bg 结束 -->
  317. </div>
  318. <!-- content 结束 -->
  319. <!--
  320. <div class="sideBar">
  321. <div class="menu">
  322. <ul class="nav nav-list">
  323. <li class="active"><a href="/admin/content/article?action=list" target="main">图文消息(8)</a></li>
  324. <li><a href="/admin/content/voice?action=list" target="main">语音(120)</a></li>
  325. <li><a href="account/pay.jsp" target="main">视频(0)</a></li>
  326. </ul>
  327. </div>
  328. </div>
  329. -->
  330. <div class="clr"></div>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. <div style="position: fixed; top: 90%; left: 80%;">
  336. <input type="button" class="btn btn-primary" value="确定" onclick="slt();" />
  337. <input type="button" class="btn" value="取消" onclick="javascript:window.close();" />
  338. </div>
  339. </body>
  340. </html>