define('enquire', [], function() { return window.enquire; });
$.holdReady(true);
- require(['Core'], function(core) {
- core.setup();
+ require(['WoltLab/WCF/Bootstrap'], function(bootstrap) {
+ bootstrap.setup();
});
/*
require(['WoltLab/WCF/Date/Time/Relative', 'UI/SimpleDropdown'], function(relative, dropdown) {
--- /dev/null
+/**
+ * Bootstraps WCF's JavaScript.
+ * It defines globals needed for backwards compatibility
+ * and runs modules that are needed on page load.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2015 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @module WoltLab/WCF/Bootstrap
+ */
+define(
+ [ 'WoltLab/WCF/Date/Time/Relative', 'UI/SimpleDropdown', 'WoltLab/WCF/UI/Mobile', 'WoltLab/WCF/UI/TabMenu'],
+ function(relativeTime, simpleDropdown, uiMobile, TabMenu)
+{
+ /**
+ * @constructor
+ */
+ function Bootstrap() { }
+ Bootstrap.prototype = {
+ /**
+ * Initializes the core UI modifications and unblocks jQuery's ready event.
+ */
+ setup: function() {
+ relativeTime.setup();
+ simpleDropdown.setup();
+ uiMobile.setup();
+ TabMenu.setup();
+
+ $.holdReady(false);
+ }
+ }
+
+ return new Bootstrap();
+});
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/Core
*/
-define(['jQuery'], function($) {
+define([], function() {
"use strict";
/**
*/
function Core() {};
Core.prototype = {
- /**
- * Initializes the core UI modifications and unblocks jQuery's ready event.
- */
- setup: function() {
- require(['WoltLab/WCF/Date/Time/Relative', 'UI/SimpleDropdown', 'WoltLab/WCF/UI/Mobile', 'WoltLab/WCF/UI/TabMenu'], function(relativeTime, simpleDropdown, uiMobile, TabMenu) {
- relativeTime.setup();
- simpleDropdown.setup();
- uiMobile.setup();
- TabMenu.init();
-
- $.holdReady(false);
- });
- },
-
/**
* Merges objects with the first argument.
*