Bugzilla – Attachment 75255 Details for
Bug 20731
Move template JavaScript to the footer: Call number browser MARC plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20731: Move template JavaScript to the footer: Call number browser MARC plugin
Bug-20731-Move-template-JavaScript-to-the-footer-C.patch (text/plain), 3.10 KB, created by
Claire Gravely
on 2018-05-11 07:16:45 UTC
(
hide
)
Description:
Bug 20731: Move template JavaScript to the footer: Call number browser MARC plugin
Filename:
MIME Type:
Creator:
Claire Gravely
Created:
2018-05-11 07:16:45 UTC
Size:
3.10 KB
patch
obsolete
>From 82ab139547f86eb78f088755532d452ffc39a7cf Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 3 Jan 2018 17:41:09 +0000 >Subject: [PATCH] Bug 20731: Move template JavaScript to the footer: Call > number browser MARC plugin > >This patch modifies the call number browser plugin so that JavaScript is >in the footer instead of the header. > >This patch also makes some unrelated changes: The page title has been >corrected; DataTables code has been removed as it was unused. > >To test, apply the patch and configure a MARC framework to use >cn_browser.pl as the plugin for tag 952 subfield o. > >Open an item for editing. The "Full call number" field should have an >active "..." link next to it. Clicking this should trigger a popup >window with the Call number browser. Confirm that submitting a new >search from this window works correctly. > >Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> >--- > .../cataloguing/value_builder/cn_browser.tt | 37 +++++++++++----------- > 1 file changed, 18 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt >index 122da19..0f242ec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt >@@ -1,32 +1,20 @@ > [% USE Asset %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Tools</title> >-[% Asset.css("css/datatables.css") %] >+<title>Koha › Cataloging › Call number browser</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'datatables.inc' %] > </head> >+ > <body id="cat_cn_browser" class="cat"> >+ <div class="main container-fluid"> > [% UNLESS ( popup ) %] > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > [% END %] > >-<script language="JavaScript"> >-$(document).ready(function() >-{ >- $("#cn_browser_table").DataTable({"paging": false, "bFilter": false, "info": false, "bSort": false}); >- $("#cn_browser_submit").click(function(){ >- window.location.href='/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q='+$("#cn_browser_input").val(); >- return false; >- }); >-} >- >-); >-</script> >- >-<h1 style="text-align:center">Call numbers browser</h1> >+<h1>Call number browser</h1> > >-<div style="margin:auto;text-align:center;"> >+<div> > <form method="get" action="cn_browser.pl"> > <label for="searchcn">Search call number:</label> > <input type="text" id="cn_browser_input" name="q" value="[% q %]" /> >@@ -59,4 +47,15 @@ $(document).ready(function() > </tbody> > </table> > >-<br /> >+[% MACRO jsinclude BLOCK %] >+ <script> >+ $(document).ready(function(){ >+ $("#cn_browser_submit").click(function(){ >+ window.location.href='/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q='+$("#cn_browser_input").val(); >+ return false; >+ }); >+ }); >+ </script> >+[% END %] >+ >+[% INCLUDE 'intranet-bottom.inc' popup_window=1 %] >-- >2.1.4
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 20731
:
75183
|
75255
|
75718