From 8d13904858c58b77c66570285e3bc354c88d9759 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Mon, 7 Dec 2020 09:13:04 -0500 Subject: [PATCH] Use -
- - - -
-
- - - -
-
-
- -
-
- -
-
-
- -
-
-
- -
-
-
- - -
-
-
- -
-
-
- - - - -
-
-
- -
-
-
-
- -
-
- - -
-

Multi Language Inputs

-
- - -
- - -
-
-
- - - - \ No newline at end of file diff --git a/public/index.html b/public/index.html index d2360c0..b190336 100644 --- a/public/index.html +++ b/public/index.html @@ -38,7 +38,7 @@ border-color: #4582ec; } - + @@ -123,7 +123,7 @@

- + @@ -133,6 +133,13 @@
+ +
+ +
+ diff --git a/public/js/main.js b/public/js/main.js index 5e24331..19d65b5 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -491,6 +491,8 @@ $(function() { this.defaultValue = undefined; if (properties.type === 'bool' && properties.value === 'true'){ this.defaultValue = true; + }else if (properties.type === 'enum'){ + this.defaultValue = properties.value; } this.value = ko.observable(this.defaultValue); @@ -528,11 +530,21 @@ $(function() { var result = []; for (var i = 0; i < this.options().length; i++) { var opt = this.options()[i]; - if (opt.value() !== undefined) { - result.push({ - name: opt.properties.name, - value: opt.value() - }); + if (opt.properties.name == 'feature-type') console.log(opt, opt.value()); + if (opt.properties.type === 'enum'){ + if (opt.value() !== opt.defaultValue){ + result.push({ + name: opt.properties.name, + value: opt.value() + }); + } + }else{ + if (opt.value() !== undefined) { + result.push({ + name: opt.properties.name, + value: opt.value() + }); + } } } return result;