Bugzilla – Attachment 45642 Details for
Bug 15317
Use Bootstrap modal for MARC and Card preview when ordering from staged files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15317 - Use Bootstrap modal for MARC and Card preview when ordering from staged files
Bug-15317---Use-Bootstrap-modal-for-MARC-and-Card-.patch (text/plain), 5.41 KB, created by
Jonathan Druart
on 2015-12-14 12:33:04 UTC
(
hide
)
Description:
Bug 15317 - Use Bootstrap modal for MARC and Card preview when ordering from staged files
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-14 12:33:04 UTC
Size:
5.41 KB
patch
obsolete
>From a2f78a12123aed528ebce91103b7e404a16ec457 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Sat, 5 Dec 2015 12:38:52 -0500 >Subject: [PATCH] Bug 15317 - Use Bootstrap modal for MARC and Card preview > when ordering from staged files >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 a staged >file so that the "MARC" and "Card" previews display 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 order from a staged file. >4. Click "Add orders" from any staged file. >5. Test the "MARC" and "Card" links for multiple results and confirm > that the correct data is shown each time. > >Followed test plan, works as expected >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 28 ++++++++++++++++++++-- > 1 file changed, 26 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index bf6c0b6..31822d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -7,8 +7,8 @@ > › Batch list > [% END %] > </title> >-[% INCLUDE 'greybox.inc' %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+<style type="text/css">#dataPreview { width : 80%; margin-left : -40%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> >@@ -139,6 +139,18 @@ > return disableUnchecked($(this)); > }); > $('#tabs').tabs(); >+ $(".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>"); >+ }); > }); > > function disableUnchecked(form){ >@@ -199,7 +211,7 @@ > <span class="citation">[% biblio.citation %]</span> > </label> > <span class="links" style="font-weight: normal;"> >- ( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id %]" title="Card" rel="gb_page_center[600,500]">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&breedingid=[% biblio.import_record_id %]&import_batch_id=[% biblio.import_batch_id %]&biblionumber=[% biblio.match_biblionumber %]">Add order</a> ) >+ ( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id %]" class="previewData">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&breedingid=[% biblio.import_record_id %]&import_batch_id=[% biblio.import_batch_id %]&biblionumber=[% biblio.match_biblionumber %]">Add order</a> ) > </span> > </legend> > <ol> >@@ -265,6 +277,18 @@ > </li> > </ol> > </fieldset> >+ <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">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> > [% END %] > </div> > <div id="items_info"> >-- >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 15317
:
45447
|
45455
| 45642