Fixed login overlay w/o other components
authorAlexander Ebert <ebert@woltlab.com>
Sun, 25 Dec 2016 10:37:57 +0000 (11:37 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 25 Dec 2016 10:37:57 +0000 (11:37 +0100)
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/style/ui/userLogin.scss

index ab8031be025a648f40670ef53ef01a59e3bb4064..1b2960c9ade7842e1a07f3b201e2bdae1a7b097d 100644 (file)
@@ -580,7 +580,12 @@ WCF.User.QuickLogin = {
         */
        init: function() {
                require(['EventHandler', 'Ui/Dialog'], function(EventHandler, UiDialog) {
-                       var loginForm = document.getElementById('loginForm');
+                       var loginForm = elById('loginForm');
+                       var loginSection = elBySel('.loginFormLogin', loginForm);
+                       if (loginSection && !loginSection.nextElementSibling) {
+                               loginForm.classList.add('loginFormLoginOnly');
+                       }
+                       
                        var callbackOpen = function(event) {
                                if (event instanceof Event) {
                                        event.preventDefault();
index f54938d9de6af43041ba51727bff3bb371759881..1de94e9d99999c8467631a3da917f7bb573c5043 100644 (file)
                        }
                }
        }
-       
-       @include screen-md-up {
+}
+
+@include screen-md-up {
+       .loginForm:not(.loginFormLoginOnly) > form {
                -webkit-column-count: 2;
                -moz-column-count: 2;
                column-count: 2;
        }
        
        /* force columns to be 300px wide in login overlay */
-       .dialogContent .loginForm .section {
+       .dialogContent .loginForm:not(.loginFormLoginOnly) .section {
                width: 300px;
        }
 }