Skip to content

Commit

Permalink
Changes guided tour link from ID to class. Needed for #8554
Browse files Browse the repository at this point in the history
Change-Id: I7e99bac6555abec271daca09ebd8323074b34f3d
  • Loading branch information
hebasta committed Oct 17, 2024
1 parent 0cbcc07 commit 0d3630c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
16 changes: 9 additions & 7 deletions dev/js/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,17 @@ define([
KorAP.koralQuery = JSON.parse(kqe.getAttribute('data-koralquery') || "");
};

let gt;
if (gt = document.getElementById('link-guided-tour')) {
gt.setAttribute('href', '#');
gt.addEventListener('click', function(){
let gt = document.getElementsByClassName('link-guided-tour');
if (gt.length != null){
for(let j = 0; j < gt.length; j++){
gt[j].setAttribute('href', '#');
gt[j].addEventListener('click', function(){
tourClass.gTstartSearch().start();
});

KorAP.tourshowR = function(){
tourClass.gTshowResults().start();
}

KorAP.tourshowR = function(){
tourClass.gTshowResults().start();
};
};

Expand Down
2 changes: 1 addition & 1 deletion t/intro.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $t->get_ok('/')
->element_exists('div.intro')
->text_is('div.intro > p > strong', 'KorAP')
->content_unlike(qr!onload!)
->text_is('#link-guided-tour', 'guided tour')
->text_is('div.intro > p > a.link-guided-tour', 'guided tour')
->text_is('nav > div > a[href=/doc/korap/kalamar]', 'V 0.47.999')
->element_exists('select#ql-field option[value=poliqarp]')
->element_exists('select#ql-field option[value=cqp]')
Expand Down
2 changes: 1 addition & 1 deletion templates/de/intro.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p><strong>KorAP</strong> ist eine neue Korpusanalyseplattform, optimiert für große, mehrfach annotierte Korpora und komplexe Suchmechanismen. Dabei versucht KorAP unabhängig von spezifischen Forschungsfragen zu sein.</p>

<p><noscript>KorAP erwartet für einige Funktionen die Aktivierung von JavaScript.</noscript></p>
<p><strong>Neu bei KorAP?</strong> Dann starten Sie doch mit unserer <a id="link-guided-tour">Tour</a> oder lesen Sie unsere <%= doc_opener 'ql', begin %>Einführung<% end %>!</p>
<p><strong>Neu bei KorAP?</strong> Dann starten Sie doch mit unserer <a class="link-guided-tour">Tour</a> oder lesen Sie unsere <%= doc_opener 'ql', begin %>Einführung<% end %>!</p>

%= include 'announcement', lang => 'de'

Expand Down
2 changes: 1 addition & 1 deletion templates/intro.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p><noscript>KorAP expects activated JavaScript for some features.</noscript></p>

<p><strong>New to KorAP?</strong> Please check out our <a id="link-guided-tour">guided tour</a> or our <%= doc_opener 'ql', begin %>tutorial<% end %>!</p>
<p><strong>New to KorAP?</strong> Please check out our <a class="link-guided-tour">guided tour</a> or our <%= doc_opener 'ql', begin %>tutorial<% end %>!</p>

%= include 'announcement', lang => 'en'

Expand Down

0 comments on commit 0d3630c

Please sign in to comment.