X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9e3bb9b984ff700fc3455f87437a8f1ac5841f0e..ab874e9d6cd3313ce827dc4d4d574913575ad095:/apps/workbench/app/views/pipeline_instances/show.js.erb diff --git a/apps/workbench/app/views/pipeline_instances/show.js.erb b/apps/workbench/app/views/pipeline_instances/show.js.erb index 9460f0bc9d..8ab1e8f68f 100644 --- a/apps/workbench/app/views/pipeline_instances/show.js.erb +++ b/apps/workbench/app/views/pipeline_instances/show.js.erb @@ -1,3 +1,15 @@ -var new_content = "<%= escape_javascript(render template: 'pipeline_instances/show.html') %>"; -if ($('div.body-content').html() != new_content) - $('div.body-content').html(new_content); +<% self.formats = [:html] %> +var new_content = "<%= escape_javascript(render template: 'pipeline_instances/show') %>"; +var selected_tab_hrefs = []; +if ($('div#page-wrapper').html() != new_content) { + $('.nav-tabs li.active a').each(function() { + selected_tab_hrefs.push($(this).attr('href')); + }); + + $('div#page-wrapper').html(new_content); + + // Show the same tabs that were active before we rewrote page-wrapper + $.each(selected_tab_hrefs, function(i, href) { + $('.nav-tabs li a[href="' + href + '"]').tab('show'); + }); +}