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.
This commit is contained in:
		
							parent
							
								
									00ad82e07c
								
							
						
					
					
						commit
						3cb8f0adcf
					
				
					 1 changed files with 3 additions and 9 deletions
				
			
		|  | @ -381,19 +381,13 @@ function add_searchtag(box, value, inputted_list, li_class) | ||||||
|     } |     } | ||||||
|     console.log("adding " + value); |     console.log("adding " + value); | ||||||
|     var already_have = false; |     var already_have = false; | ||||||
|     // We're going to be doing some in-place splicing to remove, |     for (var index = 0; index < inputted_list.length; index += 1) | ||||||
|     // so make a duplicate for iterating |  | ||||||
|     existing_tags = Array.from(inputted_list); |  | ||||||
|     for (var index = 0; index < existing_tags.length; index += 1) |  | ||||||
|     { |     { | ||||||
|         existing_tag = existing_tags[index]; |         existing_tag = inputted_list[index]; | ||||||
|         if (existing_tag == value) |         if (existing_tag == value) | ||||||
|         { |         { | ||||||
|             already_have = true; |             already_have = true; | ||||||
|         } |             break; | ||||||
|         else if (existing_tag.startsWith(value + ".") || value.startsWith(existing_tag + ".")) |  | ||||||
|         { |  | ||||||
|             remove_searchtag(box, existing_tag, inputted_list); |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     if (already_have) |     if (already_have) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue