Remove jquery.growl CoffeeScript and styling
This commit is contained in:
parent
f4d32c5cd1
commit
aeb8f32fac
|
@ -45,7 +45,6 @@
|
||||||
"overrides/colors",
|
"overrides/colors",
|
||||||
"overrides/card",
|
"overrides/card",
|
||||||
"overrides/dropdown",
|
"overrides/dropdown",
|
||||||
"overrides/growls",
|
|
||||||
"overrides/inputs",
|
"overrides/inputs",
|
||||||
"overrides/links",
|
"overrides/links",
|
||||||
"overrides/list-group",
|
"overrides/list-group",
|
||||||
|
@ -53,6 +52,7 @@
|
||||||
"overrides/modal",
|
"overrides/modal",
|
||||||
"overrides/navbar",
|
"overrides/navbar",
|
||||||
"overrides/turbolinks",
|
"overrides/turbolinks",
|
||||||
|
"overrides/toasts",
|
||||||
"overrides/sweet-alert";
|
"overrides/sweet-alert";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#growls.default{
|
|
||||||
top:64px;
|
|
||||||
right:10px
|
|
||||||
}
|
|
|
@ -6,12 +6,10 @@ import {} from 'jquery-ujs'
|
||||||
import 'popper.js'
|
import 'popper.js'
|
||||||
import 'bootstrap'
|
import 'bootstrap'
|
||||||
import 'particleground/jquery.particleground.min'
|
import 'particleground/jquery.particleground.min'
|
||||||
import 'jquery.growl'
|
|
||||||
import 'sweetalert'
|
import 'sweetalert'
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
require('nprogress/nprogress.css')
|
require('nprogress/nprogress.css')
|
||||||
require('jquery.growl/stylesheets/jquery.growl.css')
|
|
||||||
|
|
||||||
# this file is generated by Rails
|
# this file is generated by Rails
|
||||||
import I18n from '../legacy/i18n'
|
import I18n from '../legacy/i18n'
|
||||||
|
@ -25,15 +23,6 @@ window.translate = (scope, options) ->
|
||||||
# for some reason I18n errors when calling it by assign proxy, so we got to wrap it
|
# for some reason I18n errors when calling it by assign proxy, so we got to wrap it
|
||||||
I18n.translate(scope, options)
|
I18n.translate(scope, options)
|
||||||
|
|
||||||
window.showNotification = (text, success=true) ->
|
|
||||||
args =
|
|
||||||
title: translate((if success then 'frontend.success.title' else 'frontend.error.title'))
|
|
||||||
message: text
|
|
||||||
if success
|
|
||||||
$.growl.notice args
|
|
||||||
else
|
|
||||||
$.growl.error args
|
|
||||||
|
|
||||||
I18n.defaultLocale = 'en';
|
I18n.defaultLocale = 'en';
|
||||||
I18n.locale = Cookies.get('hl') || 'en';
|
I18n.locale = Cookies.get('hl') || 'en';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue