aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-bootstrap/src/main/kotlin/pl
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-bootstrap/src/main/kotlin/pl')
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt4
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt6
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt2
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/window/Window.kt6
5 files changed, 10 insertions, 10 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
index 4c5b222e..852820af 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
@@ -77,13 +77,13 @@ open class Alert(
init {
body.add(contentTag)
val okButton = Button("OK", "fas fa-check", ButtonStyle.PRIMARY)
- okButton.setEventListener {
+ okButton.setEventListener<Button> {
click = {
hide()
}
}
this.addButton(okButton)
- this.setEventListener {
+ this.setEventListener<Button> {
keydown = { e ->
if (e.keyCode == ENTER_KEY) {
hide()
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
index 058ca7bc..c464ea11 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
@@ -114,20 +114,20 @@ open class Confirm(
init {
body.add(contentTag)
- cancelButton.setEventListener {
+ cancelButton.setEventListener<Button> {
click = {
hide()
}
}
this.addButton(cancelButton)
- noButton.setEventListener {
+ noButton.setEventListener<Button> {
click = {
hide()
noCallback?.invoke()
}
}
this.addButton(noButton)
- yesButton.setEventListener {
+ yesButton.setEventListener<Button> {
click = {
hide()
yesCallback?.invoke()
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
index b064e30c..63035e76 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
@@ -120,7 +120,7 @@ open class Modal(
dialog.role = "document"
dialog.add(content)
closeIcon.visible = closeButton
- closeIcon.setEventListener {
+ closeIcon.setEventListener<CloseIcon> {
click = {
hide()
}
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
index de8d60e8..d75d10df 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
@@ -175,7 +175,7 @@ open class TabPanel(
}
}
}
- setEventListener {
+ setEventListener<Tag> {
click = { e ->
activeIndex = this@TabPanel.content.getChildren().indexOf(childrenMap[currentIndex])
e.preventDefault()
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/window/Window.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
index 861127fa..b34de18d 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/window/Window.kt
@@ -189,7 +189,7 @@ open class Window(
captionTag.add(windowIcon)
header.add(iconsContainer)
minimizeIcon.visible = minimizeButton
- minimizeIcon.setEventListener {
+ minimizeIcon.setEventListener<MinimizeIcon> {
click = { _ ->
@Suppress("UnsafeCastFromDynamic")
if (this@Window.dispatchEvent("minimizeWindow", obj {}) != false) {
@@ -202,7 +202,7 @@ open class Window(
}
iconsContainer.add(minimizeIcon)
maximizeIcon.visible = maximizeButton
- maximizeIcon.setEventListener {
+ maximizeIcon.setEventListener<MaximizeIcon> {
click = { _ ->
@Suppress("UnsafeCastFromDynamic")
if (this@Window.dispatchEvent("maximizeWindow", obj {}) != false) {
@@ -215,7 +215,7 @@ open class Window(
}
iconsContainer.add(maximizeIcon)
closeIcon.visible = closeButton
- closeIcon.setEventListener {
+ closeIcon.setEventListener<CloseIcon> {
click = { _ ->
@Suppress("UnsafeCastFromDynamic")
if (this@Window.dispatchEvent("closeWindow", obj {}) != false) {