Revert modifications to getParentAndGrandparent

This commit is contained in:
William Tisäter 2014-05-05 02:21:40 +02:00 committed by William Tisäter
parent 14649c1398
commit 21ad67fc4f

View file

@ -19,11 +19,7 @@ App.BaseRoute = Ember.Route.extend({
grandParentKey = parts.join("/") + "/"; grandParentKey = parts.join("/") + "/";
} }
return { return {grandParent: grandParentKey, parent: parentKey}
parent: parentKey,
grandParent: grandParentKey,
isRoot: parentKey === '/'
}
}, },
removeDuplicateKeys: function(keys, matcher) { removeDuplicateKeys: function(keys, matcher) {
@ -135,7 +131,7 @@ App.KvShowRoute = App.BaseRoute.extend({
controller.set('content', models.keys); controller.set('content', models.keys);
controller.set('parentKey', parentKeys.parent); controller.set('parentKey', parentKeys.parent);
controller.set('grandParentKey', parentKeys.grandParent); controller.set('grandParentKey', parentKeys.grandParent);
controller.set('isRoot', parentKeys.isRoot); controller.set('isRoot', parentKeys.parent === '/');
controller.set('newKey', App.Key.create()); controller.set('newKey', App.Key.create());
} }
}); });