content view
This commit is contained in:
parent
8133b2c665
commit
019d6be9f5
@ -4,6 +4,7 @@ $(document).ready(async function() {
|
||||
// await initContentTable();
|
||||
|
||||
initSubscriptionsModule();
|
||||
initContentModule();
|
||||
initMessageStylesModule();
|
||||
|
||||
await loadServers();
|
||||
|
@ -0,0 +1,56 @@
|
||||
const contentTableId = "#contentTable";
|
||||
|
||||
|
||||
// region Init Module
|
||||
|
||||
function initContentModule() {
|
||||
initializeDataTable(
|
||||
contentTableId,
|
||||
[
|
||||
{
|
||||
title: "Subscription",
|
||||
data: "subscription"
|
||||
},
|
||||
{
|
||||
title: "Item ID",
|
||||
data: "item_id"
|
||||
},
|
||||
{
|
||||
title: "Item GUID",
|
||||
data: "item_guid"
|
||||
},
|
||||
{
|
||||
title: "Title",
|
||||
data: "item_title"
|
||||
},
|
||||
{
|
||||
title: "URL",
|
||||
data: "item_url"
|
||||
},
|
||||
{
|
||||
title: "Content Hash",
|
||||
data: "item_content_hash"
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// region Load Data
|
||||
|
||||
$(document).on("selectedServerChange", async function() {
|
||||
await loadContentData();
|
||||
});
|
||||
|
||||
$(contentTableId).on("doDataLoad", async function() {
|
||||
await loadContentData();
|
||||
})
|
||||
|
||||
async function loadContentData() {
|
||||
if (!selectedServer){
|
||||
return;
|
||||
}
|
||||
|
||||
setTableFilter(contentTableId, "subscription__server", selectedServer.id);
|
||||
await loadTableData(contentTableId, "/api/content/", "GET");
|
||||
}
|
@ -1 +1,80 @@
|
||||
content
|
||||
<div class="js-tableFilters row my-3 px-sm-3">
|
||||
<div class="col-md-6 col-lg-5 col-xl-4 col-xxl-3">
|
||||
<div class="table-search-group mb-lg-0 mb-3">
|
||||
<label for="searchForContent" class="table-search-label">
|
||||
<i class="bi bi-search"></i>
|
||||
</label>
|
||||
<input type="search" id="searchForContent" class="table-search-input disable-while-loading" placeholder="search">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-7 col-xl-8 col-xxl-9 text-md-end table-search-buttons">
|
||||
<div class="d-inline-block">
|
||||
<button type="button" class="table-new-btn btn btn-primary rounded-1">
|
||||
<i class="bi bi-plus-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="d-inline-block">
|
||||
<div class="dropdown table-sort-dropdown">
|
||||
<button type="button" class="btn btn-secondary rounded-1" data-bs-toggle="dropdown" data-bs-auto-close="outside">
|
||||
<i class="bi bi-sort-alpha-up"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><h6 class="dropdown-header">Sort By</h6></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-inline-block">
|
||||
<div class="dropdown table-filter-dropdown">
|
||||
<button type="button" class="btn btn-secondary rounded-1" data-bs-toggle="dropdown" data-bs-auto-close="outside">
|
||||
<i class="bi bi-funnel"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><h6 class="dropdown-header">Filter By</h6></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-inline-block">
|
||||
<button type="button" class="table-refresh-btn btn btn-outline-secondary rounded-1 disable-while-loading">
|
||||
<i class="bi bi-arrow-clockwise"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="d-inline-block">
|
||||
<button type="button" class="table-del-btn btn btn-danger rounded-1" disabled>
|
||||
<i class="bi bi-trash3"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-tableBody table-responsive my-3 px-sm-3">
|
||||
<table id="contentTable" class="table table-hover align-middle"></table>
|
||||
</div>
|
||||
<div class="js-tableControls row px-sm-3 mb-4">
|
||||
<div class="col-lg-6">
|
||||
<nav class="table-pagination mb-4 mb-lg-0 table-pagination-group"> <!-- TODO: continue here -->
|
||||
<ul class="pagination mb-0">
|
||||
<li class="page-item">
|
||||
<button type="button" class="page-link page-prev rounded-start-1">
|
||||
<i class="bi bi-chevron-left"></i>
|
||||
</button>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<button type="button" class="page-link page-next rounded-end-1">
|
||||
<i class="bi bi-chevron-right"></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-lg-6 d-flex align-items-center justify-content-lg-end">
|
||||
<label for="contentTablePageSizer" class="form-label align-self-center mb-0 me-2">Show</label>
|
||||
<select name="contentTablePageSizer" id="contentTablePageSizer" class="select-2 table-page-sizer disable-while-loading">
|
||||
<option value="1">1 </option>
|
||||
<option value="10" selected>10 </option>
|
||||
<option value="15">15 </option>
|
||||
<option value="20">20 </option>
|
||||
<option value="25">25 </option>
|
||||
</select>
|
||||
<span class="ms-2">of </span>
|
||||
<span class="pageinfo-total text-nowrap">10</span>
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user