Commit 9c6739bfd4a52dd5195abaa30705a857b7d53973
1 parent
b264ce02
Exists in
master
and in
1 other branch
Added spinner for pjax notice pagination
Showing
4 changed files
with
13 additions
and
0 deletions
Show diff stats
app/views/errs/show.html.haml
@@ -45,6 +45,7 @@ | @@ -45,6 +45,7 @@ | ||
45 | 45 | ||
46 | = will_paginate @notices, :param_name => :notice, :page_links => false, :class => 'notice-pagination' | 46 | = will_paginate @notices, :param_name => :notice, :page_links => false, :class => 'notice-pagination' |
47 | viewing occurrence #{@notices.current_page} of #{@notices.total_pages} | 47 | viewing occurrence #{@notices.current_page} of #{@notices.total_pages} |
48 | +.notice-pagination-loader= image_tag 'loader.gif' | ||
48 | 49 | ||
49 | .tab-bar | 50 | .tab-bar |
50 | %ul | 51 | %ul |
1.7 KB
public/javascripts/application.js
@@ -37,6 +37,7 @@ $(function() { | @@ -37,6 +37,7 @@ $(function() { | ||
37 | $('.notice-pagination').each(function() { | 37 | $('.notice-pagination').each(function() { |
38 | $('.notice-pagination a').pjax('#content', { timeout: 2000}); | 38 | $('.notice-pagination a').pjax('#content', { timeout: 2000}); |
39 | $('#content').bind('pjax:start', function() { | 39 | $('#content').bind('pjax:start', function() { |
40 | + $('.notice-pagination-loader').css("visibility", "visible"); | ||
40 | currentTab = $('.tab-bar ul li a.button.active').attr('rel'); | 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,6 +462,7 @@ pre { | ||
462 | font-weight: bold; | 462 | font-weight: bold; |
463 | } | 463 | } |
464 | 464 | ||
465 | + | ||
465 | /* Buttons */ | 466 | /* Buttons */ |
466 | input[type="submit"].button, | 467 | input[type="submit"].button, |
467 | a.button { | 468 | a.button { |
@@ -674,8 +675,18 @@ table.deploys td.when { | @@ -674,8 +675,18 @@ table.deploys td.when { | ||
674 | /* Notices Pagination */ | 675 | /* Notices Pagination */ |
675 | .notice-pagination { | 676 | .notice-pagination { |
676 | float: left; | 677 | float: left; |
678 | + margin-right: 10px; | ||
679 | +} | ||
680 | + | ||
681 | +.notice-pagination-loader { | ||
682 | + visibility: hidden; | ||
683 | + float: left; | ||
677 | margin-right: 2em; | 684 | margin-right: 2em; |
678 | } | 685 | } |
686 | +.notice-pagination-loader img { | ||
687 | + vertical-align: middle | ||
688 | +} | ||
689 | + | ||
679 | 690 | ||
680 | /* Backtrace */ | 691 | /* Backtrace */ |
681 | .window { | 692 | .window { |