From 3cb8f0adcf2bcc5f9b93309547dfc20f3e3905fc Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 2 Apr 2020 16:56:44 -0700 Subject: [PATCH] Remove code intended for tag trumping but currently useless. I think at one point I was using full qualnames on the tag objects in the mmf uls. But now they just show their base name, so this code is useless. And I don't think I'll reinstate it because tags have multiple parents now and I don't want to implement all the lineage checking in the client js. We'll just let the server handle the slightly less efficient query. --- frontends/etiquette_flask/templates/search.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/frontends/etiquette_flask/templates/search.html b/frontends/etiquette_flask/templates/search.html index 5d10215..a0035de 100644 --- a/frontends/etiquette_flask/templates/search.html +++ b/frontends/etiquette_flask/templates/search.html @@ -381,19 +381,13 @@ function add_searchtag(box, value, inputted_list, li_class) } console.log("adding " + value); var already_have = false; - // We're going to be doing some in-place splicing to remove, - // so make a duplicate for iterating - existing_tags = Array.from(inputted_list); - for (var index = 0; index < existing_tags.length; index += 1) + for (var index = 0; index < inputted_list.length; index += 1) { - existing_tag = existing_tags[index]; + existing_tag = inputted_list[index]; if (existing_tag == value) { already_have = true; - } - else if (existing_tag.startsWith(value + ".") || value.startsWith(existing_tag + ".")) - { - remove_searchtag(box, existing_tag, inputted_list); + break; } } if (already_have)