aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-10-19 13:00:36 +0200
committerRobert Jaros <rjaros@finn.pl>2017-10-19 13:00:36 +0200
commit94d1930aaf160d7271aabe97bf167a911391210b (patch)
tree677bde7437bf8aa4f163fc31ed91f3be7f8ec913 /src/main/kotlin
parenta043a16a6e9a192e2760d9b43197a9383b7790c2 (diff)
downloadkvision-94d1930aaf160d7271aabe97bf167a911391210b.tar.gz
kvision-94d1930aaf160d7271aabe97bf167a911391210b.tar.bz2
kvision-94d1930aaf160d7271aabe97bf167a911391210b.zip
Unit tests
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/Showcase.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/CheckBoxInput.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/TextInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt2
4 files changed, 5 insertions, 4 deletions
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<String> = 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() {