X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=dashboard%2Fsrc%2Ftemplates%2Fdashboard%2Fmultiple_select_filter_widget.html;h=536fdcc37db49f3eeb0cb514a98ba36f65ec014b;hb=78f34347ef16fcbb0a741af02bab198c6d0f8449;hp=c7a19433ab6d3cb43fca827757be8aa60d01fb2f;hpb=b71d94e6d69899fb9e52d44cedc4479e9947967b;p=pharos-tools.git diff --git a/dashboard/src/templates/dashboard/multiple_select_filter_widget.html b/dashboard/src/templates/dashboard/multiple_select_filter_widget.html index c7a1943..536fdcc 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,13 +415,13 @@ 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; } } function updateObjectResult(parentElem){ - node_type = document.getElementById(parentElem.class).parentNode.parentNode.id; + node_type = document.getElementById(parentElem.class).parentNode.id; input = {}; inputs = parentElem.getElementsByTagName("input"); for(var i in inputs){ @@ -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; }