diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt | 2 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt | 1 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt | 16 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt index 693ecbaa..e16ca87e 100644 --- a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt +++ b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt @@ -78,7 +78,7 @@ open class Confirm( /** * Determines if Cancel button is visible. */ - var cancelVisible by refreshOnUpdate(cancelVisible, { refreshCancelButton() }) + var cancelVisible by refreshOnUpdate(cancelVisible) { refreshCancelButton() } /** * Yes button text. diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt index d5695db3..e67a6f17 100644 --- a/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt +++ b/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt @@ -37,7 +37,6 @@ import kotlin.coroutines.resume * @param classes a set of CSS class names * @param init an initializer extension function */ -@Suppress("EXPERIMENTAL_FEATURE_WARNING") open class Dialog<R>( caption: String? = null, closeButton: Boolean = true, size: ModalSize? = null, animation: Boolean = true, escape: Boolean = true, diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt index e09e9f7f..a0456e7e 100644 --- a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt +++ b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt @@ -218,20 +218,20 @@ open class Modal( keyboard = escape backdrop = if (escape) "true" else "static" }) - this.getElementJQuery()?.on("show.bs.modal", { e, _ -> + this.getElementJQuery()?.on("show.bs.modal") { e, _ -> this.dispatchEvent("showBsModal", obj { detail = e }) - }) - this.getElementJQuery()?.on("shown.bs.modal", { e, _ -> + } + this.getElementJQuery()?.on("shown.bs.modal") { e, _ -> this.dispatchEvent("shownBsModal", obj { detail = e }) - }) - this.getElementJQuery()?.on("hide.bs.modal", { e, _ -> + } + this.getElementJQuery()?.on("hide.bs.modal") { e, _ -> this.dispatchEvent("hideBsModal", obj { detail = e }) - }) - this.getElementJQuery()?.on("hidden.bs.modal", { e, _ -> + } + this.getElementJQuery()?.on("hidden.bs.modal") { e, _ -> this.visible = false hide() this.dispatchEvent("hiddenBsModal", obj { detail = e }) - }) + } } override fun hide(): Widget { |