aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/form/text
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-03-04 23:54:19 +0100
committerRobert Jaros <rjaros@finn.pl>2018-03-04 23:54:19 +0100
commit726751c145b33f82e024787fa7aafcc861712712 (patch)
tree32520942c0ae656469fa1c3d38b5eaf371146635 /src/main/kotlin/pl/treksoft/kvision/form/text
parentd2b955c9d976e0dca830de9063a78b559a2acac7 (diff)
downloadkvision-726751c145b33f82e024787fa7aafcc861712712.tar.gz
kvision-726751c145b33f82e024787fa7aafcc861712712.tar.bz2
kvision-726751c145b33f82e024787fa7aafcc861712712.zip
Style fixes.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form/text')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt
index 26a88f1e..c946af8c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt
@@ -129,7 +129,7 @@ abstract class AbstractText(label: String? = null, rich: Boolean = false) :
* @suppress
* Internal property
*/
- protected val idc = "kv_form_text_" + counter
+ protected val idc = "kv_form_text_$counter"
abstract override val input: AbstractTextInput
final override val flabel: FieldLabel = FieldLabel(idc, label, rich)
final override val validationInfo: HelpBlock = HelpBlock().apply { visible = false }
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
index de8bb320..4ab0a59b 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
@@ -69,7 +69,7 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf())
} else {
this.getElementJQuery()?.on("trix-change", { _, _ ->
if (trixId != null) {
- val v = document.getElementById("trix-input-" + trixId)?.let { jQuery(it).`val`() as String? }
+ val v = document.getElementById("trix-input-$trixId")?.let { jQuery(it).`val`() as String? }
value = if (v != null && v.isNotEmpty()) {
v
} else {
@@ -90,14 +90,14 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf())
}
override fun afterDestroy() {
- document.getElementById("trix-input-" + trixId)?.let { jQuery(it).remove() }
- document.getElementById("trix-toolbar-" + trixId)?.let { jQuery(it).remove() }
+ document.getElementById("trix-input-$trixId")?.let { jQuery(it).remove() }
+ document.getElementById("trix-toolbar-$trixId")?.let { jQuery(it).remove() }
trixId = null
}
@Suppress("UnsafeCastFromDynamic")
override fun refreshState() {
- val v = document.getElementById("trix-input-" + trixId)?.let { jQuery(it).`val`() as String? }
+ val v = document.getElementById("trix-input-$trixId")?.let { jQuery(it).`val`() as String? }
if (value != v) {
val editor = this.getElement().asDynamic().editor
value?.let {