diff options
author | Robert Jaros <rjaros@finn.pl> | 2020-05-06 23:26:15 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2020-05-06 23:26:15 +0200 |
commit | 02630b333b6a53d20f821b9dc5373ada6988f30f (patch) | |
tree | d84fa58961e2791e0fe2f20101dac4b2e1ab5cc3 /kvision-modules/kvision-bootstrap | |
parent | 0482e157196c0cd8ca58e7c123028c1d54f88336 (diff) | |
download | kvision-02630b333b6a53d20f821b9dc5373ada6988f30f.tar.gz kvision-02630b333b6a53d20f821b9dc5373ada6988f30f.tar.bz2 kvision-02630b333b6a53d20f821b9dc5373ada6988f30f.zip |
Add root panel container types from Bootstrap 4.4. Deprecate current root panel builder functions and constructors.
Diffstat (limited to 'kvision-modules/kvision-bootstrap')
19 files changed, 29 insertions, 29 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt index d0b05cce..7224a895 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt @@ -88,7 +88,7 @@ interface WSpec : DomSpec { fun runW(code: (widget: Widget, element: Element?) -> Unit) { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val widget = Widget() widget.id = "test_id" root.add(widget) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt index 5a2cb31b..17956fa7 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/ContextMenuSpec.kt @@ -35,7 +35,7 @@ class ContextMenuSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val m = ContextMenu { link("a", "b") link("c", "d") @@ -55,7 +55,7 @@ class ContextMenuSpec : DomSpec { @Test fun positionMenu() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val m = ContextMenu { link("a", "b") link("c", "d") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt index 5efdeb20..f5dd8c9f 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/DropDownSpec.kt @@ -35,7 +35,7 @@ class DropDownSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag") root.add(dd) dd.list.getElementJQueryD()?.dropdown("toggle") @@ -52,7 +52,7 @@ class DropDownSpec : DomSpec { @Test fun renderDropUp() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag").apply { direction = Direction.DROPUP } root.add(dd) dd.list.getElementJQueryD()?.dropdown("toggle") @@ -69,7 +69,7 @@ class DropDownSpec : DomSpec { @Test fun renderHeaderElement() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val dd = DropDown("Dropdown", listOf("abc" to DD.HEADER.option), "flag") root.add(dd) dd.list.getElementJQueryD()?.dropdown("toggle") @@ -86,7 +86,7 @@ class DropDownSpec : DomSpec { @Test fun renderSeparatorElement() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val dd = DropDown("Dropdown", listOf("abc" to DD.SEPARATOR.option), "flag") root.add(dd) dd.list.getElementJQueryD()?.dropdown("toggle") @@ -103,7 +103,7 @@ class DropDownSpec : DomSpec { @Test fun renderDisabledElement() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val dd = DropDown("Dropdown", listOf("abc" to DD.DISABLED.option), "flag") root.add(dd) dd.list.getElementJQueryD()?.dropdown("toggle") @@ -120,7 +120,7 @@ class DropDownSpec : DomSpec { @Test fun toggle() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag") root.add(dd) val visible = dd.getElementJQuery()?.hasClass("show") ?: false diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt index 25ca7a7d..64a01f64 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/HeaderSpec.kt @@ -32,7 +32,7 @@ class HeaderSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val h = Header("Test") root.add(h) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt index 36c22a74..6e568c80 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/dropdown/SeparatorSpec.kt @@ -32,7 +32,7 @@ class SeparatorSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val s = Separator() root.add(s) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt index 48a8b5a0..b6e09783 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/AlertSpec.kt @@ -36,7 +36,7 @@ class AlertSpec : DomSpec { @Test fun render() { run { - Root("test", fixed = true) + Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) Alert.show("Alert caption", "Alert content", animation = false) val alert = document.getElementById("test")?.let { jQuery(it).parent().parent().find(".modal")[0] } assertNotNull(alert, "Should show alert window") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt index 1893ce81..10d11b2d 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/CloseIconSpec.kt @@ -32,7 +32,7 @@ class CloseIconSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val ci = CloseIcon() root.add(ci) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt index 875bf9e2..1459b8b5 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ConfirmSpec.kt @@ -36,7 +36,7 @@ class ConfirmSpec : DomSpec { @Test fun render() { run { - Root("test", fixed = true) + Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) Confirm.show("Confirm caption", "Confirm content") val confirm = document.getElementById("test")?.let { jQuery(it).find(".modal")[0] } assertNotNull(confirm, "Should show confirm window") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt index 7149b163..33d16fb1 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/modal/ModalSpec.kt @@ -35,7 +35,7 @@ class ModalSpec : DomSpec { @Test fun render() { run { - Root("test", fixed = true) + Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val modal = Modal("Modal") modal.show() val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() } @@ -47,7 +47,7 @@ class ModalSpec : DomSpec { @Test fun toggle() { run { - Root("test", fixed = true) + Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val modal = Modal("Modal") modal.toggle() val content = document.getElementById("test")?.let { jQuery(it).find(".modal-title").html() } diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt index 8eb7bd5b..1330446e 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavFormSpec.kt @@ -32,7 +32,7 @@ class NavFormSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val navf = NavForm() root.add(navf) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt index 2e52557f..c6b82ced 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavSpec.kt @@ -32,7 +32,7 @@ class NavSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val nav = Nav() root.add(nav) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt index e7fd6e40..7ec1b33e 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/navbar/NavbarSpec.kt @@ -38,7 +38,7 @@ class NavbarSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val navbar = Navbar("TEST", "#", NavbarType.FIXEDTOP) root.add(navbar) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt index 1ebac202..b176650d 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/ResponsiveGridPanelSpec.kt @@ -33,7 +33,7 @@ class ResponsiveGridPanelSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val rgPanel = ResponsiveGridPanel() root.add(rgPanel) rgPanel.add(Span("abc"), 1, 1) diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt index 7a76cde9..97dba32e 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/panel/TabPanelSpec.kt @@ -34,7 +34,7 @@ class TabPanelSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val tabs = TabPanel() root.add(tabs) val label1 = Span("abc") @@ -53,7 +53,7 @@ class TabPanelSpec : DomSpec { @Test fun setActiveIndex() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val tabs = TabPanel() root.add(tabs) val label1 = Span("abc") @@ -73,7 +73,7 @@ class TabPanelSpec : DomSpec { @Test fun removeTab() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val tabs = TabPanel() root.add(tabs) val label1 = Span("abc") @@ -95,7 +95,7 @@ class TabPanelSpec : DomSpec { @Test fun tabClick() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val tabs = TabPanel() root.add(tabs) val label1 = Span("abc") 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 2f044987..5f829da2 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 @@ -33,7 +33,7 @@ class ProgressBarSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val progressBar = ProgressBar(50, style = ProgressBarStyle.SUCCESS, striped = true, content = "Processing ...") root.add(progressBar) 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 4aa14230..fb0dd6c7 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 @@ -33,7 +33,7 @@ class ProgressIndicatorSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val ind = ProgressIndicator(50, style = ProgressBarStyle.SUCCESS, striped = true) root.add(ind) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt index b3ddbe40..64e0a707 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ButtonGroupSpec.kt @@ -33,7 +33,7 @@ class ButtonGroupSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val group = ButtonGroup() root.add(group) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt index d41ef05e..42cc719b 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/toolbar/ToolbarSpec.kt @@ -32,7 +32,7 @@ class ToolbarSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val toolbar = Toolbar() root.add(toolbar) val element = document.getElementById("test") diff --git a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt index a65ff7c3..b6e49107 100644 --- a/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt +++ b/kvision-modules/kvision-bootstrap/src/test/kotlin/test/pl/treksoft/kvision/window/WindowSpec.kt @@ -32,7 +32,7 @@ class WindowSpec : DomSpec { @Test fun render() { run { - val root = Root("test", fixed = true) + val root = Root("test", containerType = pl.treksoft.kvision.panel.ContainerType.FIXED) val window = Window("Window title", isResizable = false) root.add(window) window.show() |