Commit c35ba20b374be16b48d6440903381b4250db6f87

Authored by 王言钊
1 parent a0269079

修复日志模块搜索框回车错误

src/main/resources/templates/page/log.html
... ... @@ -36,7 +36,7 @@
36 36 </div>
37 37 </div>
38 38 <div class="columns columns-right btn-group pull-right">
39   - <button class="btn btn-default" type="button" name="refresh" title="搜索" id="site_query">刷新</button>
  39 + <button class="btn btn-default" type="button" name="refresh" title="搜索" id="log_query">刷新</button>
40 40 <ul class="dropdown-menu" role="menu">
41 41 <li><label><input type="checkbox" data-field="sp_id" value="0"
42 42 checked="checked"> 视频ID</label></li>
... ... @@ -54,9 +54,9 @@
54 54 </div>
55 55 </div>
56 56 <div class="pull-right search">
57   - <form id="searchForm">
  57 +<!-- <form id="searchForm">-->
58 58 <input class="form-control" type="text" placeholder="刷新" id="keyword" name="keyword" th:value="${param.keyword}">
59   - </form>
  59 +<!-- </form>-->
60 60 </div>
61 61 </div>
62 62 <div class="fixed-table-container" style="padding-bottom: 0px;">
... ... @@ -225,12 +225,19 @@
225 225 }
226 226  
227 227 //搜索
228   - $('#site_query').click(function () {
  228 + $('#log_query').click(function () {
229 229 var keyword = $("#keyword").val();
230 230 var pageSize = $("#pageSize").val();
231 231 window.location.href = "/log/page?keyword=" + keyword + "&pageNum=" + 1 + "&pageSize=" + pageSize;
232 232 });
233 233  
  234 + //鼠标回车事件
  235 + $(document).keyup(function (event) {
  236 + if (event.keyCode == 13) {
  237 + $("#log_query").trigger("click");
  238 + }
  239 + });
  240 +
234 241 </script>
235 242  
236 243 <footer th:replace="../templates/common/foot::foot" ></footer>
... ...