diff --git a/src/js/components/AdvancedSearchForm/index.svelte b/src/js/components/AdvancedSearchForm/index.svelte index a82e0ea..21c1706 100644 --- a/src/js/components/AdvancedSearchForm/index.svelte +++ b/src/js/components/AdvancedSearchForm/index.svelte @@ -10,6 +10,7 @@ // { + if (value.includes('htsource')) { + originalLocation = value.replace('htsource:', ''); + } + }); + originalLocation = originalLocation; + } if (!params.get('ft') && window.location.href.includes('?')) { isFullView = false; @@ -343,6 +360,14 @@ }); format = format; } + if (params.get('facet')?.includes('htsource')) { + params.getAll('facet').forEach((value) => { + if (value.includes('htsource')) { + originalLocation = value.replace('htsource:', '').replaceAll('"', ''); + } + }); + originalLocation = originalLocation; + } yop = params.get('yop') || 'after'; switch (yop) { @@ -686,6 +711,25 @@ /> + +
+ Original Location + +
+ ({ + option: item, + key: item, + value: item, + }))} + label="Original location" + placeholder="Filter by original location" + multiple={false} + bind:value={originalLocation} + /> +
+
diff --git a/src/js/components/FilterableSelection.svelte b/src/js/components/FilterableSelection.svelte index 2c6a626..a491972 100644 --- a/src/js/components/FilterableSelection.svelte +++ b/src/js/components/FilterableSelection.svelte @@ -123,7 +123,7 @@ on:focus={(event) => updateValue(event, true)} /> {/if} - + {/each}