From: Eric Bollengier Date: Thu, 26 Jun 2008 14:42:42 +0000 (+0000) Subject: ebl Permit to delete items from selection with delete key X-Git-Tag: Release-3.0.0~1228 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9d833ba7654f164121a7c02f277df9dfc362bff3;p=bacula%2Fbacula ebl Permit to delete items from selection with delete key git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7239 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/html/bresto.js b/gui/bweb/html/bresto.js index 87f2b2858d..fc2661e76a 100644 --- a/gui/bweb/html/bresto.js +++ b/gui/bweb/html/bresto.js @@ -352,19 +352,21 @@ function ext_init() }}); file_selection_grid.on('enddrag', function(dd,e) { - alert(e) ; return true; + alert('enddrag'); alert(e) ; return true; }); file_selection_grid.on('notifyDrop', function(dd,e) { - alert(e) ; return true; + alert('notifyDrop'); alert(e) ; return true; }); func1 = function(e,b,c) { - if (e.browserEvent.keyCode == 46) { - for (elt in file_selection_grid.getSelectionModel().getSelections()) { - alert(elt); -// file_selection_store.remove(elt); - } - } - }; + if (e.browserEvent.keyCode == 46) { + var m = file_selection_grid.getSelections(); + if(m.length > 0) { + for(var i = 0, len = m.length; i < len; i++){ + file_selection_store.remove(m[i]); + } + } + } + }; file_selection_grid.on('keypress', func1); ///////////////////////////////////////////////////////