Summary: | Use a global tab select function for activating Bootstrap tabs based on location hash | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | RESOLVED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04,22.11.10
|
|
Circulation function: | |||
Attachments: |
Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash
Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash |
Description
Katrin Fischer
2023-06-23 15:16:15 UTC
Created attachment 152651 [details] [review] Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash This patch fixes automatic tab selection by location.hash in the MARC subfield editor. This allows links which target a specific subfield to open the page with the subfield tab selected. I've put this into a global function since it can be reused in multiple places: The about page and the checkout page have variations of this functionality which can be replaced with this function. The patch also corrects two links in Koha pointing to the About page which included the wrong location hash (changed in the switch to Bootstrap tab wrappers). To test, apply the patch and go to Adminstration -> Bibliographic frameworks. - View the MARC structure for any framework. - In the "Search for tag" input field, submit a tag and subfield which will be found in that framework, e.g. "245$a" - When you submit the form you should be sent to the MARC subfield structure page for that tag with the subfield tab automatically selected. - View the MARC subfield structure for any framework. - In the table of subfields, click the subfield link in the first column. You should be taken to the edit form with the corresponding tab selected. - Go to Circulation and check out to a patron. Append a tab anchor to the URL, e.g. "#holds_panel" and submit. You may have to shift-reload the page to see the change. (As far as I know no links in Koha take advantage of this) - Perform the same test on the patron detail page - Go to the About page and perform the same test with a tab anchor like "#team_panel" or "#sysinfo_panel" Created attachment 153058 [details] [review] Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash This patch fixes automatic tab selection by location.hash in the MARC subfield editor. This allows links which target a specific subfield to open the page with the subfield tab selected. I've put this into a global function since it can be reused in multiple places: The about page and the checkout page have variations of this functionality which can be replaced with this function. The patch also corrects two links in Koha pointing to the About page which included the wrong location hash (changed in the switch to Bootstrap tab wrappers). To test, apply the patch and go to Adminstration -> Bibliographic frameworks. - View the MARC structure for any framework. - In the "Search for tag" input field, submit a tag and subfield which will be found in that framework, e.g. "245$a" - When you submit the form you should be sent to the MARC subfield structure page for that tag with the subfield tab automatically selected. - View the MARC subfield structure for any framework. - In the table of subfields, click the subfield link in the first column. You should be taken to the edit form with the corresponding tab selected. - Go to Circulation and check out to a patron. Append a tab anchor to the URL, e.g. "#holds_panel" and submit. You may have to shift-reload the page to see the change. (As far as I know no links in Koha take advantage of this) - Perform the same test on the patron detail page - Go to the About page and perform the same test with a tab anchor like "#team_panel" or "#sysinfo_panel" Created attachment 153070 [details] [review] Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash This patch fixes automatic tab selection by location.hash in the MARC subfield editor. This allows links which target a specific subfield to open the page with the subfield tab selected. I've put this into a global function since it can be reused in multiple places: The about page and the checkout page have variations of this functionality which can be replaced with this function. The patch also corrects two links in Koha pointing to the About page which included the wrong location hash (changed in the switch to Bootstrap tab wrappers). To test, apply the patch and go to Adminstration -> Bibliographic frameworks. - View the MARC structure for any framework. - In the "Search for tag" input field, submit a tag and subfield which will be found in that framework, e.g. "245$a" - When you submit the form you should be sent to the MARC subfield structure page for that tag with the subfield tab automatically selected. - View the MARC subfield structure for any framework. - In the table of subfields, click the subfield link in the first column. You should be taken to the edit form with the corresponding tab selected. - Go to Circulation and check out to a patron. Append a tab anchor to the URL, e.g. "#holds_panel" and submit. You may have to shift-reload the page to see the change. (As far as I know no links in Koha take advantage of this) - Perform the same test on the patron detail page - Go to the About page and perform the same test with a tab anchor like "#team_panel" or "#sysinfo_panel" Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 153213 [details] [review] Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash This patch fixes automatic tab selection by location.hash in the MARC subfield editor. This allows links which target a specific subfield to open the page with the subfield tab selected. I've put this into a global function since it can be reused in multiple places: The about page and the checkout page have variations of this functionality which can be replaced with this function. The patch also corrects two links in Koha pointing to the About page which included the wrong location hash (changed in the switch to Bootstrap tab wrappers). To test, apply the patch and go to Adminstration -> Bibliographic frameworks. - View the MARC structure for any framework. - In the "Search for tag" input field, submit a tag and subfield which will be found in that framework, e.g. "245$a" - When you submit the form you should be sent to the MARC subfield structure page for that tag with the subfield tab automatically selected. - View the MARC subfield structure for any framework. - In the table of subfields, click the subfield link in the first column. You should be taken to the edit form with the corresponding tab selected. - Go to Circulation and check out to a patron. Append a tab anchor to the URL, e.g. "#holds_panel" and submit. You may have to shift-reload the page to see the change. (As far as I know no links in Koha take advantage of this) - Perform the same test on the patron detail page - Go to the About page and perform the same test with a tab anchor like "#team_panel" or "#sysinfo_panel" Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> This is a bug fix - please consider for backporting! Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.04 Nice work everyone! Pushed to oldstable for 22.11.x |