From a64ef6c6c7e9c724c32c81949a1c3e22a7b048c2 Mon Sep 17 00:00:00 2001 From: Rishabh Nambiar <5862206+rishabhnambiar@users.noreply.github.com> Date: Thu, 16 Aug 2018 23:14:07 +0530 Subject: [PATCH] Added button to go back to query list after visiting a query --- .../discourse/controllers/admin-plugins-explorer.js.es6 | 6 ++++++ .../discourse/templates/admin/plugins-explorer.hbs | 6 ++++++ assets/stylesheets/explorer.scss | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index e3db48f..a5e00e3 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -92,6 +92,12 @@ export default Ember.Controller.extend({ scrollTop() { window.scrollTo(0,0); + this.set('editing', false); + this.set('everEditing', false); + }, + + goBack() { + history.back(); }, resetParams() { diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index 47cb510..7148f09 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -33,6 +33,9 @@ {{#if selectedItem}} {{#if editing}}
+ {{text-field value=selectedItem.name}}
@@ -40,6 +43,9 @@
{{else}}
+

{{selectedItem.name}}

{{d-button action="editName" icon="pencil" class="no-text btn-small"}}
diff --git a/assets/stylesheets/explorer.scss b/assets/stylesheets/explorer.scss index 08f2c67..336b8b2 100644 --- a/assets/stylesheets/explorer.scss +++ b/assets/stylesheets/explorer.scss @@ -142,6 +142,12 @@ .name h2 { display: inline-block; } + .name .previous { + padding: 0.2em; + display: inline-block; + padding-right: 0.25em; + font-size: 1.2em; + } .name input, .desc textarea { width: calc(100% - 10px); }