From 8f650f6bf3c0af38ce53c1b1ddffdfd41a1dd549 Mon Sep 17 00:00:00 2001 From: Silvan Date: Tue, 12 Sep 2017 22:51:10 +0200 Subject: [PATCH] move window onload function into js file #1481 fix #1460 --- modules/admin/src/resources/dist/js/login.js | 10 ++++++---- modules/admin/src/resources/js/login.js | 10 ++++++---- modules/admin/src/views/login/index.php | 4 +--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/admin/src/resources/dist/js/login.js b/modules/admin/src/resources/dist/js/login.js index 3b6834f3d..0b233089b 100644 --- a/modules/admin/src/resources/dist/js/login.js +++ b/modules/admin/src/resources/dist/js/login.js @@ -88,10 +88,6 @@ var observeLogin = function (form, url, secureUrl) { }); }; -$(window).load(function () { - $('.login-logo').addClass('login-logo-loaded'); - $('.login-form').addClass('login-form-loaded'); -}); var checkInputLabels = function () { var $loginInput = $('.login-input'); @@ -117,4 +113,10 @@ var checkInputLabels = function () { }); }; +$(window).load(function () { + $('.login-logo').addClass('login-logo-loaded'); + $('.login-form').addClass('login-form-loaded'); + checkInputLabels(); +}); + diff --git a/modules/admin/src/resources/js/login.js b/modules/admin/src/resources/js/login.js index 3b6834f3d..0b233089b 100644 --- a/modules/admin/src/resources/js/login.js +++ b/modules/admin/src/resources/js/login.js @@ -88,10 +88,6 @@ var observeLogin = function (form, url, secureUrl) { }); }; -$(window).load(function () { - $('.login-logo').addClass('login-logo-loaded'); - $('.login-form').addClass('login-form-loaded'); -}); var checkInputLabels = function () { var $loginInput = $('.login-input'); @@ -117,4 +113,10 @@ var checkInputLabels = function () { }); }; +$(window).load(function () { + $('.login-logo').addClass('login-logo-loaded'); + $('.login-form').addClass('login-form-loaded'); + checkInputLabels(); +}); + diff --git a/modules/admin/src/views/login/index.php b/modules/admin/src/views/login/index.php index a475e183d..a7b5099b7 100644 --- a/modules/admin/src/views/login/index.php +++ b/modules/admin/src/views/login/index.php @@ -91,6 +91,4 @@ @luyadev - - -registerJS('$(window).load(function () { checkInputLabels();});'); ?> \ No newline at end of file + \ No newline at end of file