Commit d2dc0385a22a1a16064557ad5d5b1b862dd1f948
Exists in
spb-stable
and in
3 other branches
Merge branch 'nprogress' into 'master'
Nprogress
Showing
6 changed files
with
7 additions
and
12 deletions
Show diff stats
Gemfile
| @@ -167,6 +167,7 @@ gem 'bootstrap-sass', '~> 3.0' | @@ -167,6 +167,7 @@ gem 'bootstrap-sass', '~> 3.0' | ||
| 167 | gem "font-awesome-rails", '~> 3.2' | 167 | gem "font-awesome-rails", '~> 3.2' |
| 168 | gem "gemoji", "~> 1.3.0" | 168 | gem "gemoji", "~> 1.3.0" |
| 169 | gem "gon", '~> 5.0.0' | 169 | gem "gon", '~> 5.0.0' |
| 170 | +gem 'nprogress-rails' | ||
| 170 | 171 | ||
| 171 | group :development do | 172 | group :development do |
| 172 | gem "annotate", "~> 2.6.0.beta2" | 173 | gem "annotate", "~> 2.6.0.beta2" |
Gemfile.lock
| @@ -297,6 +297,7 @@ GEM | @@ -297,6 +297,7 @@ GEM | ||
| 297 | net-ssh (>= 1.99.1) | 297 | net-ssh (>= 1.99.1) |
| 298 | net-ssh (2.7.0) | 298 | net-ssh (2.7.0) |
| 299 | nokogiri (1.5.10) | 299 | nokogiri (1.5.10) |
| 300 | + nprogress-rails (0.1.2.3) | ||
| 300 | oauth (0.4.7) | 301 | oauth (0.4.7) |
| 301 | oauth2 (0.8.1) | 302 | oauth2 (0.8.1) |
| 302 | faraday (~> 0.8) | 303 | faraday (~> 0.8) |
| @@ -621,6 +622,7 @@ DEPENDENCIES | @@ -621,6 +622,7 @@ DEPENDENCIES | ||
| 621 | minitest (~> 4.7.0) | 622 | minitest (~> 4.7.0) |
| 622 | modernizr (= 2.6.2) | 623 | modernizr (= 2.6.2) |
| 623 | mysql2 | 624 | mysql2 |
| 625 | + nprogress-rails | ||
| 624 | omniauth (~> 1.1.3) | 626 | omniauth (~> 1.1.3) |
| 625 | omniauth-github | 627 | omniauth-github |
| 626 | omniauth-google-oauth2 | 628 | omniauth-google-oauth2 |
app/assets/javascripts/application.js
app/assets/javascripts/main.js.coffee
| @@ -41,19 +41,11 @@ window.linkify = (str) -> | @@ -41,19 +41,11 @@ window.linkify = (str) -> | ||
| 41 | window.simpleFormat = (str) -> | 41 | window.simpleFormat = (str) -> |
| 42 | linkify(sanitize(str).replace(/\n/g, '<br />')) | 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 | window.unbindEvents = -> | 44 | window.unbindEvents = -> |
| 51 | $(document).unbind('scroll') | 45 | $(document).unbind('scroll') |
| 52 | $(document).off('scroll') | 46 | $(document).off('scroll') |
| 53 | 47 | ||
| 54 | -document.addEventListener("page:fetch", startSpinner) | ||
| 55 | document.addEventListener("page:fetch", unbindEvents) | 48 | document.addEventListener("page:fetch", unbindEvents) |
| 56 | -document.addEventListener("page:change", stopSpinner) | ||
| 57 | 49 | ||
| 58 | $ -> | 50 | $ -> |
| 59 | # Click a .one_click_select field, select the contents | 51 | # Click a .one_click_select field, select the contents |
app/assets/stylesheets/application.scss
| @@ -7,6 +7,8 @@ | @@ -7,6 +7,8 @@ | ||
| 7 | *= require select2 | 7 | *= require select2 |
| 8 | *= require highlightjs.min | 8 | *= require highlightjs.min |
| 9 | *= require_self | 9 | *= require_self |
| 10 | + *= require nprogress | ||
| 11 | + *= require nprogress-bootstrap | ||
| 10 | */ | 12 | */ |
| 11 | 13 | ||
| 12 | @import "main/variables.scss"; | 14 | @import "main/variables.scss"; |
app/views/layouts/_head_panel.html.haml
| @@ -15,10 +15,6 @@ | @@ -15,10 +15,6 @@ | ||
| 15 | .navbar-collapse.collapse | 15 | .navbar-collapse.collapse |
| 16 | %ul.nav.navbar-nav | 16 | %ul.nav.navbar-nav |
| 17 | %li.hidden-sm.hidden-xs | 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 | = render "layouts/search" | 18 | = render "layouts/search" |
| 23 | %li.visible-sm.visible-xs | 19 | %li.visible-sm.visible-xs |
| 24 | = link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do | 20 | = link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do |