From 7d505bd76eedaf21ef05cfdef7758443f0bad5fc Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 27 May 2020 23:16:14 +0200 Subject: Fix progress bar styles (#155) --- .../kotlin/pl/treksoft/kvision/progress/ProgressIndicator.kt | 10 +++++----- .../test/pl/treksoft/kvision/progress/ProgressBarSpec.kt | 4 ++-- .../test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'kvision-modules/kvision-bootstrap/src') diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/progress/ProgressIndicator.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/progress/ProgressIndicator.kt index 256d15d7..056cb95f 100644 --- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/progress/ProgressIndicator.kt +++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/progress/ProgressIndicator.kt @@ -31,10 +31,10 @@ import pl.treksoft.kvision.utils.perc * Progress bar styles. */ enum class ProgressBarStyle(internal val className: String) { - SUCCESS("progress-bar-success"), - INFO("progress-bar-info"), - WARNING("progress-bar-warning"), - DANGER("progress-bar-danger") + SUCCESS("bg-success"), + INFO("bg-info"), + WARNING("bg-warning"), + DANGER("bg-danger") } internal const val DEFAULT_MIN = 0 @@ -110,7 +110,7 @@ internal class ProgressIndicator( cl.add("progress-bar-striped" to true) } if (animated) { - cl.add("active" to true) + cl.add("progress-bar-animated" to true) } return cl } diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt index 5f829da2..ff8ae351 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressBarSpec.kt @@ -39,13 +39,13 @@ class ProgressBarSpec : DomSpec { root.add(progressBar) val element = document.getElementById("test") assertEqualsHtml( - "
Processing ...
", + "
Processing ...
", element?.innerHTML, "Should render correct progress bar" ) progressBar.max = 200 assertEqualsHtml( - "
Processing ...
", + "
Processing ...
", element?.innerHTML, "Should render correct progress bar after max value change" ) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt index fb0dd6c7..658b25fa 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/progress/ProgressIndicatorSpec.kt @@ -38,13 +38,13 @@ class ProgressIndicatorSpec : DomSpec { root.add(ind) val element = document.getElementById("test") assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct progress bar indicator" ) ind.max = 200 assertEqualsHtml( - "
", + "
", element?.innerHTML, "Should render correct progress bar indicator after max value change" ) -- cgit