Commit c1fd25ce6ed28ad19fe4928be018a189c06cc3d7
1 parent
046773d6
Exists in
spb-stable
and in
3 other branches
Replace turbolink spinner with nprogress
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
6 changed files
with
7 additions
and
12 deletions
Show diff stats
Gemfile
Gemfile.lock
... | ... | @@ -297,6 +297,7 @@ GEM |
297 | 297 | net-ssh (>= 1.99.1) |
298 | 298 | net-ssh (2.7.0) |
299 | 299 | nokogiri (1.5.10) |
300 | + nprogress-rails (0.1.2.3) | |
300 | 301 | oauth (0.4.7) |
301 | 302 | oauth2 (0.8.1) |
302 | 303 | faraday (~> 0.8) |
... | ... | @@ -621,6 +622,7 @@ DEPENDENCIES |
621 | 622 | minitest (~> 4.7.0) |
622 | 623 | modernizr (= 2.6.2) |
623 | 624 | mysql2 |
625 | + nprogress-rails | |
624 | 626 | omniauth (~> 1.1.3) |
625 | 627 | omniauth-github |
626 | 628 | omniauth-google-oauth2 | ... | ... |
app/assets/javascripts/application.js
app/assets/javascripts/main.js.coffee
... | ... | @@ -41,19 +41,11 @@ window.linkify = (str) -> |
41 | 41 | window.simpleFormat = (str) -> |
42 | 42 | linkify(sanitize(str).replace(/\n/g, '<br />')) |
43 | 43 | |
44 | -window.startSpinner = -> | |
45 | - $('.turbolink-spinner').fadeIn() | |
46 | - | |
47 | -window.stopSpinner = -> | |
48 | - $('.turbolink-spinner').fadeOut() | |
49 | - | |
50 | 44 | window.unbindEvents = -> |
51 | 45 | $(document).unbind('scroll') |
52 | 46 | $(document).off('scroll') |
53 | 47 | |
54 | -document.addEventListener("page:fetch", startSpinner) | |
55 | 48 | document.addEventListener("page:fetch", unbindEvents) |
56 | -document.addEventListener("page:change", stopSpinner) | |
57 | 49 | |
58 | 50 | $ -> |
59 | 51 | # Click a .one_click_select field, select the contents | ... | ... |
app/assets/stylesheets/application.scss
app/views/layouts/_head_panel.html.haml
... | ... | @@ -15,10 +15,6 @@ |
15 | 15 | .navbar-collapse.collapse |
16 | 16 | %ul.nav.navbar-nav |
17 | 17 | %li.hidden-sm.hidden-xs |
18 | - %a | |
19 | - %div.hide.turbolink-spinner | |
20 | - %i.icon-refresh.icon-spin | |
21 | - %li.hidden-sm.hidden-xs | |
22 | 18 | = render "layouts/search" |
23 | 19 | %li.visible-sm.visible-xs |
24 | 20 | = link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do | ... | ... |