Merge branch 'master' into 3187-pipeline-instance-page
[arvados.git] / apps / workbench / app / assets / javascripts / tab_panes.js
index 2295cf6f6decfcd03e43f14ef8be872024aeb0a4..cca49b2799873211cfbfc636fea1be5ea13047e3 100644 (file)
@@ -81,3 +81,11 @@ $(document).on('arv:pane:reload', function(e) {
 $(document).on('arv-log-event arv:pane:reload:all', function() {
     $('.pane-anchor.loaded').trigger('arv:pane:reload');
 });
+
+// If there is a 'tab counts url' in the nav-tabs element then use it to get some javascript that will update them
+$(document).on('ready count-change', function() {
+    var tabCountsUrl = $('ul.nav-tabs').data('tab-counts-url');
+    if( tabCountsUrl && tabCountsUrl.length ) {
+        $.get( tabCountsUrl );
+    }
+});