Bug 30422 - Authorities editor update broke the feature added by Bug 20154
Summary: Authorities editor update broke the feature added by Bug 20154
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 24415 30419
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-31 14:58 UTC by Owen Leonard
Modified: 2022-05-14 01:42 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30422: Authorities editor update broke the feature added by Bug 20154 (3.19 KB, patch)
2022-03-31 15:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30422: Authorities editor update broke the feature added by Bug 20154 (4.45 KB, patch)
2022-05-10 15:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30422: Authorities editor update broke the feature added by Bug 20154 (4.50 KB, patch)
2022-05-10 21:08 UTC, David Nind
Details | Diff | Splinter Review
Bug 30422: Authorities editor update broke the feature added by Bug 20154 (4.55 KB, patch)
2022-05-13 09:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-03-31 14:58:18 UTC
Bug 20154, "Stay in the open tab when editing authority record" made it so that if you are viewing, for example, tab 4 on the authority detail page and click "Edit," you are taken to tab 4 in the authorities editor.

Bug 24415, "Authority enhancement - Improve access to tabs" broke this feature.
Comment 1 Owen Leonard 2022-03-31 15:59:22 UTC
Created attachment 132800 [details] [review]
Bug 30422: Authorities editor update broke the feature added by Bug 20154

This patch corrects JavaScript in authorities templates so that
clicking "Edit" on the authority detail page will take you to the
authority edit page while keeping the same tab open.

This patch also corrects the JavaScript which should have been
automatically moving the cursor focus to the first form field when
switching tabs in the editor.

To test, apply the patch and locate an authority record in your catalog.

- Click any of the numbered tabs besides tab 0.
- Choose "Edit record" from the "Edit" dropdown menu.
- When the authorities edit page loads the same tab should be
  preselected.
Comment 2 David Nind 2022-05-05 22:09:21 UTC
A couple of things noted when testing:

- If you are on tab 0 and go to edit, it opens in tab 8 (without the tab 8 highlighted)

- It jumps to the first field used in the tab for the record (for example: tab 6 for authority record #98 - it jumps down to field 667, but it is not focused on that field)

- There is a noticeable delay for me when you click edit: it jumps to the first field with a value for the tab, then hides the fields not in that tab (not sure that is the best way to describe this)

- When switching tabs and if the first fields are collapsed, then it looks slightly odd having the focus on the indicator field. But I guess there is no better way to do this.
Comment 3 Owen Leonard 2022-05-10 15:46:43 UTC
Created attachment 134822 [details] [review]
Bug 30422: Authorities editor update broke the feature added by Bug 20154

This patch corrects JavaScript in authorities templates so that
clicking "Edit" on the authority detail page will take you to the
authority edit page while keeping the same tab open.

This patch also corrects the JavaScript which should have been
automatically moving the cursor focus to the first form field when
switching tabs in the editor.

This patch also adds the "Section" headings which are present in the
basic cataloging editor but were not added here at the time of the
page's tabs revision.

To test, apply the patch and locate an authority record in your catalog.

- Without changing tabs, choose "Edit record" from the "Edit" dropdown
  menu."
- The authorities editor should load and display the "Section 0" tab.
- Return to the authority detail page and select a tab besides tab 0.
- Click back to tab 0. Editing the record at this point should open the
  editor to Section 0.
- Return to the authority detail page.
- Click any of the numbered tabs besides tab 0.
- Choose "Edit record" from the "Edit" dropdown menu.
- When the authorities edit page loads the same tab should be
  preselected.
- Test that when you switch tabs in the authority editor the cursor
  focus is automatically moved to the first visible input.
Comment 4 David Nind 2022-05-10 21:08:09 UTC
Created attachment 134835 [details] [review]
Bug 30422: Authorities editor update broke the feature added by Bug 20154

This patch corrects JavaScript in authorities templates so that
clicking "Edit" on the authority detail page will take you to the
authority edit page while keeping the same tab open.

This patch also corrects the JavaScript which should have been
automatically moving the cursor focus to the first form field when
switching tabs in the editor.

This patch also adds the "Section" headings which are present in the
basic cataloging editor but were not added here at the time of the
page's tabs revision.

To test, apply the patch and locate an authority record in your catalog.

- Without changing tabs, choose "Edit record" from the "Edit" dropdown
  menu."
- The authorities editor should load and display the "Section 0" tab.
- Return to the authority detail page and select a tab besides tab 0.
- Click back to tab 0. Editing the record at this point should open the
  editor to Section 0.
- Return to the authority detail page.
- Click any of the numbered tabs besides tab 0.
- Choose "Edit record" from the "Edit" dropdown menu.
- When the authorities edit page loads the same tab should be
  preselected.
- Test that when you switch tabs in the authority editor the cursor
  focus is automatically moved to the first visible input.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2022-05-13 09:26:34 UTC
Created attachment 134956 [details] [review]
Bug 30422: Authorities editor update broke the feature added by Bug 20154

This patch corrects JavaScript in authorities templates so that
clicking "Edit" on the authority detail page will take you to the
authority edit page while keeping the same tab open.

This patch also corrects the JavaScript which should have been
automatically moving the cursor focus to the first form field when
switching tabs in the editor.

This patch also adds the "Section" headings which are present in the
basic cataloging editor but were not added here at the time of the
page's tabs revision.

To test, apply the patch and locate an authority record in your catalog.

- Without changing tabs, choose "Edit record" from the "Edit" dropdown
  menu."
- The authorities editor should load and display the "Section 0" tab.
- Return to the authority detail page and select a tab besides tab 0.
- Click back to tab 0. Editing the record at this point should open the
  editor to Section 0.
- Return to the authority detail page.
- Click any of the numbered tabs besides tab 0.
- Choose "Edit record" from the "Edit" dropdown menu.
- When the authorities edit page loads the same tab should be
  preselected.
- Test that when you switch tabs in the authority editor the cursor
  focus is automatically moved to the first visible input.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 6 Fridolin Somers 2022-05-14 01:42:51 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄