2 * Bootstraps WCF's JavaScript.
3 * It defines globals needed for backwards compatibility
4 * and runs modules that are needed on page load.
6 * @author Tim Duesterhus
7 * @copyright 2001-2015 WoltLab GmbH
8 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
9 * @module WoltLab/WCF/Bootstrap
13 'jquery', 'favico', 'enquire', 'WoltLab/WCF/Date/Time/Relative',
14 'UI/SimpleDropdown', 'WoltLab/WCF/UI/Mobile', 'WoltLab/WCF/UI/TabMenu', 'WoltLab/WCF/UI/FlexibleMenu',
15 'UI/Dialog', 'WoltLab/WCF/UI/Tooltip'
18 $, favico
, enquire
, relativeTime
,
19 simpleDropdown
, UIMobile
, UITabMenu
, UIFlexibleMenu
,
25 window
.Favico
= favico
;
26 window
.enquire
= enquire
;
31 function Bootstrap() {}
32 Bootstrap
.prototype = {
34 * Initializes the core UI modifications and unblocks jQuery's ready event.
38 simpleDropdown
.setup();
41 UIFlexibleMenu
.setup();
45 // convert method=get into method=post
46 var forms
= document
.querySelectorAll('form[method=get]');
47 for (var i
= 0, length
= forms
.length
; i
< length
; i
++) {
48 forms
[i
].setAttribute('method', 'post');
52 window
.onbeforeunload = function() {
53 /* Prevent "Back navigation caching" (http://msdn.microsoft.com/en-us/library/ie/dn265017%28v=vs.85%29.aspx) */
61 return new Bootstrap();