From 60960b85fdd07878e760435e1832726985851955 Mon Sep 17 00:00:00 2001 From: Owen Leonard 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=utf8 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 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../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 bf6c0b648b..31822d98a3 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 %] -[% INCLUDE 'greybox.inc' %] + [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'datatables.inc' %] @@ -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("
\"\" "+_("Loading")+"
"); + }); }); function disableUnchecked(form){ @@ -199,7 +211,7 @@ [% biblio.citation %] - ( MARC | Card | Add order ) + ( MARC | Card | Add order )
    @@ -265,6 +277,18 @@
+ [% END %]
-- 2.39.5