Commit 445fe379f5e26d46d47759963bc04bb6f003011e

Authored by liwei2917
2 parents 748fe928 aa5338a3

Merge branch 'dev'

src/main/resources/templates/page/comment.html
... ... @@ -129,7 +129,7 @@
129 129 <label for="start_date" class="control-label cb-toolbar">时间:</label>
130 130 <div class="input-group col-md-9 date">
131 131 <input class="form-control date" name="start_date" type="text"
132   - id="start_date" th:value="${param.start_date}">
  132 + id="start_date" >
133 133 <span class="input-group-addon">
134 134 <span class="glyphicon glyphicon-calendar"></span>
135 135 </span>
... ... @@ -139,7 +139,7 @@
139 139 <label for="start_date" class="control-label cb-toolbar">至</label>
140 140 <div class="input-group col-md-9 date">
141 141 <input class="form-control date" name="end_date" type="text"
142   - th:value="${param.end_date}">
  142 + id="end_date" >
143 143 <span class="input-group-addon">
144 144 <span class="glyphicon glyphicon-calendar"></span>
145 145 </span>
... ... @@ -340,7 +340,7 @@
340 340 <div class="fixed-table-pagination" style="display: block;">
341 341 <div class="pull-left pagination-detail">
342 342 <span class="pagination-info" th:text="'共 '+${commentPage.total}+' 条记录,每页显示'">总共 0 条记录</span>
343   - <select class="" id="pageSize" name="pageSize">
  343 + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
344 344 <option value="10" th:selected="${pageSize==10}">10</option>
345 345 <option value="20" th:selected="${pageSize==20}">20</option>
346 346 <option value="50" th:selected="${pageSize==50}">50</option>
... ... @@ -440,6 +440,33 @@
440 440  
441 441 })
442 442  
  443 + //选择每页数量触发函数
  444 + function selectPageSize(){
  445 + var pageSize=$("#pageSize").val();
  446 + var param = location.search;
  447 + if (param.indexOf("pageSize=") != -1) {
  448 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  449 + var split = se.split("&");
  450 + var h = "";
  451 + for (var i = 0; i < split.length; i++) {
  452 + var s = split[i];
  453 + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i];
  454 + }
  455 + h = h.substring(1, h.length);
  456 + window.location.href = "/comments/page?" + h + "&pageSize=" + pageSize;
  457 + } else {
  458 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  459 + var split = se.split("&");
  460 + var h = "";
  461 + for (var i = 0; i < split.length; i++) {
  462 + var s = split[i];
  463 + if (s.indexOf("page=") < 0) h = h + "&" + split[i];
  464 + }
  465 + h = h.substring(1, h.length);
  466 + window.location.href = "/comments/page?" + h + "&pageSize=" + pageSize;
  467 + }
  468 + }
  469 +
443 470 //翻页函数
444 471 function fanye(page) {
445 472 var param = location.search;
... ... @@ -451,6 +478,7 @@
451 478 var s = split[i];
452 479 if (s.indexOf("page=") < 0) h = h + "&" + split[i];
453 480 }
  481 + h = h.substring(1, h.length);
454 482 window.location.href = "/comments/page?" + h + "&page=" + page;
455 483 } else {
456 484 param = param.substring(1, param.length);
... ...
src/main/resources/templates/page/content.html
... ... @@ -284,7 +284,7 @@
284 284 <div class="fixed-table-pagination" style="display: block;">
285 285 <div class="pull-left pagination-detail">
286 286 <span class="pagination-info" th:text="'共 '+${contentPage.total}+' 条记录,每页显示'">共 0 条记录</span>
287   - <select class="" id="pageSize" name="pageSize">
  287 + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
288 288 <option value="10" th:selected="${pageSize==10}">10</option>
289 289 <option value="20" th:selected="${pageSize==20}">20</option>
290 290 <option value="50" th:selected="${pageSize==50}">50</option>
... ... @@ -366,12 +366,40 @@
366 366 var s = split[i];
367 367 if (s.indexOf("page=") < 0) h = h + "&" + split[i];
368 368 }
  369 + h = h.substring(1, h.length);
369 370 window.location.href = "/content/page?" + h + "&page=" + page;
370 371 } else {
371 372 param = param.substring(1, param.length);
372 373 window.location.href = "/content/page?" + param + "&page=" + page;
373 374 }
374 375 }
  376 +
  377 + //选择每页数量触发函数
  378 + function selectPageSize(){
  379 + var pageSize=$("#pageSize").val();
  380 + var param = location.search;
  381 + if (param.indexOf("pageSize=") != -1) {
  382 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  383 + var split = se.split("&");
  384 + var h = "";
  385 + for (var i = 0; i < split.length; i++) {
  386 + var s = split[i];
  387 + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i];
  388 + }
  389 + h = h.substring(1, h.length);
  390 + window.location.href = "/content/page?" + h + "&pageSize=" + pageSize;
  391 + } else {
  392 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  393 + var split = se.split("&");
  394 + var h = "";
  395 + for (var i = 0; i < split.length; i++) {
  396 + var s = split[i];
  397 + if (s.indexOf("page=") < 0) h = h + "&" + split[i];
  398 + }
  399 + h = h.substring(1, h.length);
  400 + window.location.href = "/content/page?" + h + "&pageSize=" + pageSize;
  401 + }
  402 + }
375 403  
376 404 //导出excel
377 405 function daochu() {
... ...
src/main/resources/templates/page/live.html
... ... @@ -305,7 +305,7 @@
305 305 <div class="fixed-table-pagination" style="display: block;">
306 306 <div class="pull-left pagination-detail">
307 307 <span class="pagination-info" th:text="'共 '+${livePage.total}+' 条记录,每页显示'">共 0 条记录</span>
308   - <select class="" id="pageSize" name="pageSize">
  308 + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
309 309 <option value="20" th:selected="${pageSize==20}">20</option>
310 310 <option value="40" th:selected="${pageSize==40}">40</option>
311 311 <option value="60" th:selected="${pageSize==60}">60</option>
... ... @@ -688,12 +688,40 @@
688 688 var s = split[i];
689 689 if (s.indexOf("page=") < 0) h = h + "&" + split[i];
690 690 }
  691 + h = h.substring(1, h.length);
691 692 window.location.href = "/live/page?" + h + "&page=" + page;
692 693 } else {
693 694 param = param.substring(1, param.length);
694 695 window.location.href = "/live/page?" + param + "&page=" + page;
695 696 }
696 697 }
  698 +
  699 + //选择每页数量触发函数
  700 + function selectPageSize(){
  701 + var pageSize=$("#pageSize").val();
  702 + var param = location.search;
  703 + if (param.indexOf("pageSize=") != -1) {
  704 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  705 + var split = se.split("&");
  706 + var h = "";
  707 + for (var i = 0; i < split.length; i++) {
  708 + var s = split[i];
  709 + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i];
  710 + }
  711 + h = h.substring(1, h.length);
  712 + window.location.href = "/live/page?" + h + "&pageSize=" + pageSize;
  713 + } else {
  714 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  715 + var split = se.split("&");
  716 + var h = "";
  717 + for (var i = 0; i < split.length; i++) {
  718 + var s = split[i];
  719 + if (s.indexOf("page=") < 0) h = h + "&" + split[i];
  720 + }
  721 + h = h.substring(1, h.length);
  722 + window.location.href = "/live/page?" + h + "&pageSize=" + pageSize;
  723 + }
  724 + }
697 725  
698 726  
699 727  
... ...
src/main/resources/templates/page/site.html
... ... @@ -127,7 +127,7 @@
127 127 <div class="fixed-table-pagination" style="display: block;">
128 128 <div class="pull-left pagination-detail">
129 129 <span class="pagination-info" th:text="'共 '+${sitePage.total}+' 条记录,每页显示'">共 0 条记录</span>
130   - <select class="" id="pageSize" name="pageSize">
  130 + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
131 131 <option value="10" th:selected="${pageSize==10}">10</option>
132 132 <option value="20" th:selected="${pageSize==20}">20</option>
133 133 <option value="50" th:selected="${pageSize==50}">50</option>
... ... @@ -248,6 +248,7 @@
248 248 var s = split[i];
249 249 if (s.indexOf("page=") < 0) h = h + "&" + split[i];
250 250 }
  251 + h = h.substring(1, h.length);
251 252 window.location.href = "/sites/page?" + h + "&page=" + page;
252 253 } else {
253 254 param = param.substring(1, param.length);
... ... @@ -255,6 +256,33 @@
255 256 }
256 257 }
257 258  
  259 + //选择每页数量触发函数
  260 + function selectPageSize(){
  261 + var pageSize=$("#pageSize").val();
  262 + var param = location.search;
  263 + if (param.indexOf("pageSize=") != -1) {
  264 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  265 + var split = se.split("&");
  266 + var h = "";
  267 + for (var i = 0; i < split.length; i++) {
  268 + var s = split[i];
  269 + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i];
  270 + }
  271 + h = h.substring(1, h.length);
  272 + window.location.href = "/sites/page?" + h + "&pageSize=" + pageSize;
  273 + } else {
  274 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  275 + var split = se.split("&");
  276 + var h = "";
  277 + for (var i = 0; i < split.length; i++) {
  278 + var s = split[i];
  279 + if (s.indexOf("page=") < 0) h = h + "&" + split[i];
  280 + }
  281 + h = h.substring(1, h.length);
  282 + window.location.href = "/sites/page?" + h + "&pageSize=" + pageSize;
  283 + }
  284 + }
  285 +
258 286 //搜索
259 287 $('#site_query').click(function () {
260 288 var keyword = $("#keyword").val();
... ...
src/main/resources/templates/page/video.html
... ... @@ -271,7 +271,7 @@
271 271 <div class="fixed-table-pagination" style="display: block;">
272 272 <div class="pull-left pagination-detail">
273 273 <span class="pagination-info" th:text="'共 '+${videoPage.total}+' 条记录,每页显示'">共 0 条记录</span>
274   - <select class="" id="pageSize" name="pageSize">
  274 + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
275 275 <option value="10" th:selected="${pageSize==10}">10</option>
276 276 <option value="20" th:selected="${pageSize==20}">20</option>
277 277 <option value="50" th:selected="${pageSize==50}">50</option>
... ... @@ -353,12 +353,40 @@
353 353 var s = split[i];
354 354 if (s.indexOf("page=") < 0) h = h + "&" + split[i];
355 355 }
  356 + h = h.substring(1, h.length);
356 357 window.location.href = "/videos/page?" + h + "&page=" + page;
357 358 } else {
358 359 param = param.substring(1, param.length);
359 360 window.location.href = "/videos/page?" + param + "&page=" + page;
360 361 }
361 362 }
  363 +
  364 + //选择每页数量触发函数
  365 + function selectPageSize(){
  366 + var pageSize=$("#pageSize").val();
  367 + var param = location.search;
  368 + if (param.indexOf("pageSize=") != -1) {
  369 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  370 + var split = se.split("&");
  371 + var h = "";
  372 + for (var i = 0; i < split.length; i++) {
  373 + var s = split[i];
  374 + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i];
  375 + }
  376 + h = h.substring(1, h.length);
  377 + window.location.href = "/videos/page?" + h + "&pageSize=" + pageSize;
  378 + } else {
  379 + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
  380 + var split = se.split("&");
  381 + var h = "";
  382 + for (var i = 0; i < split.length; i++) {
  383 + var s = split[i];
  384 + if (s.indexOf("page=") < 0) h = h + "&" + split[i];
  385 + }
  386 + h = h.substring(1, h.length);
  387 + window.location.href = "/videos/page?" + h + "&pageSize=" + pageSize;
  388 + }
  389 + }
362 390  
363 391 //导出excel
364 392 function daochu() {
... ...