{@$__wcf->getStyleHandler()->getStylesheet(true)}
{event name='stylesheets'}
+ <!-- Icons -->
+ <link rel="shortcut icon" href="{@$__wcf->getPath()}images/favicon.ico" />
+ <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />
+
<script>
var SID_ARG_2ND = '{@SID_ARG_2ND_NOT_ENCODED}';
var WCF_PATH = '{@$__wcf->getPath()}';
var TIME_NOW = {@TIME_NOW};
var URL_LEGACY_MODE = {if URL_LEGACY_MODE}true{else}false{/if};
</script>
- <script src="{@$__wcf->getPath()}js/3rdParty/jquery.min.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.min.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/3rdParty/jquery-ui/touchPunch.min.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/3rdParty/jquery-ui/nestedSortable.min.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/WCF.Assets.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/WCF.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}acp/js/WCF.ACP.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/require.js?v={@LAST_UPDATE_TIME}"></script>
- <script src="{@$__wcf->getPath()}js/require.config.js?v={@LAST_UPDATE_TIME}"></script>
- <script>
- WCF.User.init({$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}');
- </script>
- {event name='javascriptInclude'}
-
- <!-- Icons -->
- <link rel="shortcut icon" href="{@$__wcf->getPath()}images/favicon.ico" />
- <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />
+ {js application='wcf' file='require' bundle='WCF.Core' core='true'}
+ {js application='wcf' file='require.config' bundle='WCF.Core' core='true'}
<script>
requirejs.config({
baseUrl: '{@$__wcf->getPath()}js'
});
-
- $.holdReady(true);
</script>
-
<script>
+ document.addEventListener('DOMContentLoaded', function() {
require(['Language', 'WoltLab/WCF/ACP/Bootstrap'], function(Language, ACPBootstrap) {
Language.addObject({
'__days': [ '{lang}wcf.date.day.sunday{/lang}', '{lang}wcf.date.day.monday{/lang}', '{lang}wcf.date.day.tuesday{/lang}', '{lang}wcf.date.day.wednesday{/lang}', '{lang}wcf.date.day.thursday{/lang}', '{lang}wcf.date.day.friday{/lang}', '{lang}wcf.date.day.saturday{/lang}' ],
ACPBootstrap.setup();
});
-
+ });
+ </script>
+ {js application='wcf' lib='jquery'}
+ {js application='wcf' lib='jquery-ui'}
+ {js application='wcf' lib='jquery-ui' file='touchPunch' bundle='WCF.Combined'}
+ {js application='wcf' lib='jquery-ui' file='nestedSortable' bundle='WCF.Combined'}
+ {js application='wcf' file='WCF.Assets' bundle='WCF.Combined'}
+ {js application='wcf' file='WCF' bundle='WCF.Combined'}
+ {js application='wcf' acp='true' file='WCF.ACP'}
+ <script>
+ $.holdReady(true);
+ WCF.User.init({$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}');
+ </script>
+ <script>
$(function() {
{* work-around for unknown core-object during WCFSetup *}
{if PACKAGE_ID}
$('form[method=get]').attr('method', 'post');
});
</script>
+ {event name='javascriptInclude'}
</head>
<body id="tpl{$templateName|ucfirst}" data-template="{$templateName}" data-application="{$templateNameApplication}" class="wcfAcp">
<?php
namespace wcf\system\template\plugin;
use wcf\system\exception\SystemException;
+use wcf\system\request\RequestHandler;
use wcf\system\template\TemplateEngine;
use wcf\system\WCF;
use wcf\util\StringUtil;
$isJqueryUi = true;
}
- $src = WCF::getPath($tagArgs['application']) . 'js/';
+ $src = WCF::getPath($tagArgs['application']) . (isset($tagArgs['acp']) && $tagArgs['acp'] === 'true' ? 'acp/' : '') . 'js/';
if (!empty($tagArgs['bundle']) && !ENABLE_DEBUG_MODE) {
$src .= $tagArgs['bundle'];
}
$this->includedFiles[] = $src;
$src .= (!ENABLE_DEBUG_MODE ? '.min' : '') . '.js?v=' . LAST_UPDATE_TIME;
- $html = '<script' . (!isset($tagArgs['core']) || $tagArgs['core'] !== 'true' ? ' data-relocate="true"' : '') . ' src="' . $src . '"></script>'."\n";
+ $relocate = !RequestHandler::getInstance()->isACPRequest() && (!isset($tagArgs['core']) || $tagArgs['core'] !== 'true');
+ $html = '<script' . ($relocate ? ' data-relocate="true"' : '') . ' src="' . $src . '"></script>'."\n";
if (isset($tagArgs['encodeJs']) && $tagArgs['encodeJs'] === 'true') {
$html = StringUtil::encodeJS($html);