aboutsummaryrefslogtreecommitdiff
path: root/app/public
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-17 22:08:34 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-17 22:08:34 +0100
commit2a7318eca205f40c35c51d3bf7c89dc9f2b635f8 (patch)
tree66538a4511781bc5c2b11df804634a525c4e83b5 /app/public
parentb067fd2e773409790cb86cff1f799ad1563ea480 (diff)
downloadcheatdb-2a7318eca205f40c35c51d3bf7c89dc9f2b635f8.tar.xz
Add descriptions to tags, and show in multiselect
Diffstat (limited to 'app/public')
-rw-r--r--app/public/static/tagselector.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/public/static/tagselector.js b/app/public/static/tagselector.js
index f099415..566f88a 100644
--- a/app/public/static/tagselector.js
+++ b/app/public/static/tagselector.js
@@ -30,6 +30,11 @@
});
function addTag(id, text) {
+ const idx = text.indexOf(':');
+ if (idx > 0) {
+ text = text.substr(0, idx);
+ }
+
$('<span class="badge badge-pill badge-primary"/>')
.text(text + ' ')
.data("id", id)