From 770f24d4f7da01434fb2318425e4275ec791db8f 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." Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../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 319a5aceb6..5954259186 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.39.5