]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Permit to delete items from selection with delete key
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 26 Jun 2008 14:42:42 +0000 (14:42 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 26 Jun 2008 14:42:42 +0000 (14:42 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7239 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/html/bresto.js

index 87f2b2858dff02dd6ed13802e84eff88525431f7..fc2661e76aa13ebb5b59d7cdd985d2fe8dc454db 100644 (file)
@@ -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);
 ///////////////////////////////////////////////////////