From e24250f64066212fe90c94d9d568653dbd4c85b4 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 18 Mar 2008 16:25:48 +0000 Subject: [PATCH] ebl tweak web restoration interface git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6625 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/cgi/bresto.pl | 2 +- gui/bweb/html/bresto.js | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/gui/bweb/cgi/bresto.pl b/gui/bweb/cgi/bresto.pl index 60474c4cd8..1e09d60cd9 100755 --- a/gui/bweb/cgi/bresto.pl +++ b/gui/bweb/cgi/bresto.pl @@ -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 diff --git a/gui/bweb/html/bresto.js b/gui/bweb/html/bresto.js index bab591ffc3..87f2b2858d 100644 --- a/gui/bweb/html/bresto.js +++ b/gui/bweb/html/bresto.js @@ -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 }); -- 2.39.5