mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
fix "No appropriate target application" error when trying to open a directory in filemanager with a double click
caused by et2-image href attribute being set to the row-id / vfs-path and causing et2-image click handler to call egw.open_link with the vfs-path as url overwriting _handleClick now for et2-vfs-mime to only call expose, but never the parent (et2-image) _handleClick, so action-system get a chance to handle it
This commit is contained in:
parent
d9c28d5a1e
commit
d0494ce286
@ -81,6 +81,12 @@ export class Et2VfsMime extends Et2ImageExpose
|
||||
*/
|
||||
isExposable() : boolean
|
||||
{
|
||||
// do not try to expose directories, they are handled by the action system
|
||||
if (this.exposeValue.mime === Et2VfsMime.DIR_MIME_TYPE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
let gallery = super.isExposable();
|
||||
|
||||
// @ts-ignore Wants an argument, but does not require it
|
||||
@ -93,6 +99,21 @@ export class Et2VfsMime extends Et2ImageExpose
|
||||
return gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override et2-image click-handler, to not call egw.open_link with href=<vfs-path>
|
||||
*
|
||||
* @param {MouseEvent} _ev
|
||||
* @returns {boolean}
|
||||
*/
|
||||
_handleClick(_ev : MouseEvent) : boolean
|
||||
{
|
||||
if(this.isExposable())
|
||||
{
|
||||
this.expose_onclick(_ev);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some files cannot be opened in gallery, but we still want to do something with them
|
||||
* Editable files we open on click.
|
||||
|
Loading…
Reference in New Issue
Block a user