Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / pipeline_instances / show.js.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% self.formats = [:html] %>
6 var new_content = "<%= escape_javascript(render template: 'pipeline_instances/show') %>";
7 var selected_tab_hrefs = [];
8 if ($('div#page-wrapper').html() != new_content) {
9     $('.nav-tabs li.active a').each(function() {
10         selected_tab_hrefs.push($(this).attr('href'));
11     });
12
13     $('div#page-wrapper').html(new_content);
14
15     // Show the same tabs that were active before we rewrote page-wrapper
16     $.each(selected_tab_hrefs, function(i, href) {
17         $('.nav-tabs li a[href="' + href + '"]').tab('show');
18     });
19 }