aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-01-29 20:58:17 +0100
committerRobert Jaros <rjaros@finn.pl>2018-01-29 20:58:17 +0100
commitb6f49d0899265a5b0bcf1b79d5bf11184d446816 (patch)
tree9e63ebd1b06de1a7d83d4981c15bb2e74f4e3ad3
parent6cf546ffb334155b41af49cc7e2b25873204627d (diff)
downloadkvision-b6f49d0899265a5b0bcf1b79d5bf11184d446816.tar.gz
kvision-b6f49d0899265a5b0bcf1b79d5bf11184d446816.tar.bz2
kvision-b6f49d0899265a5b0bcf1b79d5bf11184d446816.zip
Modal content fix
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
index 5b8932cb..6e343dc5 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt
@@ -28,7 +28,7 @@ open class Alert(
content.align = value
}
- private val content = Tag(TAG.SPAN, text, rich, align)
+ private val content = Tag(TAG.DIV, text, rich, align)
init {
body.add(content)
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
index 05550f34..80a6e4f5 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt
@@ -34,7 +34,7 @@ open class Confirm(
refreshCancelButton()
}
- private val content = Tag(TAG.SPAN, text, rich, align)
+ private val content = Tag(TAG.DIV, text, rich, align)
private val cancelButton = Button("Cancel", "remove")
init {
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
index 15ca9b50..d34bbb2b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt
@@ -22,7 +22,7 @@ class AlertSpec : DomSpec {
val title = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() }
assertEquals("Alert caption", title, "Should render alert window with correct caption")
val body = document.getElementById("test")?.let { jQuery(it).find(".modal-body").html() }
- assertEquals("<span>Alert content</span>", body, "Should render alert window with correct content")
+ assertEquals("<div>Alert content</div>", body, "Should render alert window with correct content")
val footer = document.getElementById("test")?.let { jQuery(it).find(".modal-footer").html() }
assertEquals(
"<button class=\"btn btn-primary\" type=\"button\"><span class=\"glyphicon glyphicon-ok\"></span> OK</button>",
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
index 0d3bbc72..06b71720 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt
@@ -22,7 +22,7 @@ class ConfirmSpec : DomSpec {
val title = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() }
assertEquals("Confirm caption", title, "Should render confirm window with correct caption")
val body = document.getElementById("test")?.let { jQuery(it).find(".modal-body").html() }
- assertEquals("<span>Confirm content</span>", body, "Should render confirm window with correct content")
+ assertEquals("<div>Confirm content</div>", body, "Should render confirm window with correct content")
val buttons = document.getElementById("test")?.let { jQuery(it).find(".modal-footer").find("button") }
assertEquals(2, buttons?.length, "Should render confirm window with two buttons")
val button = document.getElementById("test")?.let { jQuery(it).find(".modal-footer").find("button")[0] }