From c56c91506d3d79527313fc28c9236aa10be73ef6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Nov 2019 18:08:48 +0000 Subject: [PATCH] Bug 24084: PlainMARC view broken on OPAC if other $.ajax calls produce errors This patch removes the use of jQuery's ajaxSetup() and load() to get the "plain" MARC view and replaces it with $.get(). This allows for error-handling on this specific AJAX request rather than all on the page. To test, apply the patch and view a bibliographic record in the OPAC. - Click the "MARC view" tab. - Click the "view plain" link. - The plain-text MARC view should load. - Clicking "view labeled" should return you to the original view. To test error handling, edit opac-MARCdetail.tt line 185 and add a typo to the URL, e.g. "opac-showmark.pl." Repeat the above steps. Clicking the "view plain" link should trigger an error message: "Sorry, plain view is temporarily unavailable." --- .../bootstrap/en/modules/opac-MARCdetail.tt | 62 ++++++++++------------ 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt index 319a5aceb6c..5954259186f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt @@ -172,42 +172,38 @@ [% BLOCK jsinclude %] [% END %] -- 2.11.0