aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/modal
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-03-11 23:36:01 +0100
committerRobert Jaros <rjaros@finn.pl>2018-03-11 23:45:06 +0100
commitc0fca9901a634d53d8ee0bfb119b9b2e2f017d83 (patch)
tree127bbc1cd56097694d906d9b9245164436457a76 /src/main/kotlin/pl/treksoft/kvision/modal
parent3577c10b5c3839a06f64cb19e72788401bd7406d (diff)
downloadkvision-c0fca9901a634d53d8ee0bfb119b9b2e2f017d83.tar.gz
kvision-c0fca9901a634d53d8ee0bfb119b9b2e2f017d83.tar.bz2
kvision-c0fca9901a634d53d8ee0bfb119b9b2e2f017d83.zip
Change the name of content property in Tag component.
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()
}
/**