Bug 41496: Update current URL for item search
The "Copy shareable link" button on the item search table creates a link based on the current URL, but an item search does not update the current URL with the search parameters. This patch copies the code to generate the URL with search parameters and uses it to update the current URL. Test plan: 1. Click "Item search". 2. Perform an item search (e.g. Home library is Centerville). 3. Click the "Copy shareable link" button on the right side of the screen above the table. 4. Paste and visit the link. 5. Observe that you only see the search page without any results. 6. Apply patch. 7. Repeat steps 1-4. 8. Observe that you see the results with the table settings. 9. Sign off. Sponsored-by: Lund University Library Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
fccbf3099d
commit
d96183d41b
|
|
@ -726,6 +726,15 @@
|
|||
prepSelections();
|
||||
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
|
||||
let shareable_params = params.map(p => {
|
||||
if(p.name === 'format') {
|
||||
return { ...p, value: 'shareable' };
|
||||
}
|
||||
return p;
|
||||
});
|
||||
let shareable_url = window.location.origin + window.location.pathname + '?' + $.param(shareable_params);
|
||||
history.replaceState(null, "", shareable_url);
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue