Retrospring/app/assets/javascripts/application.js.erb.coffee

54 lines
1.2 KiB
CoffeeScript
Raw Normal View History

2014-11-10 09:19:04 -08:00
#= require jquery
#= require jquery_ujs
2014-11-11 09:16:09 -08:00
#= require jquery.turbolinks
2014-11-10 09:19:04 -08:00
#= require turbolinks
#= require bootstrap
#= require nprogress
#= require nprogress-turbolinks
#= require growl
2014-12-21 13:29:52 -08:00
#= require cheet
2014-12-29 06:47:10 -08:00
#= require jquery.guillotine
2015-05-12 14:53:42 -07:00
#= require jquery.particleground
2015-01-03 07:54:10 -08:00
#= require sweet-alert
# local requires to be seen by everyone:
#= require_tree ./answerbox
#= require_tree ./questionbox
#= require groups
#= require inbox
#= require memes
#= require notifications
#= require pagination
#= require piwik
#= require question
#= require settings
#= require user
2015-04-21 19:59:10 -07:00
#= require report
# not required:
# _tree ./moderation
2014-11-10 09:19:04 -08:00
NProgress.configure
showSpinner: false
2014-11-10 09:19:04 -08:00
2014-12-08 06:42:34 -08:00
window.showNotification = (text, success=true) ->
args =
title: if success then "Success!" else "Uh-oh..."
message: text
if success
$.growl.notice args
else
$.growl.error args
2014-11-11 09:02:59 -08:00
2014-11-10 09:19:04 -08:00
$(document).on "click", "button#create-account", ->
Turbolinks.visit "/sign_up"
_ready = ->
if typeof sweetAlertInitialize != "undefined"
sweetAlertInitialize()
2015-05-12 14:53:42 -07:00
particleground document.getElementById('particles'),
dotColor: '#5e35b1'
lineColor: '#5e35b1'
$(document).ready _ready
$(document).on 'page:load', _ready