Use window.addEventListener instead of $(document).ready

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-10-03 13:16:05 +09:00
parent 71ff060590
commit 4c6e34ef03
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1
14 changed files with 14 additions and 14 deletions

View File

@ -37,6 +37,6 @@ window.Vuex = Vuex;
import "../stylesheets/application.scss"; import "../stylesheets/application.scss";
$(document).ready(() => { window.addEventListener("load", () => {
$("[data-toggle=tooltip]").tooltip(); $("[data-toggle=tooltip]").tooltip();
}); });

View File

@ -4,7 +4,7 @@ import "lodash/lodash";
import GrepContainer from "./grep_container"; import GrepContainer from "./grep_container";
$(document).ready(() => { window.addEventListener("load", () => {
new Vue({ new Vue({
el: "#filter-grep-setting", el: "#filter-grep-setting",
components: { components: {

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
$(document).ready(()=> { window.addEventListener("load", ()=> {
new Vue({ new Vue({
el: "#fluent-log", el: "#fluent-log",
data: { data: {

View File

@ -6,7 +6,7 @@ import "bootstrap/dist/js/bootstrap";
import ParserPluginForm from "./parser_plugin_form"; import ParserPluginForm from "./parser_plugin_form";
import store from "./store"; import store from "./store";
$(document).ready(() => { window.addEventListener("load", () => {
new Vue({ new Vue({
el: "#in-tail-parse", el: "#in-tail-parse",
store, store,

View File

@ -1,7 +1,7 @@
/* global _ */ /* global _ */
"use strict"; "use strict";
import "lodash/lodash"; import "lodash/lodash";
$(document).ready(()=> { window.addEventListener("load", () => {
var $firstSetting = $(".js-nested-column.js-multiple:first"); var $firstSetting = $(".js-nested-column.js-multiple:first");
if ($firstSetting.length === 0) { if ($firstSetting.length === 0) {

View File

@ -1,7 +1,7 @@
const POLLING_INTERVAL = 3 * 1000; const POLLING_INTERVAL = 3 * 1000;
const POLLING_URL = "/polling/alerts"; const POLLING_URL = "/polling/alerts";
$(document).ready(()=> { window.addEventListener("load", ()=> {
new Vue({ new Vue({
el: "#vue-notification", el: "#vue-notification",
data: { data: {

View File

@ -3,7 +3,7 @@
import TransportConfig from "./transport_config"; import TransportConfig from "./transport_config";
import OwnedPluginForm from "./owned_plugin_form"; import OwnedPluginForm from "./owned_plugin_form";
$(document).ready(() => { window.addEventListener("load", () => {
new Vue({ new Vue({
el: "#out-forward-setting", el: "#out-forward-setting",
components: { components: {

View File

@ -3,7 +3,7 @@
import OwnedPluginForm from "./owned_plugin_form"; import OwnedPluginForm from "./owned_plugin_form";
import AwsCredential from "./aws_credential"; import AwsCredential from "./aws_credential";
$(document).ready(() => { window.addEventListener("load", () => {
new Vue({ new Vue({
el: "#out-s3-setting", el: "#out-s3-setting",
components: { components: {

View File

@ -3,7 +3,7 @@
import "lodash/lodash"; import "lodash/lodash";
$(document).ready(() => { window.addEventListener("load", () => {
const SettingSection = { const SettingSection = {
template: "#vue-setting-section", template: "#vue-setting-section",
props: [ props: [

View File

@ -4,7 +4,7 @@ import "lodash/lodash";
import ConfigField from "./config_field"; import ConfigField from "./config_field";
$(document).ready(() => { window.addEventListener("load", () => {
new Vue({ new Vue({
el: "#transport-section", el: "#transport-section",
components: { components: {

View File

@ -1,7 +1,7 @@
/* global _ */ /* global _ */
"use strict"; "use strict";
import "lodash/lodash"; import "lodash/lodash";
$(document).ready(() => { window.addEventListener("load", () => {
new Vue({ new Vue({
el: "#treeview", el: "#treeview",
props: { props: {

View File

@ -65,7 +65,7 @@
%td= value %td= value
:javascript :javascript
$(document).ready(function() { window.addEventListener("load", () => {
$('#env-table').dataTable({ $('#env-table').dataTable({
"autoWidth": false, "autoWidth": false,
"ordering": true, "ordering": true,

View File

@ -53,7 +53,7 @@
= submit_tag t('plugins.common.install_latest_version'), class: "btn btn-primary" = submit_tag t('plugins.common.install_latest_version'), class: "btn btn-primary"
:javascript :javascript
$(document).ready(function() { window.addEventListener("load", () => {
$('#plugins-table').dataTable({ $('#plugins-table').dataTable({
"autoWidth": false, "autoWidth": false,
"ordering": true, "ordering": true,

View File

@ -29,7 +29,7 @@
:javascript :javascript
$(document).ready(function() { window.addEventListener("load", () => {
$('#plugins-table').dataTable({ $('#plugins-table').dataTable({
"autoWidth": false, "autoWidth": false,
"ordering": true, "ordering": true,