From 0edc5b2af65e41a247f373ffd206d8283b6cbc55 Mon Sep 17 00:00:00 2001 From: radhika Date: Tue, 1 Jul 2014 10:49:10 -0400 Subject: [PATCH] 3106: display spinner when modal dialogs are communicating with server. --- apps/workbench/app/assets/javascripts/application.js | 7 +++++++ apps/workbench/app/views/application/_choose.html.erb | 3 ++- apps/workbench/app/views/projects/_choose.html.erb | 3 ++- apps/workbench/app/views/users/_setup_popup.html.erb | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/workbench/app/assets/javascripts/application.js b/apps/workbench/app/assets/javascripts/application.js index 1ade33f0cc..d21c4b5625 100644 --- a/apps/workbench/app/assets/javascripts/application.js +++ b/apps/workbench/app/assets/javascripts/application.js @@ -29,6 +29,13 @@ jQuery(function($){ 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') } }); + + $(document).ajaxStart(function(){ + $('.modal-with-loading-spinner .spinner').show(); + }).ajaxStop(function(){ + $('.modal-with-loading-spinner .spinner').hide(); + }); + $('[data-toggle=tooltip]').tooltip(); $('.expand-collapse-row').on('click', function(event) { diff --git a/apps/workbench/app/views/application/_choose.html.erb b/apps/workbench/app/views/application/_choose.html.erb index fdd3d3c444..488863df4c 100644 --- a/apps/workbench/app/views/application/_choose.html.erb +++ b/apps/workbench/app/views/application/_choose.html.erb @@ -1,4 +1,4 @@ -