Clean up legacy entrypoint
This commit is contained in:
parent
f81461d799
commit
ef9a08d3fc
|
@ -1 +0,0 @@
|
|||
($ document).ready -> ($ '[data-toggle="tooltip"]').tooltip()
|
|
@ -2,7 +2,6 @@ import 'core-js/stable'
|
|||
import 'regenerator-runtime/runtime'
|
||||
|
||||
import '../legacy/jquery'
|
||||
import {} from 'jquery-ujs'
|
||||
import 'popper.js'
|
||||
import 'bootstrap'
|
||||
import 'particleground/jquery.particleground.min'
|
||||
|
@ -11,22 +10,17 @@ import Cookies from 'js-cookie'
|
|||
# this file is generated by Rails
|
||||
import I18n from '../legacy/i18n'
|
||||
import '../legacy/memes'
|
||||
import '../legacy/notifications'
|
||||
import '../legacy/pagination'
|
||||
import '../legacy/locale-box'
|
||||
import '../legacy/util'
|
||||
|
||||
window.translate = (scope, options) ->
|
||||
# for some reason I18n errors when calling it by assign proxy, so we got to wrap it
|
||||
I18n.translate(scope, options)
|
||||
|
||||
I18n.defaultLocale = 'en';
|
||||
I18n.locale = Cookies.get('hl') || 'en';
|
||||
|
||||
$(document).on "click", "button#create-account", ->
|
||||
Turbolinks.visit "/sign_up"
|
||||
|
||||
_ready = ->
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$('.dropdown-toggle').dropdown()
|
||||
|
||||
if document.getElementById('particles')?
|
||||
jumbo = $ '.j2-jumbo'
|
||||
bodyColorOrig = jumbo.css 'background-color'
|
||||
|
@ -38,8 +32,4 @@ _ready = ->
|
|||
density: 23000
|
||||
|
||||
$(document).ready _ready
|
||||
$(document).on 'turbolinks:load', _ready
|
||||
|
||||
$(document).on 'turbolinks:render', ->
|
||||
$('.dropdown-toggle').dropdown()
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$(document).on 'turbolinks:load', _ready
|
Loading…
Reference in New Issue