bootstrap菜单树

master
10295 7 years ago
parent d0b62adc54
commit ac9972184c
  1. 4
      web/src/main/webapp/WEB-INF/jsp/index.jsp
  2. 11
      web/src/main/webapp/WEB-INF/jsp/table.jsp

@ -7,7 +7,7 @@
<script>
$(function () {
$("#navSpan").click(function () {
$("#menuButton").click(function () {
prefix = 'fas fa-angle-double-';
if ($("#navbarNavDropdown").is(":hidden")) {
$(this).find('i').attr('class', prefix + 'up');
@ -61,7 +61,7 @@
<div class="container-fluid">
<nav class="navbar navbar-dark bg-info">
<button class="btn btn-primary col-1" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
<button class="btn btn-primary col-1" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" id="menuButton"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span id="navSpan"><b>Close</b>&nbsp;<i class="fas fa-angle-double-up"></i></span>
</button>

@ -9,7 +9,7 @@
$(function () {
$("#pageButton button").click(function () {
$("[name=firstResult]").val($(this).val());
$('#command').submit();
$('#pageForm').submit();
});
});
</script>
@ -17,6 +17,9 @@
<body>
<c:choose>
<c:when test="${datas.type=='success'}">
<table class="table">
<thead>
<tr>
@ -43,7 +46,7 @@
</tbody>
</table>
<form:form action="/data/table">
<form:form id="pageForm" action="/data/table">
<input type="hidden" name="firstResult" value="0"/>
<input type="hidden" name="maxResults" value="${datas.pageSize}"/>
<div class="row">
@ -54,7 +57,7 @@
</p>
</div>
<div class="col-sm-6">
<div id="pageButton" class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div id="pageButton" class="btn-toolbar justify-content-end" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-2" role="group">
<button value="0" type="button" class="btn btn-secondary">首页</button>
<button value="${datas.currentPage-2}" type="button" class="btn btn-secondary"
@ -79,7 +82,7 @@
</c:when>
<c:otherwise>
<div class="alert alert-danger text-center" role="alert">
请求数据失败
${datas.errorMsg}
</div>
</c:otherwise>
</c:choose>

Loading…
Cancel
Save