From 5a75b6c1e1b4295343a3f8da50ec858a19b6b59f Mon Sep 17 00:00:00 2001 From: Rishabh Nambiar <5862206+rishabhnambiar@users.noreply.github.com> Date: Thu, 30 Aug 2018 21:08:12 +0530 Subject: [PATCH] FIX: Fix ESLint issues and use d-icon instead of tags --- .../discourse/controllers/admin-plugins-explorer.js.es6 | 9 +++++---- .../discourse/templates/admin/plugins-explorer.hbs | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index b5625ff..613577a 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -120,11 +120,12 @@ export default Ember.Controller.extend({ }, sortByProperty(property) { - if (this.sortBy == `${property}:desc`){ - this.set('sortBy', [`${property}:asc`]);} - else { + if (this.sortBy[0] === `${property}:desc`) { + this.set('sortBy', [`${property}:asc`]); + } else { this.set('sortBy', [`${property}:desc`]); - }}, + } + }, create() { const name = this.get("newQueryName").trim(); diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index 3f06a02..ccc3129 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -148,15 +148,15 @@
- + {{d-icon "sort"}} {{i18n 'explorer.query_name'}} - + {{d-icon "sort"}} {{i18n 'explorer.query_user'}} - + {{d-icon "sort"}} {{i18n 'explorer.query_time'}}