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 /kvision-modules/kvision-bootstrap/src/main/kotlin/pl | |
parent | 14c3ebc7f4aa9756655bbfd2bf5ed00f2ae11012 (diff) | |
download | kvision-acfe0b32d713a16653cf2fe0a4b3329261763f57.tar.gz kvision-acfe0b32d713a16653cf2fe0a4b3329261763f57.tar.bz2 kvision-acfe0b32d713a16653cf2fe0a4b3329261763f57.zip |
Some style fixes and missing comments.
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/Modal.kt | 14 |
1 files changed, 12 insertions, 2 deletions
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. |