From 08565d7d1ec40bf33254ac0cbe7d1e781c600977 Mon Sep 17 00:00:00 2001 From: Don Naegely Date: Tue, 7 Oct 2014 10:39:31 -0400 Subject: [PATCH] Fix case where navigating first to results page broke save columns button This was an issue of where the event handler was initialized in the workspace workflow. Formerly, the event handler was initialized in the initialize method but the ui elements aren't initialized yet at that point so we were trying to call 'show()' on a string(because ui elements are string still during initialize). By setting the event handler in onRender we can be sure that the ui elements have been initialized and the event handler will be valid. Signed-off-by: Don Naegely --- src/js/cilantro/ui/workflows/workspace.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/cilantro/ui/workflows/workspace.js b/src/js/cilantro/ui/workflows/workspace.js index 15e19414..aa492852 100644 --- a/src/js/cilantro/ui/workflows/workspace.js +++ b/src/js/cilantro/ui/workflows/workspace.js @@ -62,10 +62,6 @@ define([ this.on('router:unload', function() { this.ui.loadingOverlay.hide(); }); - - this.listenTo(this.data.view, 'request', function() { - this.ui.loadingOverlay.show(); - }); }, onRender: function() { @@ -119,6 +115,10 @@ define([ this.publicQueries.show(publicQueryView); } }); + + this.listenTo(this.data.view, 'request', function() { + this.ui.loadingOverlay.show(); + }); } });