parent
14a84f4a4f
commit
ea8761a50e
|
@ -92,7 +92,7 @@
|
|||
|
||||
<script type="text/x-handlebars" data-template-name="kv/show">
|
||||
<div class="row">
|
||||
<h4 class="breadcrumbs"><a href="" {{action 'linkToKey' grandParentKey }}>{{parentKey}}</a></h4>
|
||||
<h4 class="breadcrumbs"><a href="" {{action 'linkToKey' grandParentKey }}>{{parentKey}}</a> <a href="" {{action 'linkToKey' parentKey }}>+</a></h4>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@ -169,7 +169,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="row">
|
||||
<h4 class="breadcrumbs"><a href="" {{action 'linkToKey' grandParentKey }}>{{parentKey}}</a></h4>
|
||||
<h4 class="breadcrumbs"><a href="" {{action 'linkToKey' grandParentKey }}>{{parentKey}}</a> <a href="" {{action 'linkToKey' parentKey }}>+</a></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -42,7 +42,10 @@ App.BaseRoute = Ember.Route.extend({
|
|||
// Used to link to keys that are not objects,
|
||||
// like parents and grandParents
|
||||
linkToKey: function(key) {
|
||||
if (key.slice(-1) === '/' || key === this.rootKey) {
|
||||
if (key == "/") {
|
||||
this.transitionTo('kv.show', "")
|
||||
}
|
||||
else if (key.slice(-1) === '/' || key === this.rootKey) {
|
||||
this.transitionTo('kv.show', key)
|
||||
} else {
|
||||
this.transitionTo('kv.edit', key)
|
||||
|
|
Loading…
Reference in New Issue