Add requirePaths and requireConfig template event
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 3 Oct 2016 13:16:02 +0000 (15:16 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 3 Oct 2016 13:16:22 +0000 (15:16 +0200)
com.woltlab.wcf/templates/headIncludeJavaScript.tpl
wcfsetup/install/files/acp/templates/header.tpl

index 913bc45e3b1889e31cfe9e5d05558e873ebf940f..0ca2538ee5fbc9a34189e475693b7deb2254ac25 100644 (file)
 <script>
 requirejs.config({
        baseUrl: '{@$__wcf->getPath()}js'
+       {hascontent}
+       , paths: {
+               {content}{event name='requirePaths'}{/content}
+       }
+       {/hascontent}
 });
+{event name='requireConfig'}
 </script>
 <script data-relocate="true">
        require(['Language', 'WoltLabSuite/Core/BootstrapFrontend', 'User'], function(Language, BootstrapFrontend, User) {
index 9819a0626467b923b63803cbdcb64f4c98eab147..d662b62108dc0f420bf2f67df69a8a82fb1a17ba 100644 (file)
        {js application='wcf' file='wcf.globalHelper' bundle='WoltLabSuite.Core' core='true'}
        <script>
                requirejs.config({
-                       baseUrl: '{@$__wcf->getPath()}js'
+                       baseUrl: '{@$__wcf->getPath()}js',
+                       {hascontent}
+                       , paths: {
+                               {content}{event name='requirePaths'}{/content}
+                       }
+                       {/hascontent}
                });
+               {event name='requireConfig'}
        </script>
        <script>
                require(['Language', 'WoltLabSuite/Core/Acp/Bootstrap', 'User'], function(Language, AcpBootstrap, User) {
                        <section id="main" class="main" role="main">
                                <div class="layoutBoundary">
                                        <div id="content" class="content">
-                                       
\ No newline at end of file
+