FIX: Ensure that back button always redirects to index page

This commit is contained in:
Rishabh Nambiar 2018-08-17 15:30:07 +05:30
parent a1dc982561
commit 86a4957bd1
2 changed files with 5 additions and 4 deletions

View File

@ -96,8 +96,9 @@ export default Ember.Controller.extend({
this.set('everEditing', false);
},
goBack() {
history.back();
goHome() {
this.set('selectedQueryId', null);
this.transitionToRoute('adminPlugins.explorer');
},
resetParams() {

View File

@ -34,7 +34,7 @@
{{#if editing}}
<div class="name">
<div class="previous">
{{d-button action="goBack" icon="chevron-left" class="no-text btn-med"}}
{{d-button action="goHome" icon="chevron-left" class="no-text btn-med"}}
</div>
{{text-field value=selectedItem.name}}
</div>
@ -44,7 +44,7 @@
{{else}}
<div class="name">
<div class="previous">
{{d-button action="goBack" icon="chevron-left" class="no-text btn-med"}}
{{d-button action="goHome" icon="chevron-left" class="no-text btn-med"}}
</div>
<h2>{{selectedItem.name}}</h2>
{{d-button action="editName" icon="pencil" class="no-text btn-small"}}