Added button to go back to query list after visiting a query

This commit is contained in:
Rishabh Nambiar 2018-08-16 23:14:07 +05:30
parent 7e40e2b91e
commit a64ef6c6c7
3 changed files with 18 additions and 0 deletions

View File

@ -92,6 +92,12 @@ export default Ember.Controller.extend({
scrollTop() { scrollTop() {
window.scrollTo(0,0); window.scrollTo(0,0);
this.set('editing', false);
this.set('everEditing', false);
},
goBack() {
history.back();
}, },
resetParams() { resetParams() {

View File

@ -33,6 +33,9 @@
{{#if selectedItem}} {{#if selectedItem}}
{{#if editing}} {{#if editing}}
<div class="name"> <div class="name">
<div class="previous">
{{d-button action="goBack" icon="chevron-left" class="no-text btn-med"}}
</div>
{{text-field value=selectedItem.name}} {{text-field value=selectedItem.name}}
</div> </div>
<div class="desc"> <div class="desc">
@ -40,6 +43,9 @@
</div> </div>
{{else}} {{else}}
<div class="name"> <div class="name">
<div class="previous">
{{d-button action="goBack" icon="chevron-left" class="no-text btn-med"}}
</div>
<h2>{{selectedItem.name}}</h2> <h2>{{selectedItem.name}}</h2>
{{d-button action="editName" icon="pencil" class="no-text btn-small"}} {{d-button action="editName" icon="pencil" class="no-text btn-small"}}
</div> </div>

View File

@ -142,6 +142,12 @@
.name h2 { .name h2 {
display: inline-block; display: inline-block;
} }
.name .previous {
padding: 0.2em;
display: inline-block;
padding-right: 0.25em;
font-size: 1.2em;
}
.name input, .desc textarea { .name input, .desc textarea {
width: calc(100% - 10px); width: calc(100% - 10px);
} }