Make the page reset when changing filters (closes #32)
This commit is contained in:
parent
92a5282e36
commit
b1995a1dce
5 changed files with 12 additions and 4 deletions
|
|
@ -12,15 +12,15 @@
|
|||
"tags": "Tags",
|
||||
"select": "Select",
|
||||
"links": "Links",
|
||||
"sort-by": "Sort By"
|
||||
"sort-by": "Sort By",
|
||||
"page-reset-warning":"Changing any of these will reset your page to 1."
|
||||
},
|
||||
"apps": {
|
||||
"ArtBrowser": {
|
||||
"selected": "{current}/{required} Selected",
|
||||
"upload-image": "Upload Image",
|
||||
"no-results": "No results were found for that search",
|
||||
"select-image": "Select image",
|
||||
"page-reset-warning": "Changing any of these will reset your page to 1."
|
||||
"select-image": "Select image"
|
||||
},
|
||||
"ArtistBrowser": {
|
||||
"sort-options": {
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ export class ArtBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
event.stopPropagation();
|
||||
const data = (new FormDataExtended(event.currentTarget)).object;
|
||||
this.filters = data;
|
||||
this.#page = 1;
|
||||
this.render({ parts: [`images`] });
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ export class ArtistBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const data = (new FormDataExtended(event.currentTarget)).object;
|
||||
this.#page = 1;
|
||||
this.filters = data;
|
||||
this.render({ parts: [`list`] });
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<form autocomplete="off" class="filters">
|
||||
<p>
|
||||
{{localize "IT.apps.ArtBrowser.page-reset-warning"}}
|
||||
{{localize "IT.common.page-reset-warning"}}
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
<form autocomplete="off" class="filters">
|
||||
<p>
|
||||
{{localize "IT.common.page-reset-warning"}}
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<label for="{{meta.idp}}-name">
|
||||
{{localize "IT.common.name"}}
|
||||
</label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue