Skip to content

Commit

Permalink
Solve potential timing issue
Browse files Browse the repository at this point in the history
Change-Id: I7edb7f58e7d03eb5f98b8bc9cf1e9c4776b816f6
  • Loading branch information
Akron committed Feb 19, 2024
1 parent 9362e01 commit 006ddc6
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ to allow specific scripts to run.

### Original Software

Copyright (C) 2015-2023, [IDS Mannheim](https://www.ids-mannheim.de/)<br>
Copyright (C) 2015-2024, [IDS Mannheim](https://www.ids-mannheim.de/)<br>
Author: [Nils Diewald](https://www.nils-diewald.de/), Helge Stallkamp<br>
Contributor: Eliza Margaretha (Documentation), Susanne Feix (Translation),
Leo Repp
Expand Down
54 changes: 27 additions & 27 deletions dev/js/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions lib/Kalamar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -416,7 +416,7 @@ B<See the README for further information!>
=head2 COPYRIGHT AND LICENSE
Copyright (C) 2015-2023, L<IDS Mannheim|https://www.ids-mannheim.de/>
Copyright (C) 2015-2024, L<IDS Mannheim|https://www.ids-mannheim.de/>
Author: L<Nils Diewald|https://www.nils-diewald.de/>
Kalamar is developed as part of the L<KorAP|http://korap.ids-mannheim.de/>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 006ddc6

Please sign in to comment.