Revert "Link trade fair names to source pages"
This reverts commit 0f9bbe160c.
This commit is contained in:
@@ -1663,23 +1663,23 @@
|
||||
linksWrap.className = 'bookmark-subpage__messe-links';
|
||||
|
||||
bookmarkQueries.forEach((query, index) => {
|
||||
const hasHomepage = typeof row.quelle_homepage === 'string' && row.quelle_homepage.trim();
|
||||
let linkLikeElement = null;
|
||||
if (hasHomepage) {
|
||||
const link = document.createElement('a');
|
||||
link.className = 'bookmark-subpage__messe-link';
|
||||
link.href = row.quelle_homepage;
|
||||
link.target = '_blank';
|
||||
link.rel = 'noopener';
|
||||
link.textContent = query;
|
||||
linkLikeElement = link;
|
||||
} else {
|
||||
const span = document.createElement('span');
|
||||
span.className = 'bookmark-subpage__messe-link bookmark-subpage__messe-link--static';
|
||||
span.textContent = query;
|
||||
linkLikeElement = span;
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button';
|
||||
button.className = 'bookmark-subpage__messe-link';
|
||||
button.textContent = query;
|
||||
button.title = getTradeFairHoverTitle(row);
|
||||
const handleOpenTradeFair = () => {
|
||||
const opened = openTradeFairSearch(row, query);
|
||||
if (opened > 0) {
|
||||
button.title = getTradeFairHoverTitle(row);
|
||||
render();
|
||||
}
|
||||
};
|
||||
button.addEventListener('click', handleOpenTradeFair);
|
||||
if (typeof window.bindMiddleMouseOpen === 'function') {
|
||||
window.bindMiddleMouseOpen(button, handleOpenTradeFair);
|
||||
}
|
||||
linksWrap.appendChild(linkLikeElement);
|
||||
linksWrap.appendChild(button);
|
||||
|
||||
if (index < bookmarkQueries.length - 1) {
|
||||
const separator = document.createElement('span');
|
||||
@@ -1689,24 +1689,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
const searchButton = document.createElement('button');
|
||||
searchButton.type = 'button';
|
||||
searchButton.className = 'bookmark-subpage__messe-search';
|
||||
searchButton.textContent = 'Suche';
|
||||
searchButton.title = getTradeFairHoverTitle(row);
|
||||
const handleOpenTradeFair = () => {
|
||||
const opened = openTradeFairSearch(row);
|
||||
if (opened > 0) {
|
||||
searchButton.title = getTradeFairHoverTitle(row);
|
||||
render();
|
||||
}
|
||||
};
|
||||
searchButton.addEventListener('click', handleOpenTradeFair);
|
||||
if (typeof window.bindMiddleMouseOpen === 'function') {
|
||||
window.bindMiddleMouseOpen(searchButton, handleOpenTradeFair);
|
||||
}
|
||||
linksWrap.appendChild(searchButton);
|
||||
|
||||
td.appendChild(linksWrap);
|
||||
return td;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user