From 94d1930aaf160d7271aabe97bf167a911391210b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 19 Oct 2017 13:00:36 +0200 Subject: Unit tests --- src/main/kotlin/pl/treksoft/kvision/Showcase.kt | 1 + src/main/kotlin/pl/treksoft/kvision/form/CheckBoxInput.kt | 4 ++-- src/main/kotlin/pl/treksoft/kvision/form/TextInput.kt | 2 +- src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision') diff --git a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt index bf0691e1..1eb0f319 100644 --- a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt +++ b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt @@ -236,6 +236,7 @@ class Showcase : ApplicationBase() { println(self.text) println(textField.value) println(checkbox.value) + textField2.disabled = false grid4.colorHex = 0xff0000 dd3.text = "Zmiana" dd3.style = BUTTONSTYLE.WARNING diff --git a/src/main/kotlin/pl/treksoft/kvision/form/CheckBoxInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/CheckBoxInput.kt index 1893668b..44383629 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/CheckBoxInput.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/CheckBoxInput.kt @@ -52,13 +52,13 @@ open class CheckBoxInput(override var value: Boolean = false, val sn = super.getSnAttrs().toMutableList() sn.add("type" to "checkbox") if (startValue) { - sn.add("checked" to "checked") + sn.add("checked" to "true") } name?.let { sn.add("name" to it) } if (disabled) { - sn.add("disabled" to "disabled") + sn.add("disabled" to "true") } return sn } diff --git a/src/main/kotlin/pl/treksoft/kvision/form/TextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/TextInput.kt index a87cb164..08a39e87 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/TextInput.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/TextInput.kt @@ -118,7 +118,7 @@ class TextInput(type: TEXTINPUTTYPE = TEXTINPUTTYPE.TEXT, placeholder: String? = } } if (disabled) { - sn.add("disabled" to "disabled") + sn.add("disabled" to "true") } return sn } diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt index 06f9be59..03740222 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt @@ -18,7 +18,7 @@ open class SplitPanel(private val direction: DIRECTION = DIRECTION.VERTICAL, classes: Set = setOf()) : Container(classes + ("splitpanel-" + direction.dir)) { @Suppress("LeakingThis") - private val splitter = Splitter(this, direction) + internal val splitter = Splitter(this, direction) @Suppress("UnsafeCastFromDynamic") internal fun afterInsertSplitter() { -- cgit