diff --git a/Changes b/Changes index 9fdc46b9..1a9588de 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +0.53 2024-02-19 + - Solve a potential timing issue in VC rendering. (diewald) + 0.52 2023-11-29 - Update Piwik dependency to point to matomo.js. (diewald) - Add addon to title and description. (diewald) diff --git a/README.md b/README.md index 768a951d..ab32a007 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ to allow specific scripts to run. ### Original Software -Copyright (C) 2015-2023, [IDS Mannheim](https://www.ids-mannheim.de/)
+Copyright (C) 2015-2024, [IDS Mannheim](https://www.ids-mannheim.de/)
Author: [Nils Diewald](https://www.nils-diewald.de/), Helge Stallkamp
Contributor: Eliza Margaretha (Documentation), Susanne Feix (Translation), Leo Repp diff --git a/dev/js/src/init.js b/dev/js/src/init.js index 1e9a805e..6243bc7d 100644 --- a/dev/js/src/init.js +++ b/dev/js/src/init.js @@ -54,22 +54,6 @@ define([ pluginClass, pipeClass) { - const d = document; - - // Set base URL - KorAP.URL = d.body.getAttribute('data-korap-url') || ""; - - // Get koralQuery response - const kqe = d.getElementById('koralQuery'); - if (kqe !== null) { - KorAP.koralQuery = JSON.parse(kqe.getAttribute('data-koralquery') || ""); - }; - - // Create suffix if KorAP is run in a subfolder - KorAP.session = sessionClass.create( - KorAP.URL.length > 0 ? 'kalamarJS-' + KorAP.URL.slugify() : 'kalamarJS' - ); - // Override KorAP.log window.alertify = alertifyClass; KorAP.log = function (code, msg, src) { @@ -89,20 +73,36 @@ define([ KorAP.vc = vcClass.create(vcArray); - let gt; - if (gt = document.getElementById('link-guided-tour')) { - gt.setAttribute('href', '#'); - gt.addEventListener('click', function(){ - tourClass.gTstartSearch().start(); - }); + domReady(function (event) { + + const d = document; - KorAP.tourshowR = function(){ - tourClass.gTshowResults().start(); + // Set base URL + KorAP.URL = d.body.getAttribute('data-korap-url') || ""; + + // Create suffix if KorAP is run in a subfolder + KorAP.session = sessionClass.create( + KorAP.URL.length > 0 ? 'kalamarJS-' + KorAP.URL.slugify() : 'kalamarJS' + ); + + // Get koralQuery response + const kqe = d.getElementById('koralQuery'); + if (kqe !== null) { + KorAP.koralQuery = JSON.parse(kqe.getAttribute('data-koralquery') || ""); }; - }; - domReady(function (event) { - + let gt; + if (gt = document.getElementById('link-guided-tour')) { + gt.setAttribute('href', '#'); + gt.addEventListener('click', function(){ + tourClass.gTstartSearch().start(); + }); + + KorAP.tourshowR = function(){ + tourClass.gTshowResults().start(); + }; + }; + var obj = {}; // What should be visible in the beginning? diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm index f79c77cc..0e924a35 100644 --- a/lib/Kalamar.pm +++ b/lib/Kalamar.pm @@ -8,7 +8,7 @@ use Mojo::Util qw/url_escape deprecated slugify/; use List::Util qw!none uniq!; # Minor version - may be patched from package.json -our $VERSION = '0.52'; +our $VERSION = '0.53'; # Supported version of Backend API our $API_VERSION = '1.0'; @@ -416,7 +416,7 @@ B =head2 COPYRIGHT AND LICENSE -Copyright (C) 2015-2023, L +Copyright (C) 2015-2024, L Author: L Kalamar is developed as part of the L diff --git a/package.json b/package.json index 9abf64dd..dbea5646 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "Kalamar", "description": "Mojolicious-based Frontend for KorAP", "license": "BSD-2-Clause", - "version": "0.52.0", + "version": "0.53.0", "pluginVersion": "0.2.2", "engines": { "node": ">=6.0.0"