Offline installation and searchable inputs

This commit is contained in:
Roei Ganor
2020-04-17 17:01:29 +03:00
committed by root
parent bd1eb3cce9
commit 483c767d26
60 changed files with 2675 additions and 7 deletions

View File

@ -253,7 +253,41 @@
increaseArea: '20%' // optional
});
$("#domain_multi_user").multiSelect();
$("#domain_multi_user").multiSelect({
selectableHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Username'>",
selectionHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Username'>",
afterInit: function (ms) {
var that = this,
$selectableSearch = that.$selectableUl.prev(),
$selectionSearch = that.$selectionUl.prev(),
selectableSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selectable:not(.ms-selected)',
selectionSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selection.ms-selected';
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
.on('keydown', function (e) {
if (e.which === 40) {
that.$selectableUl.focus();
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();
}
});
//handle checkbox toggling
$('.dyndns_on_demand_toggle').on('ifToggled', function (event) {
@ -335,4 +369,4 @@
</div>
<!-- /.modal-dialog -->
</div>
{% endblock %}
{% endblock %}