From 8567adf5dbfc1d6363deb78b6ebf25a76857c9ac Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Fri, 25 Oct 2013 18:32:31 +0300 Subject: [ticket/11957] Include admin.js in footer Include admin.js in footer, swap .hasjs and .nojs PHPBB3-11957 --- phpBB/adm/style/admin.js | 18 ++++++++++++++++++ phpBB/adm/style/install_footer.html | 2 ++ phpBB/adm/style/install_header.html | 2 +- phpBB/adm/style/overall_footer.html | 1 + phpBB/adm/style/overall_header.html | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 phpBB/adm/style/admin.js (limited to 'phpBB') diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js new file mode 100644 index 0000000000..9b2c9313ac --- /dev/null +++ b/phpBB/adm/style/admin.js @@ -0,0 +1,18 @@ +/** +* phpBB3 ACP functions +*/ + +/** +* Run onload functions +*/ +(function($) { + $(document).ready(function() { + // Swap .nojs and .hasjs + $('body.nojs').toggleClass('nojs hasjs'); + + // Focus forms + $('form[data-focus]:first').each(function() { + $('#' + this.getAttribute('data-focus')).focus(); + }); + }); +})(jQuery); diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index cbb28407c1..7a5fc666f8 100644 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -11,6 +11,8 @@ + +{$SCRIPTS} diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html index 13f4a6dbf4..182abe8875 100644 --- a/phpBB/adm/style/install_header.html +++ b/phpBB/adm/style/install_header.html @@ -35,7 +35,7 @@ function dE(n, s, type) - +