Merge pull request #14 from discourse/back_to_query_list
FEATURE: Added a button to go back to query list after visiting a query
This commit is contained in:
commit
a1dc982561
|
@ -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() {
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
{{#if selectedItem}}
|
||||
{{#if editing}}
|
||||
<div class="name">
|
||||
<div class="previous">
|
||||
{{d-button action="goBack" icon="chevron-left" class="no-text btn-med"}}
|
||||
</div>
|
||||
{{text-field value=selectedItem.name}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
|
@ -40,6 +43,9 @@
|
|||
</div>
|
||||
{{else}}
|
||||
<div class="name">
|
||||
<div class="previous">
|
||||
{{d-button action="goBack" icon="chevron-left" class="no-text btn-med"}}
|
||||
</div>
|
||||
<h2>{{selectedItem.name}}</h2>
|
||||
{{d-button action="editName" icon="pencil" class="no-text btn-small"}}
|
||||
</div>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue