mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Formatting changes
This commit is contained in:
parent
9b696a42a4
commit
9a7bd27fe3
@ -109,21 +109,22 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>Hover over the red domain names to show the associated account. Click on domains to move between columns.</p>
|
<p>Hover over the red domain names to show the associated account. Click on domains to move between columns.</p>
|
||||||
<div class="form-group col-2">
|
<div class="form-group col-2">
|
||||||
<select multiple="multiple" class="form-control" id="account_domains"
|
<select multiple="multiple" class="form-control" id="account_domains" name="account_domains">
|
||||||
name="account_domains">
|
{% for domain in domains %}
|
||||||
{% for domain in domains %}
|
{% if account != None and domain.account_id != None and account.id != domain.account_id %}
|
||||||
{% if account != None and domain.account_id != None and account.id != domain.account_id %}
|
{% with account_id=domain.account_id %}
|
||||||
{% with account_id=domain.account_id %}
|
<option style="color: red" data-toggle="tooltip" title="Associated with: {{ accounts[account_id].name }}" value="{{ domain.name }}">
|
||||||
<option style="color: red" data-toggle="tooltip" title="Associated with: {{ accounts[account_id].name }}"
|
{{ domain.name }}
|
||||||
value="{{ domain.name }}">{{ domain.name }}</option>
|
</option>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<option {% if account.id == domain.account_id %}selected{% endif %}
|
<option {% if account.id == domain.account_id %}selected{% endif %} value="{{ domain.name }}">
|
||||||
value="{{ domain.name }}">{{ domain.name }}</option>
|
{{ domain.name }}
|
||||||
{% endif %}
|
</option>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
</select>
|
{% endfor %}
|
||||||
</div>
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_account') }}'">
|
<button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_account') }}'">
|
||||||
@ -167,44 +168,44 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extrascripts %}
|
{% block extrascripts %}
|
||||||
<script>
|
<script>
|
||||||
function addMultiSelect(id, placeholder) {
|
function addMultiSelect(id, placeholder) {
|
||||||
$(id).multiSelect({
|
$(id).multiSelect({
|
||||||
selectableHeader: `<input type='text' class='search-input' autocomplete='off' placeholder='${placeholder}'>`,
|
selectableHeader: `<input type='text' class='search-input' autocomplete='off' placeholder='${placeholder}'>`,
|
||||||
selectionHeader: `<input type='text' class='search-input' autocomplete='off' placeholder='${placeholder}'>`,
|
selectionHeader: `<input type='text' class='search-input' autocomplete='off' placeholder='${placeholder}'>`,
|
||||||
afterInit: function (ms) {
|
afterInit: function (ms) {
|
||||||
var that = this,
|
var that = this,
|
||||||
$selectableSearch = that.$selectableUl.prev(),
|
$selectableSearch = that.$selectableUl.prev(),
|
||||||
$selectionSearch = that.$selectionUl.prev(),
|
$selectionSearch = that.$selectionUl.prev(),
|
||||||
selectableSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selectable:not(.ms-selected)',
|
selectableSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selectable:not(.ms-selected)',
|
||||||
selectionSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selection.ms-selected';
|
selectionSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selection.ms-selected';
|
||||||
|
|
||||||
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
|
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
|
||||||
.on('keydown', function (e) {
|
.on('keydown', function (e) {
|
||||||
if (e.which === 40) {
|
if (e.which === 40) {
|
||||||
that.$selectableUl.focus();
|
that.$selectableUl.focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
that.qs2 = $selectionSearch.quicksearch(selectionSearchString)
|
|
||||||
.on('keydown', function (e) {
|
|
||||||
if (e.which == 40) {
|
|
||||||
that.$selectionUl.focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
afterSelect: function () {
|
|
||||||
this.qs1.cache();
|
|
||||||
this.qs2.cache();
|
|
||||||
},
|
|
||||||
afterDeselect: function () {
|
|
||||||
this.qs1.cache();
|
|
||||||
this.qs2.cache();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
addMultiSelect("#account_multi_user", "Username")
|
that.qs2 = $selectionSearch.quicksearch(selectionSearchString)
|
||||||
addMultiSelect("#account_domains", "Domain")
|
.on('keydown', function (e) {
|
||||||
|
if (e.which == 40) {
|
||||||
|
that.$selectionUl.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
afterSelect: function () {
|
||||||
|
this.qs1.cache();
|
||||||
|
this.qs2.cache();
|
||||||
|
},
|
||||||
|
afterDeselect: function () {
|
||||||
|
this.qs1.cache();
|
||||||
|
this.qs2.cache();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addMultiSelect("#account_multi_user", "Username")
|
||||||
|
addMultiSelect("#account_domains", "Domain")
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user