From 4fc6ddb9a4f446e2e7fe8b22e2a5b4bdd4c2122d Mon Sep 17 00:00:00 2001 From: Isaac Janzen Date: Thu, 5 May 2022 10:05:10 -0500 Subject: [PATCH] DEV: update routing to allow for open_in_new_tab --- .../javascripts/discourse/components/docs-topic-list.js | 9 --------- assets/javascripts/discourse/controllers/docs-index.js | 7 ------- assets/javascripts/discourse/templates/docs-index.hbs | 1 - .../javascripts/discourse/templates/docs-topic-link.hbr | 2 +- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/assets/javascripts/discourse/components/docs-topic-list.js b/assets/javascripts/discourse/components/docs-topic-list.js index 2829475e..55a6ebc5 100644 --- a/assets/javascripts/discourse/components/docs-topic-list.js +++ b/assets/javascripts/discourse/components/docs-topic-list.js @@ -15,15 +15,6 @@ export default Component.extend({ return order === "activity"; }, - // need to handle clicks here since links are in a raw view - click(e) { - if (e.target.classList.contains("docs-topic-link")) { - const topicId = e.target.dataset.topicId; - this.selectTopic(topicId); - return false; - } - }, - @action sortListActivity() { this.sortBy("activity"); diff --git a/assets/javascripts/discourse/controllers/docs-index.js b/assets/javascripts/discourse/controllers/docs-index.js index b78893c9..8bd1f03a 100644 --- a/assets/javascripts/discourse/controllers/docs-index.js +++ b/assets/javascripts/discourse/controllers/docs-index.js @@ -263,13 +263,6 @@ export default Controller.extend({ }); }, - @action - setSelectedTopic(topicId) { - this.set("selectedTopic", topicId); - - window.scrollTo(0, 0); - }, - @action onChangeFilterSolved(solvedFilter) { this.set("filterSolved", solvedFilter); diff --git a/assets/javascripts/discourse/templates/docs-index.hbs b/assets/javascripts/discourse/templates/docs-index.hbs index a5573e5b..f6dad444 100644 --- a/assets/javascripts/discourse/templates/docs-index.hbs +++ b/assets/javascripts/discourse/templates/docs-index.hbs @@ -117,7 +117,6 @@ ascending=ascending order=orderColumn sortBy=(action "sortBy") - selectTopic=(action "setSelectedTopic") loadMore=(action "loadMore") loading=isLoadingMore }} diff --git a/assets/javascripts/discourse/templates/docs-topic-link.hbr b/assets/javascripts/discourse/templates/docs-topic-link.hbr index dd823f26..a0e9a1c1 100644 --- a/assets/javascripts/discourse/templates/docs-topic-link.hbr +++ b/assets/javascripts/discourse/templates/docs-topic-link.hbr @@ -1 +1 @@ -{{{topic.fancyTitle}}} +{{{topic.fancyTitle}}}