I find the default action that opens files in a new window when double clicking on them rather ugly and useless.
Personally I would suggest making preview the default action for all supported files, but an option to be able to set it to edit or preview would be very useful.
Does any desktop file manager allow this?
I'm sure some do, most that I use edit by default, which is the most common action. Why has this been closed?
Oops! You are right.
Maybe add double click callback in next version
I was thinking of an option that allowed you to specify something like "window", "preview" or "edit". But a callback will work, as long as you make sure the internal API that opens files with the default window, preview pane and editor are exposed.
Thanks
Hey! We were trying to default preview on double click as well.
elfinder/js/elfinder.js beginning on line 1544
if (typeof(this.options.getFileCallback) == 'function' && this.commands.getfile) {
this.bind('dblclick', function(e) {
e.preventDefault();
//added code to make files preview on double click
self.exec('getfile').done(function(){
self.exec('quicklook');
});
// end additional code
self.exec('getfile').fail(function() {
self.exec('open');
});
});
How do you set the default double clicking action to download all file types instead of using the preview or edit modes?
To get back on the original topic, this makes quicklook the default on dblclick while stil opening directories...
$('#elfinder').elfinder({
url : 'php/connector.php',
handlers : {
dblclick : function(event, elfinderInstance) {
event.preventDefault();
elfinderInstance.exec('getfile')
.done(function() { elfinderInstance.exec('quicklook'); })
.fail(function() { elfinderInstance.exec('open'); });
}
},
getFileCallback : function(files, fm) {
return false;
},
commandsOptions : {
quicklook : {
width : 640, // Set default width/height voor quicklook
height : 480
}
}
});
Most helpful comment
To get back on the original topic, this makes quicklook the default on dblclick while stil opening directories...