This commit is contained in:
Lars Westermann 2019-06-13 02:59:53 +02:00
parent 4596a78697
commit 6db71915b4
Signed by: lars.westermann
GPG key ID: 9D417FA5BB9D5E1D
2 changed files with 15 additions and 1 deletions

View file

@ -9,9 +9,12 @@ import de.kif.frontend.views.overview.initOverviewMain
import de.kif.frontend.views.overview.initPostEdit
import de.kif.frontend.views.overview.initPosts
import de.kif.frontend.views.table.initTableLayout
import de.westermann.kwebview.View
import de.westermann.kwebview.components.init
import de.westermann.kwebview.iterator
import org.w3c.dom.get
import kotlin.browser.document
import kotlin.browser.window
var timezoneOffset = 0L
@ -47,4 +50,15 @@ fun main() = init {
if (document.getElementsByClassName("announcement").length > 0) {
initAnnouncement()
}
for (btn in document.getElementsByClassName("btn-danger").iterator()) {
View.wrap(btn).onClick {
val result = window.confirm("Wollen Sie wirklich löschen?")
if (!result) {
it.stopPropagation()
it.preventDefault()
}
}
}
}