Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'nprogress' into 'master'
Browse files Browse the repository at this point in the history
Nprogress
  • Loading branch information
dzaporozhets committed Mar 21, 2014
2 parents 5e4101b + 3cd09fa commit c7050b0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ gem 'bootstrap-sass', '~> 3.0'
gem "font-awesome-rails", '~> 3.2'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'nprogress-rails'


group :development do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ GEM
mysql2 (0.3.14)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
nprogress-rails (0.1.2.3)
pg (0.17.0)
poltergeist (1.4.1)
capybara (~> 2.1.0)
Expand Down Expand Up @@ -339,6 +340,7 @@ DEPENDENCIES
letter_opener
minitest (= 4.3.2)
mysql2
nprogress-rails
pg
poltergeist
protected_attributes
Expand Down
10 changes: 2 additions & 8 deletions app/assets/javascripts/application.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#= require jquery_ujs
#= require turbolinks
#= require jquery.turbolinks
#= require nprogress
#= require nprogress-turbolinks
#= require_tree .
#
#
Expand All @@ -27,16 +29,8 @@ $(document).on 'click', '.edit-runner-link', ->
$(document).on 'click', '.assign-all-runner', ->
$(this).replaceWith('<i class="icon-refresh icon-spin"></i> Assign in progress..')

window.startSpinner = ->
$('.turbolink-spinner').fadeIn()

window.stopSpinner = ->
$('.turbolink-spinner').fadeOut()

window.unbindEvents = ->
$(document).unbind('scroll')
$(document).off('scroll')

document.addEventListener("page:fetch", startSpinner)
document.addEventListener("page:fetch", unbindEvents)
document.addEventListener("page:change", stopSpinner)
7 changes: 7 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,10 @@
@import "sections/projects.scss";
@import "sections/builds.scss";
@import "sections/login.scss";

/*
* NProgress
*/
$nprogress-color: #9BC;
@import 'nprogress';
@import 'nprogress-bootstrap';
4 changes: 2 additions & 2 deletions app/assets/stylesheets/main/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
*/
$primary_color: #2FA0BB;
$link_color: #3A89A3;
$style_color: #289;
$bg_style_color: #228899;
$style_color: #167;
$bg_style_color: #167;
$hover: #D9EDF7;
4 changes: 0 additions & 4 deletions app/views/layouts/_nav.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@
- else
%li
= link_to 'Login', new_user_sessions_path
.hidden-sm.hidden-xs
.hide.turbolink-spinner
%i.icon-refresh.icon-spin

0 comments on commit c7050b0

Please sign in to comment.