|
|
|
@ -279,9 +279,10 @@ function addQRModalHandlers() {
|
|
|
|
|
// Ways to open the QR Modal
|
|
|
|
|
|
|
|
|
|
for (const row of rows) {
|
|
|
|
|
const communityID = row.getAttribute(ATTRIBUTES.ROW.IDENTIFIER);
|
|
|
|
|
const communityID = row.getAttribute(ATTRIBUTES.ROW.IDENTIFIER) ?? unreachable("No community ID attribute");
|
|
|
|
|
for (const cell of ['.td_qr_code', '.td_description', '.td_language', '.td_users']) {
|
|
|
|
|
row.querySelector(cell).addEventListener(
|
|
|
|
|
const cellElement = row.querySelector(cell) ?? unreachable(`Could not find ${cell}`);
|
|
|
|
|
cellElement.addEventListener(
|
|
|
|
|
'click',
|
|
|
|
|
() => displayQRModal(communityID, cell == '.td_qr_code' ? 1 : 0)
|
|
|
|
|
);
|
|
|
|
@ -598,6 +599,16 @@ function addSearchInteractions() {
|
|
|
|
|
newLocation.hash = hash;
|
|
|
|
|
shareOrCopyToClipboard(newLocation.href, "Share link copied to clipboard");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const tags = dom.tags();
|
|
|
|
|
for (const tag of tags) {
|
|
|
|
|
tag.classList.add('clickable');
|
|
|
|
|
tag.setAttribute('tabindex', "0");
|
|
|
|
|
tag.addEventListener('click', function(event) {
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
useSearchTerm("#" + this.innerText.replace(/ /g,"-"), true);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|