diff options
author | Robert Jaros <rjaros@finn.pl> | 2020-04-29 11:01:49 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2020-04-29 11:01:49 +0200 |
commit | acfe0b32d713a16653cf2fe0a4b3329261763f57 (patch) | |
tree | 756aa8a762c1fae6ad0e22fcc5be6e0c1d5bf8b6 | |
parent | 14c3ebc7f4aa9756655bbfd2bf5ed00f2ae11012 (diff) | |
download | kvision-acfe0b32d713a16653cf2fe0a4b3329261763f57.tar.gz kvision-acfe0b32d713a16653cf2fe0a4b3329261763f57.tar.bz2 kvision-acfe0b32d713a16653cf2fe0a4b3329261763f57.zip |
Some style fixes and missing comments.
2 files changed, 15 insertions, 3 deletions
diff --git a/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt b/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt index 45b3a008..a7482429 100644 --- a/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt +++ b/kvision-modules/kvision-bootstrap-dialog/src/main/kotlin/pl/treksoft/kvision/modal/Dialog.kt @@ -35,12 +35,14 @@ import kotlin.coroutines.resume * @param animation determines if animations are used * @param escape determines if dialog can be closed with Esc key * @param centered determines if modal dialog is vertically centered + * @param scrollable determines if modal dialog content is scrollable * @param classes a set of CSS class names * @param init an initializer extension function */ open class Dialog<R>( caption: String? = null, closeButton: Boolean = true, - size: ModalSize? = null, animation: Boolean = true, centered: Boolean = false, scrollable: Boolean = false, escape: Boolean = true, + size: ModalSize? = null, animation: Boolean = true, centered: Boolean = false, + scrollable: Boolean = false, escape: Boolean = true, classes: Set<String> = setOf(), init: (Dialog<R>.() -> Unit)? = null ) : Modal(caption, closeButton, size, animation, escape, centered, scrollable, classes) { 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 afc5f5fd..0fea3072 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 @@ -53,6 +53,7 @@ enum class ModalSize(val className: String) { * @param size modal window size * @param animation determines if animations are used * @param centered determines if modal dialog is vertically centered + * @param scrollable determines if modal dialog content is scrollable * @param escape determines if dialog can be closed with Esc key * @param classes a set of CSS class names * @param init an initializer extension function @@ -60,7 +61,8 @@ enum class ModalSize(val className: String) { @Suppress("TooManyFunctions") open class Modal( caption: String? = null, closeButton: Boolean = true, - size: ModalSize? = null, animation: Boolean = true, centered: Boolean = false, scrollable: Boolean = false, private val escape: Boolean = true, + size: ModalSize? = null, animation: Boolean = true, centered: Boolean = false, + scrollable: Boolean = false, private val escape: Boolean = true, classes: Set<String> = setOf(), init: (Modal.() -> Unit)? = null ) : SimplePanel(classes) { @@ -75,6 +77,7 @@ open class Modal( captionTag.content = value checkHeaderVisibility() } + /** * Determines if Close button is visible. */ @@ -84,6 +87,7 @@ open class Modal( closeIcon.visible = value checkHeaderVisibility() } + /** * Window size. */ @@ -92,10 +96,12 @@ open class Modal( set(value) { dialog.size = value } + /** * Determines if animations are used. */ var animation by refreshOnUpdate(animation) + /** * Determines if modal dialog is vertically centered. */ @@ -116,12 +122,14 @@ open class Modal( private val dialog = ModalDialog(size, centered, scrollable) private val header = SimplePanel(setOf("modal-header")) + /** * @suppress * Internal property. */ protected val closeIcon = CloseIcon() private val captionTag = Tag(TAG.H5, caption, classes = setOf("modal-title")) + /** * @suppress * Internal property. @@ -292,8 +300,10 @@ open class Modal( * @constructor * @param size modal window size * @param centered determines if modal dialog is vertically centered + * @param scrollable determines if modal dialog content is scrollable */ -internal class ModalDialog(size: ModalSize?, centered: Boolean = false, scrollable: Boolean = false) : SimplePanel(setOf("modal-dialog")) { +internal class ModalDialog(size: ModalSize?, centered: Boolean = false, scrollable: Boolean = false) : + SimplePanel(setOf("modal-dialog")) { /** * Modal window size. |