Fix filemanager tile view

- Button callback was skipping bits due to webcomponent change.
- Timing differences mean we really do need to set size in CSS now.
This commit is contained in:
nathan 2022-05-09 10:04:00 -06:00
parent 66ee3687b6
commit d8119802ed
4 changed files with 17 additions and 13 deletions

View File

@ -806,19 +806,19 @@ export class filemanagerAPP extends EgwApp
{
button_widget = (<et2_nextmatch><unknown>nm).getWidgetById('button[change_view]');
}
if(button_widget && button_widget.type === "buttononly")
if(button_widget)
{
// Switch view based on button icon, since controller can get re-created
if(typeof view != 'string')
{
view = button_widget.image.split('list_')[1].replace('.svg','');
view = button_widget.image.split('list_')[1].replace('.svg', '');
}
// Toggle button icon to the other view
//todo: nm.controller needs to be changed to nm.getController after merging typescript branch into master
button_widget.image = ("list_"+(view == et2_nextmatch_controller.VIEW_ROW ? et2_nextmatch_controller.VIEW_TILE : et2_nextmatch_controller.VIEW_ROW));
button_widget.image = ("list_" + (view == et2_nextmatch_controller.VIEW_ROW ? et2_nextmatch_controller.VIEW_TILE : et2_nextmatch_controller.VIEW_ROW));
button_widget.set_statustext(view == et2_nextmatch_controller.VIEW_ROW ? this.egw.lang("Tile view") : this.egw.lang('List view'));
button_widget.statustext = (view == et2_nextmatch_controller.VIEW_ROW ? this.egw.lang("Tile view") : this.egw.lang('List view'));
}
nm.set_view(view);

View File

@ -41,10 +41,12 @@ input#filemanager-index_path {
/**
* Tile view
table.egwGridView_grid .tile .file_tile {
height: 150px;
}
*/
table.egwGridView_grid .tile .file_tile {
height: 100px;
width: 135px;
}
.egwGridView_grid .tile span.iconOverlayContainer {
display: block;
max-width: 140px;

View File

@ -62,10 +62,11 @@ input#filemanager-index_path {
}
/**
* Tile view
table.egwGridView_grid .tile .file_tile {
height: 150px;
}
*/
table.egwGridView_grid .tile .file_tile {
height: 100px;
width: 135px;
}
.egwGridView_grid .tile span.iconOverlayContainer {
display: block;
max-width: 140px;

View File

@ -50,10 +50,11 @@ input#filemanager-index_path {
}
/**
* Tile view
table.egwGridView_grid .tile .file_tile {
height: 150px;
}
*/
table.egwGridView_grid .tile .file_tile {
height: 100px;
width: 135px;
}
.egwGridView_grid .tile span.iconOverlayContainer {
display: block;
max-width: 140px;