Bugzilla – Attachment 45587 Details for
Bug 15320
Use Bootstrap modal for MARC preview when ordering from an existing record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15320 - Use Bootstrap modal for MARC preview when ordering from an existing record
Bug-15320---Use-Bootstrap-modal-for-MARC-preview-w.patch (text/plain), 3.83 KB, created by
Jonathan Druart
on 2015-12-11 09:45:49 UTC
(
hide
)
Description:
Bug 15320 - Use Bootstrap modal for MARC preview when ordering from an existing record
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-11 09:45:49 UTC
Size:
3.83 KB
patch
obsolete
>From 86bb7713afe3b5c648fc3991c080b9d96cab2723 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Sat, 5 Dec 2015 08:53:26 -0500 >Subject: [PATCH] Bug 15320 - Use Bootstrap modal for MARC preview when > ordering from an existing record >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In order to reduce the number of dependencies for common interactions we >should attempt to use Bootstrap modals in place of Greybox ones. > >This patch modifies the page in Acquisitions for ordering from an >existing record so that the "View MARC" preview is displayed in >Bootstrap modals. > >To test: > >1. Apply the patch and navigate to Acquisitions. >2. Locate an exsiting basket or create a new one. >3. Add to the basket using the option to search for an existing > record. >4. Perform any search which will return results. >5. Test the "View MARC" link for multiple results and confirm > that the correct data is shown each time. > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/acqui/neworderbiblio.tt | 27 ++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt >index 4911b62..037dc10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt >@@ -1,7 +1,6 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Search existing records</title> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >-[% INCLUDE 'greybox.inc' %] > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> >@@ -14,6 +13,18 @@ > 'bInfo': false, > 'bSort': false, > } ) ); >+ $(".previewMARC").on("click", function(e){ >+ e.preventDefault(); >+ var ltitle = $(this).text(); >+ var page = $(this).attr("href"); >+ $("#marcPreviewLabel").text(ltitle); >+ $("#marcPreview .modal-body").load(page + " table"); >+ $('#marcPreview').modal({show:true}); >+ }); >+ $("#marcPreview").on("hidden", function(){ >+ $("#marcPreviewLabel").html(""); >+ $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); >+ }); > }); > //]]> > </script> >@@ -79,7 +90,7 @@ > [% biblio.copyrightdate %] > </td> > <td> >- <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">View MARC</a> >+ <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber %]&viewas=html" class="previewMARC">View MARC</a> > </td> > <td> > <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&biblionumber=[% biblio.biblionumber %]" title="Order this one"> >@@ -90,6 +101,18 @@ > [% END %] > </tbody> > </table> >+ <div id="marcPreview" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="marcPreviewLabel">MARC preview</h3> >+ </div> >+ <div class="modal-body"> >+ <div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div> >+ </div> >+ <div class="modal-footer"> >+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> >+ </div> >+ </div> > </div> > [% END %] > >-- >2.1.0
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 15320
:
45446
|
45453
| 45587