Commit d2dc0385 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'nprogress' into 'master'

Nprogress
parents 046773d6 c1fd25ce
...@@ -167,6 +167,7 @@ gem 'bootstrap-sass', '~> 3.0' ...@@ -167,6 +167,7 @@ gem 'bootstrap-sass', '~> 3.0'
gem "font-awesome-rails", '~> 3.2' gem "font-awesome-rails", '~> 3.2'
gem "gemoji", "~> 1.3.0" gem "gemoji", "~> 1.3.0"
gem "gon", '~> 5.0.0' gem "gon", '~> 5.0.0'
gem 'nprogress-rails'
group :development do group :development do
gem "annotate", "~> 2.6.0.beta2" gem "annotate", "~> 2.6.0.beta2"
......
...@@ -297,6 +297,7 @@ GEM ...@@ -297,6 +297,7 @@ GEM
net-ssh (>= 1.99.1) net-ssh (>= 1.99.1)
net-ssh (2.7.0) net-ssh (2.7.0)
nokogiri (1.5.10) nokogiri (1.5.10)
nprogress-rails (0.1.2.3)
oauth (0.4.7) oauth (0.4.7)
oauth2 (0.8.1) oauth2 (0.8.1)
faraday (~> 0.8) faraday (~> 0.8)
...@@ -621,6 +622,7 @@ DEPENDENCIES ...@@ -621,6 +622,7 @@ DEPENDENCIES
minitest (~> 4.7.0) minitest (~> 4.7.0)
modernizr (= 2.6.2) modernizr (= 2.6.2)
mysql2 mysql2
nprogress-rails
omniauth (~> 1.1.3) omniauth (~> 1.1.3)
omniauth-github omniauth-github
omniauth-google-oauth2 omniauth-google-oauth2
......
...@@ -29,3 +29,5 @@ ...@@ -29,3 +29,5 @@
//= require_tree . //= require_tree .
//= require d3 //= require d3
//= require underscore //= require underscore
//= require nprogress
//= require nprogress-turbolinks
...@@ -41,19 +41,11 @@ window.linkify = (str) -> ...@@ -41,19 +41,11 @@ window.linkify = (str) ->
window.simpleFormat = (str) -> window.simpleFormat = (str) ->
linkify(sanitize(str).replace(/\n/g, '<br />')) linkify(sanitize(str).replace(/\n/g, '<br />'))
window.startSpinner = ->
$('.turbolink-spinner').fadeIn()
window.stopSpinner = ->
$('.turbolink-spinner').fadeOut()
window.unbindEvents = -> window.unbindEvents = ->
$(document).unbind('scroll') $(document).unbind('scroll')
$(document).off('scroll') $(document).off('scroll')
document.addEventListener("page:fetch", startSpinner)
document.addEventListener("page:fetch", unbindEvents) document.addEventListener("page:fetch", unbindEvents)
document.addEventListener("page:change", stopSpinner)
$ -> $ ->
# Click a .one_click_select field, select the contents # Click a .one_click_select field, select the contents
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
*= require select2 *= require select2
*= require highlightjs.min *= require highlightjs.min
*= require_self *= require_self
*= require nprogress
*= require nprogress-bootstrap
*/ */
@import "main/variables.scss"; @import "main/variables.scss";
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
.navbar-collapse.collapse .navbar-collapse.collapse
%ul.nav.navbar-nav %ul.nav.navbar-nav
%li.hidden-sm.hidden-xs
%a
%div.hide.turbolink-spinner
%i.icon-refresh.icon-spin
%li.hidden-sm.hidden-xs %li.hidden-sm.hidden-xs
= render "layouts/search" = render "layouts/search"
%li.visible-sm.visible-xs %li.visible-sm.visible-xs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment