From: Alexander Ebert Date: Wed, 4 Jun 2014 12:59:55 +0000 (+0200) Subject: Changed JavaScript execution order X-Git-Tag: 2.1.0_Alpha_1~753 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fffbbc144ddeb3c3be4d37baa9211132e66e2b4d;p=GitHub%2FWoltLab%2FWCF.git Changed JavaScript execution order This way we ensure that specific JavaScript modifications to the DOM (e.g. relative time or TabMenus) are executed as early as possible. Tests have shown that there is no more flicker caused by the time conversion or building the TabMenu, in general the related JavaScript is executed earlier (reduction by ~20%) The impact on mobile devices is low and the small delay due to earlier loading of certain JavaScript files trades for a better user-experience, especially on small screens the "jumping" of content due to initial DOM manipulations was pretty lame. Affected DOM manipulations: - Relative Timestamps - Dropdowns (e.g. mobile navigation) - Tab Menus - Flexible Tab Menus (hiding tabs in a dropdown to prevent scrolling/overflow, depends on Dropdowns) --- diff --git a/com.woltlab.wcf/templates/headInclude.tpl b/com.woltlab.wcf/templates/headInclude.tpl index ef500d988d..556cd39168 100644 --- a/com.woltlab.wcf/templates/headInclude.tpl +++ b/com.woltlab.wcf/templates/headInclude.tpl @@ -6,7 +6,7 @@ {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} + + {if ENABLE_DEBUG_MODE} - @@ -57,16 +146,8 @@ -{else} - {/if} - - {event name='javascriptInclude'} @@ -92,81 +173,6 @@