* Etemplate: Add link icon overlay to link list

This commit is contained in:
nathan 2021-12-03 14:18:48 -07:00
parent 98882c3159
commit d126834468
5 changed files with 92 additions and 61 deletions

View File

@ -2145,7 +2145,8 @@ export class et2_link_list extends et2_link_string
download_url: _link_data.download_url, download_url: _link_data.download_url,
name: _link_data.title, name: _link_data.title,
mime: _link_data.type, mime: _link_data.type,
path: _link_data.icon path: _link_data.icon,
mode: _link_data.mode
}); });
icon.append(vfs_widget.getDOMNode()); icon.append(vfs_widget.getDOMNode());
} }

View File

@ -198,12 +198,18 @@ class Link extends Etemplate\Widget
$link['help'] = lang('Delete this file'); $link['help'] = lang('Delete this file');
$link['title'] = Api\Vfs::decodePath($link['title']); $link['title'] = Api\Vfs::decodePath($link['title']);
$link['icon'] = Api\Link::vfs_path($link['app2'],$link['id2'],$link['id'],true); $link['icon'] = Api\Link::vfs_path($link['app2'],$link['id2'],$link['id'],true);
$link['download_url'] = Api\Vfs::download_url($link['icon']); $link['download_url'] = Api\Vfs::download_url($link['icon']);
// Make links to directories load in filemanager // Make links to directories load in filemanager
if($link['type'] == Api\Vfs::DIR_MIME_TYPE) if($link['type'] == Api\Vfs::DIR_MIME_TYPE)
{ {
$link['target'] = 'filemanager'; $link['target'] = 'filemanager';
} }
else
{
$stat = Api\Vfs::lstat($link['icon']);
$link['mode'] = $stat['mode'];
}
} }
else else
{ {

View File

@ -2727,9 +2727,19 @@ span.et2_checkbox_slideSwitch.switchOn > span.slideSwitch_container a {
.et2_radiobox { .et2_radiobox {
margin-right: 10px; margin-right: 10px;
} }
.et2_radiobox[disabled] { .et2_radiobox[disabled] {
opacity: 0.5; opacity: 0.5;
} }
.overlayContainer {
position: absolute;
right: -2px;
bottom: -2px;
vertical-align: bottom;
text-align: right;
}
/** /**
* Do not wrap content of a single widget incl. a label or children of a hbox. * Do not wrap content of a single widget incl. a label or children of a hbox.
* Taking into eg. select-account widget rendered as ul and prefixed with a label * Taking into eg. select-account widget rendered as ul and prefixed with a label
@ -2738,6 +2748,7 @@ span.et2_checkbox_slideSwitch.switchOn > span.slideSwitch_container a {
.et2_nowrap { .et2_nowrap {
white-space: nowrap; white-space: nowrap;
} }
ul.et2_nowrap, div.et2_nowrap { ul.et2_nowrap, div.et2_nowrap {
display: inline-block; display: inline-block;
} }

View File

@ -4174,7 +4174,7 @@ td.message span.message {
* @version $Id: layout_table.less 3089 2014-06-11 14:02:57Z pixelegg $ * @version $Id: layout_table.less 3089 2014-06-11 14:02:57Z pixelegg $
*/ */
/*z.b. Dateimanager overlay*/ /*z.b. Dateimanager overlay*/
.egwGridView_grid span.iconOverlayContainer { span.iconOverlayContainer {
margin: 2px 5px 2px 2px; margin: 2px 5px 2px 2px;
position: relative; position: relative;
-moz-user-select: none; -moz-user-select: none;
@ -4183,20 +4183,23 @@ td.message span.message {
overflow: visible; overflow: visible;
display: inline-block; display: inline-block;
} }
.egwGridView_grid span.overlayContainer {
span.overlayContainer {
position: absolute; position: absolute;
right: -2px; right: -2px;
bottom: -2px; bottom: -2px;
vertical-align: bottom; vertical-align: bottom;
text-align: right; text-align: right;
} }
.egwGridView_grid span.iconContainer {
span.iconContainer {
display: inline-block; display: inline-block;
padding: 0; padding: 0;
margin: 0; margin: 0;
text-align: center; text-align: center;
} }
.egwGridView_grid span.overlayContainer img.overlay {
span.overlayContainer img.overlay {
position: relative; position: relative;
top: 1px; top: 1px;
margin: 0; margin: 0;
@ -4204,6 +4207,12 @@ td.message span.message {
height: 9px; height: 9px;
width: 11px; width: 11px;
} }
.et2_link_list span.overlayContainer img.overlay {
height: 9px !important;
width: 9px !important;
}
/** /**
* EGroupware: Stylite Pixelegg template * EGroupware: Stylite Pixelegg template
* *

View File

@ -17,7 +17,7 @@
/*z.b. Dateimanager overlay*/ /*z.b. Dateimanager overlay*/
.egwGridView_grid span.iconOverlayContainer { span.iconOverlayContainer {
margin: 2px 5px 2px 2px; margin: 2px 5px 2px 2px;
position: relative; position: relative;
-moz-user-select: none; -moz-user-select: none;
@ -27,7 +27,7 @@
display: inline-block; display: inline-block;
} }
.egwGridView_grid span.overlayContainer { span.overlayContainer {
position: absolute; position: absolute;
right: -2px; right: -2px;
bottom: -2px; bottom: -2px;
@ -35,19 +35,23 @@
text-align: right; text-align: right;
} }
.egwGridView_grid span.iconContainer { span.iconContainer {
display: inline-block; display: inline-block;
padding: 0; padding: 0;
margin: 0; margin: 0;
text-align: center; text-align: center;
} }
.egwGridView_grid span.overlayContainer img.overlay { span.overlayContainer img.overlay {
position: relative; position: relative;
top: 1px; top: 1px;
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 9px; height: 9px;
width: 11px; width: 11px;
}
.et2_link_list span.overlayContainer img.overlay {
height: 9px !important;
width: 9px !important;
} }