Use getController to get controller private object

This commit is contained in:
Hadi Nategh 2020-03-06 11:52:15 +01:00
parent aa87e60f10
commit 11a3e9df90
2 changed files with 6 additions and 6 deletions

View File

@ -609,14 +609,14 @@ var filemanagerAPP = /** @class */ (function (_super) {
}
// 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.set_image("list_" + (view == nm.controller.VIEW_ROW ? nm.controller.VIEW_TILE : nm.controller.VIEW_ROW));
button_widget.set_statustext(view == nm.controller.VIEW_ROW ? this.egw.lang("Tile view") : this.egw.lang('List view'));
button_widget.set_image("list_" + (view == nm.getController().VIEW_ROW ? nm.getController().VIEW_TILE : nm.getController().VIEW_ROW));
button_widget.set_statustext(view == nm.getController().VIEW_ROW ? this.egw.lang("Tile view") : this.egw.lang('List view'));
}
nm.set_view(view);
// Put it into active filters (but don't refresh)
nm.activeFilters["view"] = view;
// Change template to match
var template = view == nm.controller.VIEW_ROW ? 'filemanager.index.rows' : 'filemanager.tile';
var template = view == nm.getController().VIEW_ROW ? 'filemanager.index.rows' : 'filemanager.tile';
nm.set_template(template);
// Wait for template to load, then refresh
template = nm.getWidgetById(template);

View File

@ -736,9 +736,9 @@ export class filemanagerAPP extends EgwApp
// 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.set_image("list_"+(view == nm.controller.VIEW_ROW ? nm.controller.VIEW_TILE : nm.controller.VIEW_ROW));
button_widget.set_image("list_"+(view == nm.getController().VIEW_ROW ? nm.getController().VIEW_TILE : nm.getController().VIEW_ROW));
button_widget.set_statustext(view == nm.controller.VIEW_ROW ? this.egw.lang("Tile view") : this.egw.lang('List view'));
button_widget.set_statustext(view == nm.getController().VIEW_ROW ? this.egw.lang("Tile view") : this.egw.lang('List view'));
}
nm.set_view(view);
@ -746,7 +746,7 @@ export class filemanagerAPP extends EgwApp
nm.activeFilters["view"]= view;
// Change template to match
let template : any = view == nm.controller.VIEW_ROW ? 'filemanager.index.rows' : 'filemanager.tile';
let template : any = view == nm.getController().VIEW_ROW ? 'filemanager.index.rows' : 'filemanager.tile';
nm.set_template(template);
// Wait for template to load, then refresh