Bugzilla – Attachment 45419 Details for
Bug 15309
Use Bootstrap modal for cataloging search MARC and Card preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15309 - Use Bootstrap modal for cataloging search MARC and Card preview
Bug-15309---Use-Bootstrap-modal-for-cataloging-sea.patch (text/plain), 5.21 KB, created by
Owen Leonard
on 2015-12-04 19:07:25 UTC
(
hide
)
Description:
Bug 15309 - Use Bootstrap modal for cataloging search MARC and Card preview
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2015-12-04 19:07:25 UTC
Size:
5.21 KB
patch
obsolete
>From 28a77abfc42e2097c3fa402d920e52af133b5549 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 4 Dec 2015 11:27:20 -0500 >Subject: [PATCH] Bug 15309 - Use Bootstrap modal for cataloging search MARC > and Card preview >Content-Type: text/plain; charset="utf-8" > >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 cataloging search results page so that "MARC" and >"Card" previews are displayed in Bootstrap modals. > >To test: > >1. Apply the patch and navigate to Cataloging. >2. Perform a search which will return results from the catalog. >3. Test the "MARC" and "Card" links for multiple results and confirm > that the correct data is shown each time. >4. Perform a search which will return results from the reservoir. >5. Test the corresonding "MARC" and "Card" links for those results. >--- > .../prog/en/modules/cataloguing/addbooks.tt | 33 ++++++++++++++++++++-- > 1 file changed, 30 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 9ef3543..0f58a97 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -1,7 +1,6 @@ > [% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cataloging</title> >-[% INCLUDE 'greybox.inc' %] > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ >@@ -28,6 +27,20 @@ > $.cookie( 'catalogue_editor_[% USER_INFO.0.borrowernumber %]', 'advanced', { expires: 365, path: '/' } ); > return true; > }); >+ >+ $(".previewData").on("click", function(e){ >+ e.preventDefault(); >+ var ltitle = $(this).text(); >+ var page = $(this).attr("href"); >+ $("#dataPreviewLabel").text(ltitle); >+ $("#dataPreview .modal-body").load(page + " div"); >+ $('#dataPreview').modal({show:true}); >+ }); >+ $("#dataPreview").on("hidden", function(){ >+ $("#dataPreviewLabel").html(""); >+ $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); >+ }); >+ > }); > > /* this function open a popup to search on z3950 server. */ >@@ -186,7 +199,7 @@ > [% IF ( resultsloo.notforloancount ) %] Not for loan ([% resultsloo.notforloancount %])[% END %] > </span> > </td> >- <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a> >+ <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber %]" class="previewData">Card</a> > </td> > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% resultsloo.biblionumber %]">Edit biblio</a></td>[% END %] > [% IF ( CAN_user_editcatalogue_edit_items ) %]<td><a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% resultsloo.biblionumber %]">Add/Edit items</a></td>[% END %] >@@ -229,7 +242,7 @@ > <td>[% breeding_loo.copyrightdate %]</td> > <td>[% breeding_loo.edition %]</td> > <td>[% breeding_loo.file %]</td> >- <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.id %]" title="MARC" rel="gb_page_center[600,500]">Card</a> >+ <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.id %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.id %]" class="previewData">Card</a> > </td> > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<td> > <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=[% breeding_loo.id %]">Add biblio</a> >@@ -242,6 +255,20 @@ > [% END %] > </div> > [% END %] >+ >+<div id="dataPreview" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="dataPreviewLabel">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> > </div> > [% INCLUDE 'intranet-bottom.inc' %] >-- >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 15309
:
45419
|
45430
|
45440