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
|
2015-01-13 10:49:43 -08:00
|
|
|
#= require nprogress
|
|
|
|
#= require nprogress-turbolinks
|
2014-11-28 12:35:44 -08:00
|
|
|
#= require growl
|
2014-12-21 13:29:52 -08:00
|
|
|
#= require cheet
|
2014-12-29 06:47:10 -08:00
|
|
|
#= require jquery.guillotine
|
2015-01-03 07:54:10 -08:00
|
|
|
#= require sweet-alert
|
2015-02-03 08:31:04 -08:00
|
|
|
# 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
|
2015-02-03 08:31:04 -08:00
|
|
|
# not required:
|
|
|
|
# _tree ./moderation
|
2014-11-10 09:19:04 -08:00
|
|
|
|
2015-01-13 10:49:43 -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) ->
|
2014-11-28 12:35:44 -08:00
|
|
|
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"
|
2015-01-03 10:43:51 -08:00
|
|
|
|
|
|
|
_ready = ->
|
|
|
|
sweetAlertInitialize()
|
|
|
|
|
|
|
|
$(document).ready _ready
|
2015-01-07 10:58:43 -08:00
|
|
|
$(document).on 'page:load', _ready
|