diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_controller.js
index 77193dd5..3478af55 100644
--- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_controller.js
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_controller.js
@@ -2,11 +2,21 @@ import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
- static values = { text: String }
+ static outlets = ['teaser-popup-modal']
+ static values = {
+ title: {
+ type: String,
+ default: 'Hinweis',
+ },
+ text: String,
+ }
open(e) {
- if (this.hasTextValue && confirm(this.textValue)) {
- return
+ if (this.hasTextValue) {
+ this.teaserPopupModalOutlet.titleTarget.innerText = this.titleValue
+ this.teaserPopupModalOutlet.contentTarget.innerHTML = this.textValue
+ this.teaserPopupModalOutlet.buttonTarget.href = this.element.href
+ this.teaserPopupModalOutlet.open()
}
e.preventDefault()
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_modal_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_modal_controller.js
new file mode 100644
index 00000000..17e72ad3
--- /dev/null
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/teaser_popup_modal_controller.js
@@ -0,0 +1,14 @@
+import { Controller } from '@hotwired/stimulus'
+
+export default class extends Controller {
+
+ static targets = ['title', 'content', 'button']
+
+ open() {
+ this.element.classList.remove('hidden')
+ }
+
+ close() {
+ this.element.classList.add('hidden')
+ }
+}
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html
index ac0416cb..b526450a 100644
--- a/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Layouts/Page/Detail.html
@@ -13,5 +13,6 @@
+