mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
fix broken switch between list- and tile-view after change to bootstrap icons
This commit is contained in:
parent
94d6b365ea
commit
da4efca4ec
@ -952,12 +952,12 @@ export class filemanagerAPP extends EgwApp
|
|||||||
// Switch view based on button icon, since controller can get re-created
|
// Switch view based on button icon, since controller can get re-created
|
||||||
if(typeof view != 'string')
|
if(typeof view != 'string')
|
||||||
{
|
{
|
||||||
view = button_widget.image.split('list_')[1].replace('.svg', '');
|
view = button_widget.image.match(/\/(list|list_row)\.svg$/) ? et2_nextmatch_controller.VIEW_ROW : et2_nextmatch_controller.VIEW_TILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle button icon to the other view
|
// Toggle button icon to the other view
|
||||||
//todo: nm.controller needs to be changed to nm.getController after merging typescript branch into master
|
//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 = egw.image("list_" + (view == et2_nextmatch_controller.VIEW_ROW ? et2_nextmatch_controller.VIEW_TILE : et2_nextmatch_controller.VIEW_ROW));
|
||||||
|
|
||||||
button_widget.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'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user