summaryrefslogtreecommitdiffstats
path: root/dashboard
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-06-05 15:01:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-06-05 15:01:38 +0000
commit58cffd4bc519009e03df42ef61fc3e4928ef0334 (patch)
tree14f7fbe1abd69c55412a7eef4a0312cc9b5d9248 /dashboard
parent196946aa9d62fa597eb13675e4245c7a46be8a1d (diff)
parenta4ba94caf4623ee0ce618070ff9fb425e98ee726 (diff)
Merge "Cleans up some HTML"
Diffstat (limited to 'dashboard')
-rw-r--r--dashboard/src/templates/booking/quick_deploy.html2
-rw-r--r--dashboard/src/templates/dashboard/multiple_select_filter_widget.html52
2 files changed, 25 insertions, 29 deletions
diff --git a/dashboard/src/templates/booking/quick_deploy.html b/dashboard/src/templates/booking/quick_deploy.html
index 03eb78c..07794bc 100644
--- a/dashboard/src/templates/booking/quick_deploy.html
+++ b/dashboard/src/templates/booking/quick_deploy.html
@@ -208,7 +208,7 @@
}
}
</script>
- <button onclick="submit_form();" class="btn btn-success">Confirm</button>
+ <button id="quick_booking_confirm" onclick="submit_form();" class="btn btn-success">Confirm</button>
</form>
<script>
//context vars
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 @@
<input name="filter_field" id="filter_field" type="hidden"/>
<div id="grid_wrapper" class="grid_wrapper">
{% for object_class, object_list in filter_objects %}
-<div class="class_grid_wrapper">
- <div style="display:inline-block;margin:auto">
- <h4>{{object_class}}</h4>
- </div>
- <div id="{{object_class}}" class="object_class_wrapper">
- {% for obj in object_list %}
- <div id="object_parent">
- <div id="{{ obj.id|default:'not_provided' }}" class="grid-item">
- <p class="grid-item-header">{{obj.name}}</p>
- <p class="grid-item-description">{{obj.description}}</p>
- <button type="button" class="btn btn-success grid-item-select-btn" onclick="processClick('{{obj.id}}', {% if obj.multiple %}true{% else %}false{% endif %});">{% if obj.multiple %}Add{% else %}Select{% endif %}</button>
+ <div class="class_grid_wrapper">
+ <div style="display:inline-block;margin:auto">
+ <h4>{{object_class}}</h4>
+ </div>
+ <div id="{{object_class}}" class="object_class_wrapper">
+ {% for obj in object_list %}
+ <div id="{{ obj.id|default:'not_provided' }}" class="grid-item">
+ <p class="grid-item-header">{{obj.name}}</p>
+ <p class="grid-item-description">{{obj.description}}</p>
+ <button type="button" class="btn btn-success grid-item-select-btn" onclick="processClick(
+ '{{obj.id}}',
+ {% if obj.multiple %}true
+ {% else %}false
+ {% endif %});">{% if obj.multiple %}Add{% else %}Select{% endif %}</button>
+ </div>
+ <input type="hidden" name="{{obj.id}}_selected" value="false"/>
+ {% endfor %}
</div>
- <input type="hidden" name="{{obj.id}}_selected" value="false"/>
- </div>
- {% endfor %}
- </div>
</div>
{% endfor %}
</div>
@@ -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;
}