Просмотр исходного кода

Show loading on queries page when still loading

Andrew Kane 9 лет назад
Родитель
Сommit
43b568b97a
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      app/views/blazer/queries/home.html.erb

+ 5 - 1
app/views/blazer/queries/home.html.erb

@@ -43,7 +43,11 @@
 </script>
 
 <% if @queries.size == 1000 %>
+  <p id="loading" class="text-muted">Loading...</p>
   <script>
-    $(".list").load("<%= queries_path %>", updateList);
+    $(".list").load("<%= queries_path %>", function () {
+      updateList();
+      $("#loading").remove();
+    });
   </script>
 <% end %>