diff options
Diffstat (limited to 'kvision-modules/kvision-bootstrap')
-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. |