Commit 9c6739bfd4a52dd5195abaa30705a857b7d53973

Authored by Nathan Broadbent
1 parent b264ce02
Exists in master and in 1 other branch production

Added spinner for pjax notice pagination

app/views/errs/show.html.haml
... ... @@ -45,6 +45,7 @@
45 45  
46 46 = will_paginate @notices, :param_name => :notice, :page_links => false, :class => 'notice-pagination'
47 47 viewing occurrence #{@notices.current_page} of #{@notices.total_pages}
  48 +.notice-pagination-loader= image_tag 'loader.gif'
48 49  
49 50 .tab-bar
50 51 %ul
... ...
public/images/loader.gif 0 → 100644

1.7 KB

public/javascripts/application.js
... ... @@ -37,6 +37,7 @@ $(function() {
37 37 $('.notice-pagination').each(function() {
38 38 $('.notice-pagination a').pjax('#content', { timeout: 2000});
39 39 $('#content').bind('pjax:start', function() {
  40 + $('.notice-pagination-loader').css("visibility", "visible");
40 41 currentTab = $('.tab-bar ul li a.button.active').attr('rel');
41 42 });
42 43  
... ...
public/stylesheets/application.css
... ... @@ -462,6 +462,7 @@ pre {
462 462 font-weight: bold;
463 463 }
464 464  
  465 +
465 466 /* Buttons */
466 467 input[type="submit"].button,
467 468 a.button {
... ... @@ -674,8 +675,18 @@ table.deploys td.when {
674 675 /* Notices Pagination */
675 676 .notice-pagination {
676 677 float: left;
  678 + margin-right: 10px;
  679 +}
  680 +
  681 +.notice-pagination-loader {
  682 + visibility: hidden;
  683 + float: left;
677 684 margin-right: 2em;
678 685 }
  686 +.notice-pagination-loader img {
  687 + vertical-align: middle
  688 +}
  689 +
679 690  
680 691 /* Backtrace */
681 692 .window {
... ...