From c57190a8fcef15b416adb5d986f1162a8ec10bf3 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Sun, 21 Aug 2016 13:31:18 +0200 Subject: [PATCH] added input fields for adding new metadata (issue #39) --- flat/style/flat.metadata.css | 7 +++++++ flat/style/flat.metadata.js | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/flat/style/flat.metadata.css b/flat/style/flat.metadata.css index 8c64eb9..4cf3f68 100644 --- a/flat/style/flat.metadata.css +++ b/flat/style/flat.metadata.css @@ -27,3 +27,10 @@ #metadata table input { width: 95%; } +#metadata .buttons { + margin-top: 20px; + margin-bottom: 20px; + text-align: center; + margin-left: auto; + margin-right: auto; +} diff --git a/flat/style/flat.metadata.js b/flat/style/flat.metadata.js index a3da452..e742598 100644 --- a/flat/style/flat.metadata.js +++ b/flat/style/flat.metadata.js @@ -11,6 +11,21 @@ function metadata_oninit() { s = s + "\n"; i++; }); + newfields = 0; + s = s + ""; s = s + ""; + s = s + "
"; $('#metadata').html(s); + metadata_addinput(); +} + +function metadata_addinput() { + var i = metadata.length + newfields; + newfields++; + var s = "\n"; + s = s + ""; + $('#metadataplaceholder')[0].outerHTML = s; +} + +function metadata_submit() { }