From a4ba94caf4623ee0ce618070ff9fb425e98ee726 Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Thu, 23 May 2019 13:41:49 -0400 Subject: Cleans up some HTML Makes things nicer as we build out Selenium tests. Change-Id: I0658bdd01889ea8acb5c66d890baa8c5907430cd Signed-off-by: Parker Berberian --- .../dashboard/multiple_select_filter_widget.html | 52 ++++++++++------------ 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'dashboard/src/templates/dashboard/multiple_select_filter_widget.html') diff --git a/dashboard/src/templates/dashboard/multiple_select_filter_widget.html b/dashboard/src/templates/dashboard/multiple_select_filter_widget.html index c7a1943..d794b73 100644 --- a/dashboard/src/templates/dashboard/multiple_select_filter_widget.html +++ b/dashboard/src/templates/dashboard/multiple_select_filter_widget.html @@ -110,22 +110,24 @@
{% for object_class, object_list in filter_objects %} -
-
-

{{object_class}}

-
-
- {% for obj in object_list %} -
-
-

{{obj.name}}

-

{{obj.description}}

- +
+
+

{{object_class}}

+
+
+ {% for obj in object_list %} +
+

{{obj.name}}

+

{{obj.description}}

+ +
+ + {% endfor %}
- -
- {% endfor %} -
{% endfor %}
@@ -189,8 +191,7 @@ function markAndSweep(root){ //clears grey background of everything } - toCheck = []; - toCheck.push(root); + toCheck = [root]; while(toCheck.length > 0){ node = toCheck.pop(); @@ -289,8 +290,7 @@ function processClick(id, multiple){ if(node['selected']) { select(node); - } - else { + } else { clear(node); } process(node); @@ -309,16 +309,12 @@ function add_node(node){ inputs = [] -function restrictchars(input) -{ - if( input.validity.patternMismatch ) - { +function restrictchars(input){ + if( input.validity.patternMismatch ){ input.setCustomValidity("Only alphanumeric characters (a-z, A-Z, 0-9), underscore(_), and hyphen (-) are allowed"); input.reportValidity(); } - input.value = input.value.replace(/([^A-Za-z0-9-_.])+/g, ""); - checkunique(input); } @@ -419,8 +415,8 @@ function updateResult(nodeId){ var node = document.getElementById(nodeId); var value = {} value[nodeId] = node.parentNode.getElementsByTagName("input")[0].value; - result[node.parentNode.parentNode.id] = {}; - result[node.parentNode.parentNode.id][nodeId] = value; + result[node.parentNode.id] = {}; + result[node.parentNode.id][nodeId] = value; } } @@ -439,7 +435,7 @@ function filter_field_init() { for(nodeId in filter_items) { element = document.getElementById(nodeId); node = filter_items[nodeId]; - result[element.parentNode.parentNode.id] = {} + result[element.parentNode.id] = {} } initialized = true; } -- cgit 1.2.3-korg