Merge branch 'master' into 1971-show-image-thumbnails
[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.body-content').html() != new_content) {
5     $('.nav-tabs li.active a').each(function() {
6         selected_tab_hrefs.push($(this).attr('href'));
7     });
8
9     $('div.body-content').html(new_content);
10
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');
14     });
15 }
16 $(document).trigger('ajax:complete');