From 23d8c6fc0c3b031aa081ee1a245f9b0792514fd3 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 28 Nov 2017 16:41:33 +0100 Subject: [statistics] Introduce state column to get rid of complicated state determination This also adds support for the STANDBY state --- modules-available/runmode/templates/machine-selector.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'modules-available/runmode/templates/machine-selector.html') 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', }); }); -- cgit v1.2.3-55-g7522