From 208bac1e86013481e6737fbc457a960be8ef46c3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 26 Jun 2015 17:20:29 +0200 Subject: [PATCH] Using {js} template plugin in ACP (broken commit, have fun) --- .../install/files/acp/templates/header.tpl | 43 ++++++++++--------- .../plugin/JsFunctionTemplatePlugin.class.php | 6 ++- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 6409684309..cf908d1528 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -10,6 +10,10 @@ {@$__wcf->getStyleHandler()->getStylesheet(true)} {event name='stylesheets'} + + + + - - - - - - - - - - - {event name='javascriptInclude'} - - - - + {js application='wcf' file='require' bundle='WCF.Core' core='true'} + {js application='wcf' file='require.config' bundle='WCF.Core' core='true'} - + {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'} + + + {event name='javascriptInclude'} diff --git a/wcfsetup/install/files/lib/system/template/plugin/JsFunctionTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/JsFunctionTemplatePlugin.class.php index a318370a21..6091ac5cb2 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/JsFunctionTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/JsFunctionTemplatePlugin.class.php @@ -1,6 +1,7 @@ includedFiles[] = $src; $src .= (!ENABLE_DEBUG_MODE ? '.min' : '') . '.js?v=' . LAST_UPDATE_TIME; - $html = ''."\n"; + $relocate = !RequestHandler::getInstance()->isACPRequest() && (!isset($tagArgs['core']) || $tagArgs['core'] !== 'true'); + $html = ''."\n"; if (isset($tagArgs['encodeJs']) && $tagArgs['encodeJs'] === 'true') { $html = StringUtil::encodeJS($html); -- 2.20.1