diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-10-13 03:37:40 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-10-13 03:37:40 +0200 |
commit | ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c (patch) | |
tree | 7cac3c5449eb8aa398b279d62d9a67ed34fa4115 /src/main/kotlin/pl/treksoft/kvision/modal | |
parent | 470953c78c2509224bb452c16f8bbea54e53b3d7 (diff) | |
download | kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.tar.gz kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.tar.bz2 kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.zip |
Major refactoring of the multi-platform components.
Dependencies upgrade.
A lot of code style fixes.
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 { |