Skip to content

Commit

Permalink
Merge branch 'dev' into display_puppet_scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisma committed Apr 5, 2019
2 parents f70ddb6 + ba6dee9 commit e51a309
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ gem 'omniauth_openid_connect' # https://github.com/m0n9oose/omniauth_openid_conn
gem 'pundit' # https://github.com/varvet/pundit
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false # https://github.com/Shopify/bootsnap
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2' # https://github.com/rails/coffee-rails
# Build JSON APIs with ease.
gem 'jbuilder', '~> 2.5' # https://github.com/rails/jbuilder
# Use Redis adapter to run Action Cable in production
Expand Down
8 changes: 0 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ GEM
xpath (~> 3.2)
clipboard-rails (1.7.1)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.4)
coveralls (0.8.22)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -409,7 +402,6 @@ DEPENDENCIES
byebug
capybara (>= 2.15)
clipboard-rails
coffee-rails (~> 4.2)
coveralls
devise
devise-bootstrap-views (~> 1.0)
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 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, or any plugin's
// Any JavaScript file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory 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
Expand Down
13 changes: 0 additions & 13 deletions app/assets/javascripts/notifications.coffee

This file was deleted.

15 changes: 15 additions & 0 deletions app/assets/javascripts/notifications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var check_notifications = function () {
$.ajax({
url: "/notifications/has_any"
}).done(function (response) {
if (response.has_unread_notifications) {
$('#notification-alert').show();
}
});
};

$(document).on('turbolinks:load', function () {
check_notifications();
setInterval(check_notifications, 60000);
});

4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class Application < Rails::Application
# Load files in lib
config.eager_load_paths << Rails.root.join('lib')

# Use normal JS (default), not coffeescript
# https://guides.rubyonrails.org/configuring.html#configuring-generators
config.generators.javascript_engine = :js

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
Expand Down

0 comments on commit e51a309

Please sign in to comment.