summaryrefslogtreecommitdiff
path: root/assets/js/core/html.js
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-11-26 16:00:52 -0500
committerFrederic Guillot <fred@kanboard.net>2016-11-26 16:00:52 -0500
commit04ff67e26b880dde8bfb6462f312cf434457cd46 (patch)
treea3961289cbe8c60ca524490df1716229c555b379 /assets/js/core/html.js
parente64faae69aec404b2641b8ae281afe20806e8292 (diff)
Rewrite task move position component and remove Vuejs
Diffstat (limited to 'assets/js/core/html.js')
-rw-r--r--assets/js/core/html.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/assets/js/core/html.js b/assets/js/core/html.js
new file mode 100644
index 00000000..f49a629c
--- /dev/null
+++ b/assets/js/core/html.js
@@ -0,0 +1,25 @@
+KB.html.label = function (label, id) {
+ return KB.dom('label').attr('for', id).text(label).build();
+};
+
+KB.html.radio = function (label, name, value) {
+ return KB.dom('label')
+ .add(KB.dom('input')
+ .attr('type', 'radio')
+ .attr('name', name)
+ .attr('value', value)
+ .build()
+ )
+ .text(label)
+ .build();
+};
+
+KB.html.radios = function (items) {
+ var html = KB.dom('div');
+
+ for (var item in items) {
+ if (items.hasOwnProperty(item)) {
+ html.add(KB.html.radio(item.label, item.name, item.value));
+ }
+ }
+};