mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
attach volume dropdown menu rearranged to show selected pool
This commit is contained in:
parent
1196fb38c9
commit
07984a2a9a
2 changed files with 9 additions and 4 deletions
|
@ -103,14 +103,14 @@
|
|||
<label class="col-sm-3 control-label" style="font-weight:normal;">{% trans "Storage" %}</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="dropdown">
|
||||
<button class="btn dropdown-toggle" type="button" data-toggle="dropdown">{% trans 'Select Pool...' %}
|
||||
<button id="select_storage" class="btn dropdown-toggle" type="button" data-toggle="dropdown">{% trans 'Select Pool...' %}
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for storage in storages %}
|
||||
<li><a href="#" onclick="get_volumes({{ compute_id }}, '{{ storage }}')">{{ storage }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input id="selected_storage" name="selected_storage" type="hidden" value=""/>
|
||||
<input id="selected_storage" name="selected_storage" hidden/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1253,8 +1253,13 @@
|
|||
select.removeChild(select.options[0]);
|
||||
}
|
||||
|
||||
var input_sto = document.getElementById('selected_storage');
|
||||
input_sto.value = pool;
|
||||
var sto_drop = document.getElementById('select_storage');
|
||||
sto_drop.value = pool;
|
||||
sto_drop.innerHTML = pool + "<span class=\"caret\"></span>";
|
||||
|
||||
var sto_input = document.getElementById('selected_storage');
|
||||
sto_input.value = pool;
|
||||
sto_input.innerHTML = pool;
|
||||
|
||||
$.getJSON(vol_url, function(data) {
|
||||
if (data.length > 0) {
|
||||
|
|
Loading…
Reference in a new issue