1 <% self.formats = [:html] %>
2 var new_content = "<%= escape_javascript(render template: 'pipeline_instances/show') %>";
3 var selected_tab_hrefs = [];
4 if ($('div.body-content').html() != new_content) {
5 $('.nav-tabs li.active a').each(function() {
6 selected_tab_hrefs.push($(this).attr('href'));
9 $('div.body-content').html(new_content);
11 // Show the same tabs that were active before we rewrote body-content
12 $.each(selected_tab_hrefs, function(i, href) {
13 $('.nav-tabs li a[href="' + href + '"]').tab('show');
16 $(document).trigger('ajax:complete');