aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/modal')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt16
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt16
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt4
3 files changed, 18 insertions, 18 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
index de5bcd3b..5f5a1a80 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
@@ -51,31 +51,31 @@ open class Alert(
* Window content text.
*/
var text
- get() = content.text
+ get() = contentTag.content
set(value) {
- content.text = value
+ contentTag.content = value
}
/**
* Determines if [text] can contain HTML code.
*/
var rich
- get() = content.rich
+ get() = contentTag.rich
set(value) {
- content.rich = value
+ contentTag.rich = value
}
/**
* Text align.
*/
var align
- get() = content.align
+ get() = contentTag.align
set(value) {
- content.align = value
+ contentTag.align = value
}
- private val content = Tag(TAG.DIV, text, rich, align)
+ private val contentTag = Tag(TAG.DIV, text, rich, align)
init {
- body.add(content)
+ body.add(contentTag)
val okButton = Button("OK", "ok", ButtonStyle.PRIMARY)
okButton.setEventListener {
click = {
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
index 55310d50..ffd67a1b 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
@@ -52,36 +52,36 @@ open class Confirm(
* Window content text.
*/
var text
- get() = content.text
+ get() = contentTag.content
set(value) {
- content.text = value
+ contentTag.content = value
}
/**
* Determines if [text] can contain HTML code.
*/
var rich
- get() = content.rich
+ get() = contentTag.rich
set(value) {
- content.rich = value
+ contentTag.rich = value
}
/**
* Text align.
*/
var align
- get() = content.align
+ get() = contentTag.align
set(value) {
- content.align = value
+ contentTag.align = value
}
/**
* Determines if Cancel button is visible.
*/
var cancelVisible by refreshOnUpdate(cancelVisible, { refreshCancelButton() })
- private val content = Tag(TAG.DIV, text, rich, align)
+ private val contentTag = Tag(TAG.DIV, text, rich, align)
private val cancelButton = Button("Cancel", "remove")
init {
- body.add(content)
+ body.add(contentTag)
cancelButton.setEventListener {
click = {
hide()
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
index 8e434d73..b77e8e2e 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
@@ -64,9 +64,9 @@ open class Modal(
* Window caption text.
*/
var caption
- get() = captionTag.text
+ get() = captionTag.content
set(value) {
- captionTag.text = value
+ captionTag.content = value
checkHeaderVisibility()
}
/**