Bugzilla – Attachment 130881 Details for
Bug 29965
MARC preview for authority search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29965: (follow-up) Move repeated JS to its own file
Bug-29965-follow-up-Move-repeated-JS-to-its-own-fi.patch (text/plain), 5.15 KB, created by
Nick Clemens (kidclamp)
on 2022-02-18 17:35:44 UTC
(
hide
)
Description:
Bug 29965: (follow-up) Move repeated JS to its own file
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-02-18 17:35:44 UTC
Size:
5.15 KB
patch
obsolete
>From 3725330e48dcebe8991c0447c40abe372045844b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 18 Feb 2022 17:15:07 +0000 >Subject: [PATCH] Bug 29965: (follow-up) Move repeated JS to its own file > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../authorities/searchresultlist-auth.tt | 20 +---------------- > .../modules/authorities/searchresultlist.tt | 22 +------------------ > .../prog/js/authorities-detail-modal.js | 19 ++++++++++++++++ > 3 files changed, 21 insertions(+), 40 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >index 2fa5990fc7..f50e578a84 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >@@ -97,26 +97,8 @@ > var authtypecode = "[% authtypecode | html %]"; > </script> > [% Asset.js("js/auth-finder-search.js") | $raw %] >+ [% Asset.js("js/authorities-detail-modal.js") | $raw %] > <script> >- $(document).ready(function(){ >- $(".authorizedheading a").on("click", function(e){ >- e.preventDefault(); >- var authid = $(this).data("authid"); >- >- $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){ >- var auth_detail = $(data).find("#authoritiestabs"); >- auth_detail.find("ul").remove(); >- $("#authorityDetail .modal-title").html(_("Authority") + " " + authid ); >- $("#authorityDetail .modal-body").html( auth_detail ); >- }); >- >- $("#authorityDetail").modal("show"); >- }); >- $("#authorityDetail").on("hidden.bs.modal", function(){ >- $("#authorityDetail .modal-body, #authorityDetail .modal-title").html(""); >- $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>"); >- }); >- }); > function jumpfull(page){ > window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top'); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index 0c5f33ec8b..3d36ed3b28 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -103,27 +103,7 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'authorities_js.inc' %] >- <script> >- $(document).ready(function(){ >- $(".authorizedheading a").on("click", function(e){ >- e.preventDefault(); >- var authid = $(this).data("authid"); >- >- $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){ >- var auth_detail = $(data).find("#authoritiestabs"); >- auth_detail.find("ul").remove(); >- $("#authorityDetail .modal-title").html(_("Authority") + " " + authid ); >- $("#authorityDetail .modal-body").html( auth_detail ); >- }); >- >- $("#authorityDetail").modal("show"); >- }); >- $("#authorityDetail").on("hidden.bs.modal", function(){ >- $("#authorityDetail .modal-body, #authorityDetail .modal-title").html(""); >- $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>"); >- }); >- }); >- </script> >+ [% Asset.js("js/authorities-detail-modal.js") | $raw %] > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js b/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js >new file mode 100644 >index 0000000000..26a314d00d >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js >@@ -0,0 +1,19 @@ >+$(document).ready(function(){ >+ $(".authorizedheading a").on("click", function(e){ >+ e.preventDefault(); >+ var authid = $(this).data("authid"); >+ >+ $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){ >+ var auth_detail = $(data).find("#authoritiestabs"); >+ auth_detail.find("ul").remove(); >+ $("#authorityDetail .modal-title").html(_("Authority") + " " + authid ); >+ $("#authorityDetail .modal-body").html( auth_detail ); >+ }); >+ >+ $("#authorityDetail").modal("show"); >+ }); >+ $("#authorityDetail").on("hidden.bs.modal", function(){ >+ $("#authorityDetail .modal-body, #authorityDetail .modal-title").html(""); >+ $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>"); >+ }); >+}); >-- >2.30.2
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 29965
:
129918
|
129983
|
130635
|
130880
|
130881
|
130882
|
130907
|
130908
|
130909
|
130910