Just update the job list if no modal is shown

Dominik Sander 10 年 前
コミット
85bcc6c7d0
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      app/assets/javascripts/worker-checker.js.coffee

+ 1 - 1
app/assets/javascripts/worker-checker.js.coffee

@@ -34,7 +34,7 @@ $ ->
34 34
           $("#event-indicator").tooltip('destroy').fadeOut()
35 35
 
36 36
         currentJobs = [json.pending, json.awaiting_retry, json.recent_failures]
37
-        if document.location.pathname == '/jobs' && previousJobs? && previousJobs.join(',') != currentJobs.join(',')
37
+        if document.location.pathname == '/jobs' && $(".modal[aria-hidden=false]").length == 0 && previousJobs? && previousJobs.join(',') != currentJobs.join(',')
38 38
           $.get '/jobs', (data) =>
39 39
             $("#main-content").html(data)
40 40
         previousJobs = currentJobs