Bugfixes
This commit is contained in:
parent
4596a78697
commit
6db71915b4
2 changed files with 15 additions and 1 deletions
|
@ -9,9 +9,12 @@ import de.kif.frontend.views.overview.initOverviewMain
|
||||||
import de.kif.frontend.views.overview.initPostEdit
|
import de.kif.frontend.views.overview.initPostEdit
|
||||||
import de.kif.frontend.views.overview.initPosts
|
import de.kif.frontend.views.overview.initPosts
|
||||||
import de.kif.frontend.views.table.initTableLayout
|
import de.kif.frontend.views.table.initTableLayout
|
||||||
|
import de.westermann.kwebview.View
|
||||||
import de.westermann.kwebview.components.init
|
import de.westermann.kwebview.components.init
|
||||||
|
import de.westermann.kwebview.iterator
|
||||||
import org.w3c.dom.get
|
import org.w3c.dom.get
|
||||||
import kotlin.browser.document
|
import kotlin.browser.document
|
||||||
|
import kotlin.browser.window
|
||||||
|
|
||||||
var timezoneOffset = 0L
|
var timezoneOffset = 0L
|
||||||
|
|
||||||
|
@ -47,4 +50,15 @@ fun main() = init {
|
||||||
if (document.getElementsByClassName("announcement").length > 0) {
|
if (document.getElementsByClassName("announcement").length > 0) {
|
||||||
initAnnouncement()
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ class CalendarEdit(
|
||||||
|
|
||||||
val schedules = scheduled[schedule.workGroup] ?: emptyList()
|
val schedules = scheduled[schedule.workGroup] ?: emptyList()
|
||||||
scheduled += schedule.workGroup to schedules + schedule
|
scheduled += schedule.workGroup to schedules + schedule
|
||||||
|
|
||||||
workGroupList.firstOrNull { it.workGroup.id == schedule.workGroup.id }?.isScheduled =
|
workGroupList.firstOrNull { it.workGroup.id == schedule.workGroup.id }?.isScheduled =
|
||||||
!showAll && schedule.workGroup in scheduled
|
!showAll && schedule.workGroup in scheduled
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue