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'));
9 $('div#page-wrapper').html(new_content);
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');