8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / app / views / pipeline_instances / show.js.erb
1 <% self.formats = [:html] %>
2 var new_content = "<%= escape_javascript(render template: 'pipeline_instances/show') %>";
3 var selected_tab_hrefs = [];
4 if ($('div#page-wrapper').html() != new_content) {
5     $('.nav-tabs li.active a').each(function() {
6         selected_tab_hrefs.push($(this).attr('href'));
7     });
8
9     $('div#page-wrapper').html(new_content);
10
11     // Show the same tabs that were active before we rewrote page-wrapper
12     $.each(selected_tab_hrefs, function(i, href) {
13         $('.nav-tabs li a[href="' + href + '"]').tab('show');
14     });
15 }