diff options
Diffstat (limited to 'modules-available/runmode/templates')
-rw-r--r-- | modules-available/runmode/templates/machine-selector.html | 15 | ||||
-rw-r--r-- | modules-available/runmode/templates/module-machine-list.html | 2 |
2 files changed, 14 insertions, 3 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', }); }); diff --git a/modules-available/runmode/templates/module-machine-list.html b/modules-available/runmode/templates/module-machine-list.html index a749a4a7..45f574ef 100644 --- a/modules-available/runmode/templates/module-machine-list.html +++ b/modules-available/runmode/templates/module-machine-list.html @@ -3,7 +3,7 @@ <a href="?do={{module}}">{{modulename}}</a> </h2> -<form method="post" action="?do=runmode" onclick="return confirm('{{lang_confirmDelete}}')"> +<form method="post" action="?do=runmode" onsubmit="return confirm('{{lang_confirmDelete}}')"> <input type="hidden" name="token" value="{{token}}"> <input type="hidden" name="action" value="delete-machine"> <table class="table"> |