From 11a3e9df90d16429737b2a3a523fd02ab5d97390 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 6 Mar 2020 11:52:15 +0100 Subject: [PATCH] Use getController to get controller private object --- filemanager/js/app.js | 6 +++--- filemanager/js/app.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/filemanager/js/app.js b/filemanager/js/app.js index bcf6e2b7f0..53af0f6df7 100644 --- a/filemanager/js/app.js +++ b/filemanager/js/app.js @@ -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); diff --git a/filemanager/js/app.ts b/filemanager/js/app.ts index 43842d65ab..bd2fc5a0e4 100644 --- a/filemanager/js/app.ts +++ b/filemanager/js/app.ts @@ -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