From 32d0374a5ae9645f5e0a37599a9b03e143147147 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Wed, 30 Apr 2014 21:29:45 -0400 Subject: [PATCH] ui: fix edit view breadcrumbs --- ui/javascripts/app/controllers.js | 3 ++- ui/javascripts/app/routes.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/javascripts/app/controllers.js b/ui/javascripts/app/controllers.js index bbca0bc566..02e9a65451 100644 --- a/ui/javascripts/app/controllers.js +++ b/ui/javascripts/app/controllers.js @@ -95,13 +95,14 @@ App.KvShowController.reopen({ data: newKey.get('Value') }).then(function(response) { controller.set('isLoading', false) + // transition to the right place - console.log(newKey.get('Key')); if (newKey.get('isFolder') == true) { controller.transitionToRoute('kv.show', newKey.get('urlSafeKey')); } else { controller.transitionToRoute('kv.edit', newKey.get('urlSafeKey')); } + // Reload the keys in the left column controller.get('keys').reload() }).fail(function(response) { diff --git a/ui/javascripts/app/routes.js b/ui/javascripts/app/routes.js index aaadfc19b0..cd05b30a34 100644 --- a/ui/javascripts/app/routes.js +++ b/ui/javascripts/app/routes.js @@ -174,6 +174,9 @@ App.KvEditRoute = App.BaseRoute.extend({ } }); + controller.set('parentKey', parentKey); + controller.set('grandParentKey', grandParentKey); + // If we don't have the cached model from our // the kv.show controller, we need to go get it, // otherwise we just load what we have.