From e85aab4b33d9e0e97ec226db468816e42258e0a1 Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Wed, 11 Aug 2021 14:13:39 +0400 Subject: [PATCH] FIX: the back button (#130) Back button wasn't working when running in Ember CLI. This PR fixes it by doing the transition to the same route but without URL parameter properly. This works in both our environments (legacy-3.12.0, and ember-cli-3.15.0). --- .../discourse/controllers/admin-plugins-explorer.js.es6 | 3 +-- .../discourse/routes/admin-plugins-explorer.js.es6 | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index 900c001..a276816 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -155,8 +155,7 @@ export default Ember.Controller.extend({ selectedQueryId: null, sortBy: ["last_run_at:desc"], }); - this.send("refreshModel"); - this.transitionToRoute("adminPlugins.explorer"); + this.transitionToRoute({ queryParams: { id: null } }); }, showHelpModal() { diff --git a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 index 78f95e2..f6bf357 100644 --- a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 @@ -40,11 +40,4 @@ export default DiscourseRoute.extend({ setupController(controller, model) { controller.setProperties(model); }, - - actions: { - refreshModel() { - this.refresh(); - return false; - }, - }, });