Bugzilla – Attachment 132800 Details for
Bug 30422
Authorities editor update broke the feature added by Bug 20154
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30422: Authorities editor update broke the feature added by Bug 20154
Bug-30422-Authorities-editor-update-broke-the-feat.patch (text/plain), 3.19 KB, created by
Owen Leonard
on 2022-03-31 15:59:22 UTC
(
hide
)
Description:
Bug 30422: Authorities editor update broke the feature added by Bug 20154
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-03-31 15:59:22 UTC
Size:
3.19 KB
patch
obsolete
>From 696e8893e0a673e0d0ee2b122abe96718ab78b00 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 31 Mar 2022 15:51:14 +0000 >Subject: [PATCH] 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. >--- > .../en/modules/authorities/authorities.tt | 19 ++++++++++--------- > .../prog/en/modules/authorities/detail.tt | 8 ++++++++ > 2 files changed, 18 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index b40b8fb358..002cdafbae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -21,17 +21,18 @@ > }); > var Sticky; > $(document).ready(function() { >- var tabs = $('#authoritytabs').tabs().bind('show.ui-tabs', function(e, ui) { >- $("#"+ui.panel.id+" input:eq(0)").focus(); >- }); >+ var tabs = $('#authoritytabs').tabs({ >+ activate: function(e, ui) { >+ $("#"+ $(ui.newPanel).attr("id") + " input:eq(0)").focus(); >+ } >+ }); > >- $( "ul.sortable_field", tabs ).sortable(); >- $( "ul.sortable_subfield", tabs ).sortable(); >+ /* On page load, check for location.hash in the page URL */ >+ var hash = location.hash; >+ var hashPieces = hash.split('?'); >+ var activeTab = $("[href='" + hashPieces[0] + "']"); >+ selectTab(activeTab); > >- [% IF tab %] >- link = $("a[href='#[% tab | html %]']"); >- selectTab( link ); >- [% END %] > $( "ul.sortable_field", tabs ).sortable(); > $( "ul.sortable_subfield", tabs ).sortable(); > Sticky = $("#toolbar"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >index c2ed977238..ee79f077f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >@@ -133,6 +133,14 @@ > $("#authoritiestabs a:first").tab("show"); > } > >+ var editAuth = $("#editAuth"); >+ var editAuthLink = editAuth.attr("href"); >+ >+ $("a[data-toggle='tab']").on("shown.bs.tab", function (e) { >+ var newTabId = $(this).attr("href"); >+ editAuth.attr("href", editAuthLink + newTabId ); >+ }); >+ > [% IF ( displayhierarchy ) %] > $('#hierarchies').jstree({ > "types" : { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30422
:
132800
|
134822
|
134835
|
134956