mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-10-15 20:25:14 +08:00
后台添加图书、修改图书、书籍管理列表页功能完成;修正一处数据渲染错误;一些小调整
This commit is contained in:
70
bookshelfplus-frontend/views/dashboard/table.html
Normal file
70
bookshelfplus-frontend/views/dashboard/table.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<%- include("./component/header.html"); %>
|
||||
<style>
|
||||
.main {
|
||||
width: 96vw !important;
|
||||
max-width: initial !important;
|
||||
}
|
||||
|
||||
#book-table {
|
||||
width: 100%;
|
||||
margin-top: 30px;
|
||||
line-height: 2.3em;
|
||||
}
|
||||
|
||||
table, tr, th, td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
tr a {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%- include("./component/navbar.html"); %>
|
||||
<main class="main">
|
||||
<h1><%= title %></h1>
|
||||
<div id="container">
|
||||
<% if ( pageTemplate != "" ) { %>
|
||||
<!-- 引入对应页面渲染配置 -->
|
||||
<%- include(pageTemplate); %>
|
||||
<% } %>
|
||||
<input id="searchInput" type="text" />
|
||||
<input id="searchButton" type="button" value="搜索" />
|
||||
<table id="book-table"></table>
|
||||
</div>
|
||||
</main>
|
||||
<%- include("./component/footer.html"); %>
|
||||
|
||||
<!-- 获取参数 -->
|
||||
<script src="/assets/javascripts/getParams.js"></script>
|
||||
<!-- 渲染表格 -->
|
||||
<script src="/assets/javascripts/renderTable.js"></script>
|
||||
<script>
|
||||
var requestParams = getParams();
|
||||
var searchbox = document.getElementById("searchInput");
|
||||
var keyword = (requestParams["keyword"] || "").trim();
|
||||
searchbox.value = keyword;
|
||||
search({
|
||||
tableElementId: "book-table",
|
||||
searchText: null,
|
||||
categoryId: null
|
||||
});
|
||||
|
||||
$("#searchButton").click(function () {
|
||||
search({
|
||||
tableElementId: "book-table",
|
||||
searchText: $("#searchInput").val(),
|
||||
categoryId: null
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user