diff --git a/Gemfile b/Gemfile index a14bb7f19..03b863840 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,8 @@ gem 'isikukood' gem 'bootstrap-sass', '~> 3.2.0.1' +gem 'nprogress-rails', '~> 0.1.3.1' + group :assets do # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem 'therubyracer', platforms: :ruby @@ -71,7 +73,7 @@ group :development, :test do gem 'capybara', '~> 2.4.1' # For feature testing # gem 'capybara-webkit', '1.2.0' # Webkit driver didn't work with turbolinks - gem 'phantomjs', require: 'phantomjs/poltergeist' + gem 'phantomjs', '~> 1.9.7.1', require: 'phantomjs/poltergeist' gem 'poltergeist', '~> 1.5.1' # We are using PhantomJS instead # For cleaning db in feature and epp tests diff --git a/Gemfile.lock b/Gemfile.lock index d24fe77af..94e268bdf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,6 +114,7 @@ GEM multi_json (1.10.1) nokogiri (1.6.2.1) mini_portile (= 0.6.0) + nprogress-rails (0.1.3.1) parser (2.2.0.pre.4) ast (>= 1.1, < 3.0) slop (~> 3.4, >= 3.4.5) @@ -254,8 +255,9 @@ DEPENDENCIES jbuilder (~> 2.0) jquery-rails nokogiri (~> 1.6.2.1) + nprogress-rails (~> 0.1.3.1) pg - phantomjs + phantomjs (~> 1.9.7.1) poltergeist (~> 1.5.1) pry (~> 0.10.1) pry-byebug (~> 1.3.3) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js deleted file mode 100644 index 6ef234e04..000000000 --- a/app/assets/javascripts/application.js +++ /dev/null @@ -1,17 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. -// -// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details -// about supported directives. -// -//= require jquery -//= require jquery_ujs -//= require turbolinks -//= require bootstrap-sprockets -//= require_tree . diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee new file mode 100644 index 000000000..46e077da0 --- /dev/null +++ b/app/assets/javascripts/application.js.coffee @@ -0,0 +1,10 @@ +#= require jquery +#= require jquery_ujs +#= require turbolinks +#= require bootstrap-sprockets +#= require nprogress +#= require nprogress-turbolinks +#= require_tree . + +NProgress.configure + showSpinner: false diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index baccee21b..88d17c1ad 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -1,2 +1,4 @@ @import "bootstrap-sprockets"; @import "bootstrap"; +@import "nprogress"; +@import "nprogress-bootstrap";