]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl tweak web restoration interface
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 18 Mar 2008 16:25:48 +0000 (16:25 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 18 Mar 2008 16:25:48 +0000 (16:25 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6625 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/cgi/bresto.pl
gui/bweb/html/bresto.js

index 60474c4cd885f3340aedaddac60384101849e9e3..1e09d60cd9a8b7e1d60f9cb5302e5488a2d752a0 100755 (executable)
@@ -928,7 +928,7 @@ SELECT DISTINCT ON (PathId, FilenameId) JobId, FileIndex
 print CGI::header('application/x-javascript');
 
 if ($action eq 'list_files') {
-    print "[";
+    print "[[0,0,0,0,'.',4096,'1970-01-01 00:00:00'],";
     my $files = $bvfs->ls_files();
 #      [ 1, 2, 3, "Bill",  10, '2007-01-01 00:00:00'],
 #   File.FilenameId, listfiles.id, listfiles.Name, File.LStat, File.JobId
index bab591ffc3c208cb7d1a52f071adeb2710268555..87f2b2858dff02dd6ed13802e84eff88525431f7 100644 (file)
@@ -198,7 +198,7 @@ function ext_init()
         enableDrag: true,
         enableDragDrop: true,
         selModel: new Ext.grid.RowSelectionModel(),
-        loadMask: true,
+               loadMask: true,
         autoSizeColumns: true,
         enableColLock:false
         
@@ -212,6 +212,9 @@ function ext_init()
 
     // TODO: selection only when using dblclick
     files_grid.selModel.on('rowselect', function(e,i,r) { 
+        if (r.json[4] == '.') {
+                       return true;
+               }
         Ext.brestore.filename = r.json[4];
         file_versions_store.load({params:init_params({action: 'list_versions',
                                                     vafv: Ext.brestore.option_vafv,
@@ -260,15 +263,15 @@ function ext_init()
            width:     100
         },{
            dataIndex: 'pathid',
-          header: 'PathId'
-//           hidden: true
+          header: 'PathId',
+           hidden: true
         },{
            dataIndex: 'filenameid',
            hidden: true
         },{
            dataIndex: 'fileid',
-          header: 'FileId'
-//           hidden: true
+          header: 'FileId',
+           hidden: true
         }
         ]);
 
@@ -354,7 +357,15 @@ function ext_init()
    file_selection_grid.on('notifyDrop', function(dd,e) { 
         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);
+                       }
+               } 
+       };
+   file_selection_grid.on('keypress', func1);
 ///////////////////////////////////////////////////////
 
   var file_versions_store = new Ext.data.Store({
@@ -515,6 +526,7 @@ function ext_init()
         triggerAction: 'all',
         emptyText:'Select a job...',
         selectOnFocus:true,
+               loadMask: true,
         forceSelection: true,
         width:350
     });