* Filemanager: tile view show filename and comment on hover

(cherry picked from commit cc49f0286d)
This commit is contained in:
milan 2025-02-12 12:57:57 +01:00
parent da3a4fa0c0
commit 415dc49f91
4 changed files with 8 additions and 4 deletions

View File

@ -115,7 +115,7 @@ export class Et2Box extends Et2Widget(LitElement) implements et2_IDetachedDOM
*/
getDetachedAttributes(_attrs)
{
_attrs.push('data', 'onclick');
_attrs.push('data', 'onclick', 'statustext');
}
getDetachedNodes()

View File

@ -1050,7 +1050,8 @@ class filemanager_ui
foreach(Vfs::find(!empty($query['col_filter']['dir']) ? $query['col_filter']['dir'] : $query['path'],$vfs_options,true) as $path => $row)
{
//echo $path; _debug_array($row);
// add a title to display as tooltip containing name and comment
$row['title'] = lang("name").": ".$row['name'];
$dir = dirname($path);
if (!isset($dir_is_writable[$dir]))
{
@ -1131,6 +1132,8 @@ class filemanager_ui
{
if (!$all_cfs && $prop['name'][0] == '#' && !in_array($prop['name'],$cols_to_show)) continue;
$row[$prop['name']] = strlen($prop['val']) < 64 ? $prop['val'] : substr($prop['val'],0,64).' ...';
//Update the title attribute to include the comment
$row['title'] .= "\n\n".lang("comment").": ".$row['comment'];
}
}
}

View File

@ -66,6 +66,7 @@ table.egwGridView_grid .tile .file_tile {
height: 100px;
width: 135px;
word-break: break-all;
overflow: hidden;
}
table.egwGridView_grid .tile .file_tile et2-vfs-mime {width: 4em; margin: 0 auto;}

View File

@ -18,10 +18,10 @@
<nextmatch-header/>
</row>
<row class="tile $row_cont[class]">
<et2-vbox class="file_tile" width="135px" height="110px" data="mime:$row_cont[mime]">
<et2-vbox class="file_tile" width="135px" height="110px" data="mime:$row_cont[mime]" statustext="${row_cont}[title]">
<et2-vfs-mime align="center" id="$row" thumbMimeSize="image,128"></et2-vfs-mime>
<vfs-name id="${row}[name]" no_lang="1" readonly="true"/>
<et2-description id="${row}[comment]"></et2-description>
<!-- <et2-description id="${row}[comment]"></et2-description>-->
</et2-vbox>
</row>
</rows>