From: Alexander Ebert Date: Tue, 12 May 2015 12:20:08 +0000 (+0200) Subject: Using a separate bootstrap for frontend usage X-Git-Tag: 3.0.0_Beta_1~2404 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d5ef727114e0b12b6297dba8be9ae6b352fcb2f;p=GitHub%2FWoltLab%2FWCF.git Using a separate bootstrap for frontend usage --- diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index 698d51ed80..a519805d99 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -141,8 +141,8 @@ define('jquery', [], function() { return window.jQuery; }); $.holdReady(true); - require(['WoltLab/WCF/Bootstrap'], function(bootstrap) { - bootstrap.setup(); + require(['WoltLab/WCF/BootstrapFrontend'], function(BootstrapFrontend) { + BootstrapFrontend.setup(); }); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js b/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js index 642eda0c8f..62a0232431 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js @@ -12,12 +12,12 @@ define( [ 'jquery', 'favico', 'enquire', 'WoltLab/WCF/Date/Time/Relative', 'UI/SimpleDropdown', 'WoltLab/WCF/UI/Mobile', 'WoltLab/WCF/UI/TabMenu', 'WoltLab/WCF/UI/FlexibleMenu', - 'UI/Dialog', 'WoltLab/WCF/UI/Tooltip', 'WoltLab/WCF/Controller/Sitemap' + 'UI/Dialog', 'WoltLab/WCF/UI/Tooltip' ], function( $, favico, enquire, relativeTime, simpleDropdown, UIMobile, UITabMenu, UIFlexibleMenu, - UIDialog, UITooltip, ControllerSitemap + UIDialog, UITooltip ) { "use strict"; @@ -28,7 +28,7 @@ define( /** * @constructor */ - function Bootstrap() { } + function Bootstrap() {} Bootstrap.prototype = { /** * Initializes the core UI modifications and unblocks jQuery's ready event. @@ -42,8 +42,6 @@ define( UIDialog.setup(); UITooltip.setup(); - ControllerSitemap.setup(); - $.holdReady(false); } }; diff --git a/wcfsetup/install/files/js/WoltLab/WCF/BootstrapFrontend.js b/wcfsetup/install/files/js/WoltLab/WCF/BootstrapFrontend.js new file mode 100644 index 0000000000..764a27c4b3 --- /dev/null +++ b/wcfsetup/install/files/js/WoltLab/WCF/BootstrapFrontend.js @@ -0,0 +1,27 @@ +/** + * Bootstraps WCF's JavaScript with additions for the frontend usage. + * + * @author Alexander Ebert + * @copyright 2001-2015 WoltLab GmbH + * @license GNU Lesser General Public License + * @module WoltLab/WCF/BootstrapFrontend + */ +define(['WoltLab/WCF/Bootstrap', 'WoltLab/WCF/Controller/Sitemap'], function(Bootstrap, ControllerSitemap) { + "use strict"; + + /** + * @constructor + */ + function BootstrapFrontend() {} + BootstrapFrontend.prototype = { + /** + * Bootstraps general modules and frontend exclusive ones. + */ + setup: function() { + Bootstrap.setup(); + ControllerSitemap.setup(); + } + }; + + return new BootstrapFrontend(); +}); \ No newline at end of file diff --git a/wcfsetup/install/files/style/tabMenu.less b/wcfsetup/install/files/style/tabMenu.less index 7da4bbe5b8..4ee788e979 100644 --- a/wcfsetup/install/files/style/tabMenu.less +++ b/wcfsetup/install/files/style/tabMenu.less @@ -2,6 +2,8 @@ line-height: @wcfBaseLineHeight; > .tabMenu { + margin-top: @wcfGapLarge; + > ul { font-size: 0; white-space: nowrap; @@ -135,11 +137,15 @@ } .dialogContentNoPadding .tabMenuContainer { - > nav > ul > li { - border-top-width: 0; + > nav { + margin-top: 0; - &:first-child { - border-left-width: 0; + > ul > li { + border-top-width: 0; + + &:first-child { + border-left-width: 0; + } } }