diff options
author | Simon Rettberg | 2017-12-01 13:42:04 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-12-01 13:42:04 +0100 |
commit | 5393703f6e1485ddff94a50f63bcdd216ab629f4 (patch) | |
tree | ce2db7130302bd4fb78b170e1fbd75496a1b4510 /modules-available/runmode/templates/machine-selector.html | |
parent | Merge remote-tracking branch 'origin/permission-manager' into permission-manager (diff) | |
parent | [roomplanner] Sort already placed machines to the bottom (diff) | |
download | slx-admin-5393703f6e1485ddff94a50f63bcdd216ab629f4.tar.gz slx-admin-5393703f6e1485ddff94a50f63bcdd216ab629f4.tar.xz slx-admin-5393703f6e1485ddff94a50f63bcdd216ab629f4.zip |
Merge branch 'master' into permission-manager
Diffstat (limited to 'modules-available/runmode/templates/machine-selector.html')
-rw-r--r-- | modules-available/runmode/templates/machine-selector.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/modules-available/runmode/templates/machine-selector.html b/modules-available/runmode/templates/machine-selector.html index d3ff7378..7f37f5a2 100644 --- a/modules-available/runmode/templates/machine-selector.html +++ b/modules-available/runmode/templates/machine-selector.html @@ -108,11 +108,22 @@ function renderMachineSelected(item, escape) { } document.addEventListener('DOMContentLoaded', function () { + Selectize.define("no_bs", function (options) { + var original = this.deleteSelection; + this.deleteSelection = (function() { + return function (e) { + if (!e || e.keyCode !== 8) { + return original.apply(this, arguments); + } + return false; + }; + })(); + }); var old = {{{machines}}} || []; var $box = $('#machine-sel').selectize({ options: old, items: old.map(function(x) { return x.machineuuid; }), - plugins: ["remove_button"], + plugins: ["remove_button", "no_bs"], valueField: 'machineuuid', searchField: "combined", openOnFocus: false, @@ -121,7 +132,7 @@ document.addEventListener('DOMContentLoaded', function () { load: loadMachines, maxItems: null, sortField: 'hostname', - sortDirection: 'asc' + sortDirection: 'asc', }); }); |