From 0ecda543d9f8737d1926dd28f619b298ba4427c7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 28 Jun 2014 15:13:06 +0200 Subject: [PATCH] Moved JavaScript initialization into a separate template This change will allow style authors to mess with the 'headInclude' template without breaking things. --- com.woltlab.wcf/templates/headInclude.tpl | 202 +--------------- .../templates/headIncludeJavaScript.tpl | 218 ++++++++++++++++++ 2 files changed, 222 insertions(+), 198 deletions(-) create mode 100644 com.woltlab.wcf/templates/headIncludeJavaScript.tpl diff --git a/com.woltlab.wcf/templates/headInclude.tpl b/com.woltlab.wcf/templates/headInclude.tpl index 22130ef23d..93e2c6b905 100644 --- a/com.woltlab.wcf/templates/headInclude.tpl +++ b/com.woltlab.wcf/templates/headInclude.tpl @@ -6,148 +6,16 @@ {implode from=$__wcf->getMetaTagHandler() item=__metaTag glue="\n"}{@$__metaTag}{/implode} {event name='metaTags'} - -{if JQUERY_SOURCE == 'google'} - - -{elseif JQUERY_SOURCE == 'microsoft'} - - -{elseif JQUERY_SOURCE == 'cloudflare'} - - -{else} - - -{/if} -{if JQUERY_SOURCE != 'local'} - -{/if} - - - - -{if ENABLE_DEBUG_MODE} - -{else} - -{/if} +{include file='headIncludeJavaScript'} -{if ENABLE_DEBUG_MODE} - - - - - - - - - - - - - - -{/if} - +{* DEPRECATED -- PLEASE USE javascriptInclude@headIncludeJavaScript *} {event name='javascriptInclude'} @@ -158,73 +26,11 @@ - - - - -{include file='imageViewer'} diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl new file mode 100644 index 0000000000..738b595ced --- /dev/null +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -0,0 +1,218 @@ +{* + DO NOT EDIT THIS FILE +*} + + +{if JQUERY_SOURCE == 'google'} + + +{elseif JQUERY_SOURCE == 'microsoft'} + + +{elseif JQUERY_SOURCE == 'cloudflare'} + + +{else} + + +{/if} +{if JQUERY_SOURCE != 'local'} + +{/if} + + + + +{if ENABLE_DEBUG_MODE} + +{else} + +{/if} + + + +{if ENABLE_DEBUG_MODE} + + + + + + + + + + + + + + +{/if} + +{event name='javascriptInclude'} + + + + + + +{include file='imageViewer'} -- 2.20.1