mirror of
https://github.com/s427/MARL.git
synced 2025-02-07 15:48:52 +01:00
attempted fix for issue #1
This commit is contained in:
parent
20cead90ed
commit
f7a09a646d
@ -800,7 +800,7 @@
|
|||||||
|
|
||||||
<div class="toots-filters-reset">
|
<div class="toots-filters-reset">
|
||||||
<button
|
<button
|
||||||
@click="$store.files.resetFilters()"
|
@click="$store.files.resetFilters(true)"
|
||||||
:disabled="!$store.files.filtersActive"
|
:disabled="!$store.files.filtersActive"
|
||||||
>
|
>
|
||||||
<svg class="btn-icon" aria-hidden="true">
|
<svg class="btn-icon" aria-hidden="true">
|
||||||
@ -1213,7 +1213,7 @@
|
|||||||
<p>No results for the specified filters</p>
|
<p>No results for the specified filters</p>
|
||||||
<p class="action">
|
<p class="action">
|
||||||
<button
|
<button
|
||||||
@click="$store.files.resetFilters()"
|
@click="$store.files.resetFilters(true)"
|
||||||
:disabled="!$store.files.filtersActive"
|
:disabled="!$store.files.filtersActive"
|
||||||
>
|
>
|
||||||
<svg class="btn-icon" aria-hidden="true">
|
<svg class="btn-icon" aria-hidden="true">
|
||||||
@ -1493,8 +1493,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/main.js"></script>
|
|
||||||
|
|
||||||
<svg style="display: none">
|
<svg style="display: none">
|
||||||
<symbol viewBox="0 -960 960 960" id="reset-filters">
|
<symbol viewBox="0 -960 960 960" id="reset-filters">
|
||||||
<path
|
<path
|
||||||
@ -1597,5 +1595,7 @@
|
|||||||
/>
|
/>
|
||||||
</symbol>
|
</symbol>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
<script src="js/main.js?20241201"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
14
js/main.js
14
js/main.js
@ -113,12 +113,14 @@ const filesStore = {
|
|||||||
document.getElementById(id).focus();
|
document.getElementById(id).focus();
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
resetFilters() {
|
resetFilters(userAction) {
|
||||||
this.filters = JSON.parse(JSON.stringify(this.filtersDefault));
|
this.filters = JSON.parse(JSON.stringify(this.filtersDefault));
|
||||||
this.currentPage = 1;
|
if (userAction) {
|
||||||
this.filtersActive = false;
|
this.currentPage = 1;
|
||||||
scrollTootsToTop();
|
this.filtersActive = false;
|
||||||
pagingUpdated();
|
scrollTootsToTop();
|
||||||
|
pagingUpdated();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
get filteredToots() {
|
get filteredToots() {
|
||||||
@ -850,7 +852,7 @@ function loadJsonFile(name) {
|
|||||||
delete data.orderedItems;
|
delete data.orderedItems;
|
||||||
Alpine.store("files").outbox = data;
|
Alpine.store("files").outbox = data;
|
||||||
|
|
||||||
Alpine.store("files").resetFilters();
|
Alpine.store("files").resetFilters(false);
|
||||||
Alpine.store("files").loaded.outbox = true;
|
Alpine.store("files").loaded.outbox = true;
|
||||||
} // outbox.json
|
} // outbox.json
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user