From 225938704f1a0f5c0774f81cf5600e073796a576 Mon Sep 17 00:00:00 2001 From: S Anand Date: Mon, 20 Sep 2021 12:27:44 +0530 Subject: [PATCH 1/8] WIP: bs5-input --- src/bs5-input.html | 265 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 src/bs5-input.html diff --git a/src/bs5-input.html b/src/bs5-input.html new file mode 100644 index 0000000..4241d8a --- /dev/null +++ b/src/bs5-input.html @@ -0,0 +1,265 @@ + From d36f5c1d6714e84e629db0fc235c58276c3f3afd Mon Sep 17 00:00:00 2001 From: S Anand Date: Mon, 20 Sep 2021 12:35:07 +0530 Subject: [PATCH 2/8] WIP: uifactory-config --- src/uifactory-config.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/uifactory-config.html diff --git a/src/uifactory-config.html b/src/uifactory-config.html new file mode 100644 index 0000000..801c1e4 --- /dev/null +++ b/src/uifactory-config.html @@ -0,0 +1,19 @@ + + + + + + + + +
+ + From 74a8dce6e1d5f259a81662f467c82c8b9d6b9e43 Mon Sep 17 00:00:00 2001 From: Samarth Gulati Date: Mon, 20 Sep 2021 16:36:44 +0530 Subject: [PATCH 3/8] indentation and default type --- src/bs5-input.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bs5-input.html b/src/bs5-input.html index 4241d8a..20aedc8 100644 --- a/src/bs5-input.html +++ b/src/bs5-input.html @@ -1,4 +1,4 @@ - - - - - - + - +
- <% let disabledAttr = this.hasAttribute('disabled') %> - <% if (type == "text" || type == "email" || type == "password" || type =="number" || type == "search") { %> - <% if (prefixItem.trim().length != 0 && suffixItem.trim().length != 0) { %> - -
-
- <%= prefixItem %> -
- -
- <%= suffixItem %> -
-
- <% } else { %> - <% if (titlePlacement.trim() == 'inline' || titlePlacement.trim() == 'block'){ %> - <% let placeTitle = titlePlacement.trim() == 'inline' ? 'col-sm-2' : '' %> -
- -
- - <%- help %> -
-
- <% } else { %> -
- <% if(disabledAttr) { %> - - <% }else{ %> - - <%- help %> - <% }%> - -
- <% } %> - <% } %> - <% } else if (type =="textarea") { %> -
- - / <%- maxlength %> - - - - <%- help %> -
- - <% } else if (type == "select") { %> - <% if (disabledAttr) { %> - - <% } else { %> - - <%- help %> - <% } %> - <% } else if (type == "checkbox" || type == "radio") { %> - <% for (var i = 0; i < items.length; i++) { %> - <% if (disabledAttr) { %> -
- <% } else { %> - <% if ($.inArray(items[i], obj.default) > -1) { %> -
- <% } else { %> -
- <% } %> - <% } %> - -
-
- - <% } %> - <% } else if (type == "switch") { %> - - <% for(var i = 0; i < items.length; i++) { %> -
- <% if(disabledAttr) { %> - - <% }else{ %> - <% if($.inArray(items[i], obj.default) > -1) { %> - - <% } else { %> - - <% } %> - - <%} %> - -
-
- <% } %> - <% } else if (type == "dropdown") { %> - - - - <% } else { %> - incorrect input field type - <% } %> - - + From 2b5da09b2213092a1e36417a4be2cd59c7ec50fb Mon Sep 17 00:00:00 2001 From: Samarth Gulati Date: Tue, 21 Sep 2021 16:36:53 +0530 Subject: [PATCH 8/8] add support for style class and id --- src/uifactory-config.html | 41 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/uifactory-config.html b/src/uifactory-config.html index 215ce5d..1e2b222 100644 --- a/src/uifactory-config.html +++ b/src/uifactory-config.html @@ -1,3 +1,18 @@ +