Skip to content

Commit

Permalink
🐛 Fix certificate issue (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakrimoharram authored Sep 18, 2023
1 parent 5b34450 commit 2177034
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class App extends AppHelpers {
this.initiateCollapse();
this.reloadPageAfterFiltering();
initTootTip();
this.loadModalImgOnclick();

salla.comment.event.onAdded(() => window.location.reload());

Expand All @@ -42,6 +43,20 @@ class App extends AppHelpers {
return this;
}

loadModalImgOnclick(){
document.querySelectorAll('.load-img-onclick').forEach(link => {
link.addEventListener('click', (event)=> {
event.preventDefault();
let modal = document.querySelector('#' + link.dataset.modalId),
img = modal.querySelector('img'),
imgSrc = img.dataset.src;

modal.open();
img.src = imgSrc;
})
})
}

commonThings(){
this.cleanContentArticles('.content-entry');
}
Expand Down

0 comments on commit 2177034

Please sign in to comment.