This commit is contained in:
1 parent
2828ec48c8
commit
88c4beabcd
10 files changed
+234
-98
No files matched your search
@@ -1346,6 +1346,14 @@ function applyLayout(mode) {
|
||||
button.setAttribute("aria-pressed", String(mode !== "grid"));
|
||||
}
|
||||
|
||||
$("#exportLibrary").addEventListener("click", () => {
|
||||
const params = filterParams();
|
||||
params.delete("page");
|
||||
params.delete("per_page");
|
||||
params.set("format", "csv");
|
||||
window.location.href = `/api/export?${params}`;
|
||||
});
|
||||
|
||||
$("#layoutToggle").addEventListener("click", () => {
|
||||
const current = grid.dataset.layout || "grid";
|
||||
const mode = current === "grid" ? "list" : current === "list" ? "table" : "grid";
|
||||
|
||||
@@ -217,6 +217,8 @@ try {
|
||||
</select>
|
||||
<button id="layoutToggle" class="ghost toolbar-select" type="button"
|
||||
aria-pressed="false" title="Компактный список" aria-keyshortcuts="g">список</button>
|
||||
<button id="exportLibrary" class="ghost toolbar-select" type="button"
|
||||
title="Экспорт текущего фильтра в CSV">экспорт</button>
|
||||
<button id="selectMode" class="ghost toolbar-select" type="button">выбрать</button>
|
||||
<span class="count" id="count" aria-live="polite"></span>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user