From c0fca9901a634d53d8ee0bfb119b9b2e2f017d83 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 11 Mar 2018 23:36:01 +0100 Subject: Change the name of content property in Tag component. --- src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt | 16 ++++++++-------- src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt | 16 ++++++++-------- src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision/modal') 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() } /** -- cgit