1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-14 03:25:37 +02:00

[ticket/11957] Include admin.js in footer

Include admin.js in footer, swap .hasjs and .nojs

PHPBB3-11957
This commit is contained in:
Vjacheslav Trushkin 2013-10-25 18:32:31 +03:00
parent 5779c300e4
commit 8567adf5db
5 changed files with 23 additions and 2 deletions

18
phpBB/adm/style/admin.js Normal file
View File

@ -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);

View File

@ -11,6 +11,8 @@
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
</body>
</html>

View File

@ -35,7 +35,7 @@ function dE(n, s, type)
</head>
<body class="{S_CONTENT_DIRECTION}">
<body class="{S_CONTENT_DIRECTION} nojs">
<div id="wrap">
<div id="page-header">
<h1>{L_INSTALL_PANEL}</h1>

View File

@ -35,6 +35,7 @@
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS ajax.js -->
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
<!-- EVENT acp_overall_footer_after -->

View File

@ -106,7 +106,7 @@ function popup(url, width, height, name)
<!-- EVENT acp_overall_header_head_append -->
</head>
<body class="{S_CONTENT_DIRECTION}">
<body class="{S_CONTENT_DIRECTION} nojs">
<div id="wrap">
<div id="page-header">