From d34d7a7ce55c1b73ea1375db10d2a8e4548861d1 Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 22 Sep 2021 10:50:39 +0200 Subject: [PATCH 1/6] added onblur listener and br --- src/main/cljs/dda/c4k_common/browser.cljs | 30 +++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/main/cljs/dda/c4k_common/browser.cljs b/src/main/cljs/dda/c4k_common/browser.cljs index 056b488..e4b8e92 100644 --- a/src/main/cljs/dda/c4k_common/browser.cljs +++ b/src/main/cljs/dda/c4k_common/browser.cljs @@ -83,13 +83,18 @@ label] {:type :element :attrs {:for id-for :class "form-label"} :tag :label :content [label]}) +(defn generate-br + [] + {:type :element, :attrs nil, :tag :br, :content nil}) + (defn generate-input-field [id label default-value] [(generate-label id label) - {:type :element :attrs {:class "form-control" :type "text" :name id :value default-value} :tag :input :content nil} - (generate-feedback-tag id)]) + {:type :element :attrs {:class "form-control" :type "text" :name id :value default-value :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :input :content nil} + (generate-feedback-tag id) + (generate-br)]) (defn generate-text-area [id @@ -97,27 +102,26 @@ default-value rows] [(generate-label id label) - {:type :element :attrs {:name id :id id :class "form-control" :rows rows} :tag :textarea :content [default-value]} - (generate-feedback-tag id)]) + {:type :element :attrs {:name id :id id :class "form-control" :rows rows :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :textarea :content [default-value]} + (generate-feedback-tag id) + (generate-br)]) (defn generate-button [id label] - {:type :element - :attrs {:type "button", :id id, :class "btn btn-primary"} + [{:type :element + :attrs {:type "button", :id id, :class "btn btn-primary" :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :button - :content [label]}) - -(defn generate-br - [] - {:type :element, :attrs nil, :tag :br, :content nil}) + :content [label]} + (generate-br)]) (defn generate-output [id label rows] - {:type :element, :attrs {:id id}, :tag :div, :content [{:type :element, :attrs {:for "output", :class "form-label"}, :tag :label, :content [label]} - {:type :element, :attrs {:name "output", :id "output", :class "form-control", :rows rows}, :tag :textarea, :content []}]}) + [{:type :element, :attrs {:id id}, :tag :div, :content [{:type :element, :attrs {:for "output", :class "form-label"}, :tag :label, :content [label]} + {:type :element, :attrs {:name "output", :id "output", :class "form-control", :rows rows}, :tag :textarea, :content []}]} + (generate-br)]) (defn generate-needs-validation [] From e89d03a6c89fd6344298baf048b33554f52de6ce Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 22 Sep 2021 10:51:33 +0200 Subject: [PATCH 2/6] Version 0.3.2 --- project-cljs.clj | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project-cljs.clj b/project-cljs.clj index a53a755..719eb60 100644 --- a/project-cljs.clj +++ b/project-cljs.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.2-SNAPSHOT" +(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.2" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" diff --git a/project.clj b/project.clj index 9b35490..8634eeb 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.2-SNAPSHOT" +(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.2" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" From b5f4338506c6717314ff4e39014b1ccdf8a0c316 Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 22 Sep 2021 10:52:39 +0200 Subject: [PATCH 3/6] version bump --- project-cljs.clj | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project-cljs.clj b/project-cljs.clj index 719eb60..eef3a57 100644 --- a/project-cljs.clj +++ b/project-cljs.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.2" +(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.3-SNAPSHOT" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" diff --git a/project.clj b/project.clj index 8634eeb..0bcda8b 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.2" +(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.3-SNAPSHOT" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" From 2625cb615cffa55eef4e90b90f121e4c8c42bbe8 Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 22 Sep 2021 11:26:25 +0200 Subject: [PATCH 4/6] added id to input field, variable project --- src/main/cljs/dda/c4k_common/browser.cljs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/cljs/dda/c4k_common/browser.cljs b/src/main/cljs/dda/c4k_common/browser.cljs index e4b8e92..53e275b 100644 --- a/src/main/cljs/dda/c4k_common/browser.cljs +++ b/src/main/cljs/dda/c4k_common/browser.cljs @@ -90,9 +90,10 @@ (defn generate-input-field [id label - default-value] + default-value + project-file-path] [(generate-label id label) - {:type :element :attrs {:class "form-control" :type "text" :name id :value default-value :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :input :content nil} + {:type :element :attrs {:class "form-control" :type "text" :name id :id id :value default-value :onblur (str project-file-path ".validate_all_BANG_()")} :tag :input :content nil} (generate-feedback-tag id) (generate-br)]) @@ -100,9 +101,10 @@ [id label default-value - rows] + rows + project-file-path] [(generate-label id label) - {:type :element :attrs {:name id :id id :class "form-control" :rows rows :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} :tag :textarea :content [default-value]} + {:type :element :attrs {:name id :id id :class "form-control" :rows rows :onblur (str project-file-path ".validate_all_BANG_()")} :tag :textarea :content [default-value]} (generate-feedback-tag id) (generate-br)]) @@ -110,7 +112,7 @@ [id label] [{:type :element - :attrs {:type "button", :id id, :class "btn btn-primary" :onblur "dda.c4k_jira.browser.validate_all_BANG_ ()"} + :attrs {:type "button", :id id, :class "btn btn-primary"} :tag :button :content [label]} (generate-br)]) From 55c8289b90ca218373e1c6da235ee81bc3999626 Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 22 Sep 2021 11:27:05 +0200 Subject: [PATCH 5/6] Version 0.3.3 --- project-cljs.clj | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project-cljs.clj b/project-cljs.clj index eef3a57..b9ffe32 100644 --- a/project-cljs.clj +++ b/project-cljs.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.3-SNAPSHOT" +(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.3" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" diff --git a/project.clj b/project.clj index 0bcda8b..83b8a12 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.3-SNAPSHOT" +(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.3" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" From 4215356b104fcd19d95221dbcf5c66f561d553aa Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 22 Sep 2021 11:27:42 +0200 Subject: [PATCH 6/6] version bump --- project-cljs.clj | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project-cljs.clj b/project-cljs.clj index b9ffe32..29b346b 100644 --- a/project-cljs.clj +++ b/project-cljs.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.3" +(defproject org.domaindrivenarchitecture/c4k-common-cljs "0.3.4-SNAPSHOT" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" diff --git a/project.clj b/project.clj index 83b8a12..5de56ab 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.3" +(defproject org.domaindrivenarchitecture/c4k-common-clj "0.3.4-SNAPSHOT" :description "Contains predicates and tools for c4k" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0"