You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2020/05/30 11:14:37 UTC

[isis] branch master updated: ISIS-2342 cleanup, resize dialog

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 72ceaf6  ISIS-2342 cleanup, resize dialog
     new 44da006  Merge remote-tracking branch 'origin/master'
72ceaf6 is described below

commit 72ceaf6f908b72747fef726d2a81310231e80074
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Sat May 30 13:13:55 2020 +0200

    ISIS-2342 cleanup, resize dialog
---
 .../org/apache/isis/client/kroviz/core/event/LogEntry.kt      |  9 +++++----
 .../org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt   |  2 ++
 .../kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt    | 11 ++++++-----
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
index 568c0bd..ea5082d 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
@@ -92,7 +92,7 @@ data class LogEntry(
 
     fun setSuccess() {
         calculate()
-        this.responseLength = response.length
+        responseLength = response.length
         state = EventState.SUCCESS
     }
 
@@ -141,9 +141,10 @@ data class LogEntry(
 
     private fun stripHostPort(url: String): String {
         var result = url
-        val protocolHostPort = UiManager.getUrl()
-        if (url.contains("restful/")) {
-            result = result.replace(protocolHostPort + "restful/", "")
+        val signature = "restful/"
+        if (url.contains(signature)) {
+            val protocolHostPort = UiManager.getUrl()
+            result = result.replace(protocolHostPort + signature, "")
             result = removeHexCode(result)
         }
         return result
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt
index 582a1aa..601f7bc 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/FormPanelFactory.kt
@@ -19,6 +19,7 @@ import pl.treksoft.kvision.form.time.DateTime
 import pl.treksoft.kvision.form.time.dateTime
 import pl.treksoft.kvision.html.Div
 import pl.treksoft.kvision.panel.VPanel
+import pl.treksoft.kvision.panel.flexPanel
 import pl.treksoft.kvision.panel.vPanel
 import pl.treksoft.kvision.utils.perc
 import pl.treksoft.kvision.utils.px
@@ -29,6 +30,7 @@ class FormPanelFactory(items: List<FormItem>) : VPanel() {
 
     init {
         panel = formPanel {
+            height = 100.perc
             margin = 10.px
             for (fi: FormItem in items) {
                 when (fi.type) {
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt
index 42206fc..97b6161 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/RoDialog.kt
@@ -7,8 +7,10 @@ import pl.treksoft.kvision.core.CssSize
 import pl.treksoft.kvision.core.UNIT
 import pl.treksoft.kvision.core.Widget
 import pl.treksoft.kvision.form.FormPanel
+import pl.treksoft.kvision.form.formPanel
 import pl.treksoft.kvision.html.Button
 import pl.treksoft.kvision.html.ButtonStyle
+import pl.treksoft.kvision.panel.FlexAlignItems
 import pl.treksoft.kvision.panel.FlexJustify
 import pl.treksoft.kvision.panel.HPanel
 import pl.treksoft.kvision.panel.vPanel
@@ -69,14 +71,13 @@ class RoDialog(
         vPanel(justify = FlexJustify.SPACEBETWEEN) {
             height = 100.perc
             formPanel = FormPanelFactory(items).panel
-            formPanel?.height = 100.perc
-            formPanel?.let {
-                add(it, grow = 2)
-            }
+            //formPanel?.height = 100.perc  -- omitted here, already set in creating function
+
+            add(formPanel!!, grow = 2)
 
             val buttonBar = HPanel(spacing = 10) {
                 id = "button-bar"
-                margin = 10.px
+                marginLeft = 10.px
             }
             buttonBar.add(okButton)
             buttonBar.add(cancelButton)