Merge remote-tracking branch 'refs/remotes/origin/3.0'
authorAlexander Ebert <ebert@woltlab.com>
Wed, 13 Sep 2017 11:53:50 +0000 (13:53 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 13 Sep 2017 11:53:50 +0000 (13:53 +0200)
# Conflicts:
# wcfsetup/install/files/acp/templates/applicationEdit.tpl
# wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js
# wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php

1  2 
wcfsetup/install/files/acp/templates/applicationEdit.tpl
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js
wcfsetup/install/files/lib/acp/form/ApplicationEditForm.class.php

index 440a08c05734bc675012d859bdf227cd4c27fe40,20a003e3330837531d4f5c925dad3e54c7c081e7..cef14c3eb24275b094d8cdc3d90ccec3f5d1ddc0
@@@ -65,7 -65,7 +65,7 @@@
                                        <option value="0">{lang}wcf.global.noSelection{/lang}</option>
                                        
                                        {foreach from=$pageNodeList item=pageNode}
-                                               {if !$pageNode->requireObjectID && !$pageNode->excludeFromLandingPage}
 -                                              {if !$pageNode->isDisabled && !$pageNode->requireObjectID}
++                                              {if !$pageNode->isDisabled && !$pageNode->requireObjectID && !$pageNode->excludeFromLandingPage}
                                                        <option value="{@$pageNode->pageID}"{if $pageNode->pageID == $landingPageID} selected{/if} data-identifier="{@$pageNode->identifier}">{if $pageNode->getDepth() > 1}{@"&nbsp;&nbsp;&nbsp;&nbsp;"|str_repeat:($pageNode->getDepth() - 1)}{/if}{$pageNode->name}</option>
                                                {/if}
                                        {/foreach}
index b4b310a3f8e002c544966f80afd61cfdde39e54b,a14e54da84effb1c01fe86202bfa9ebadde862f8..a291324533302aeb7f16a1dc757529cc3f7bcd41
@@@ -344,34 -341,11 +344,34 @@@ define
                        dialog.appendChild(contentContainer);
                        
                        contentContainer.addEventListener('wheel', function (event) {
 -                              // negative value: scrolling up
 -                              if (event.deltaY < 0 && contentContainer.scrollTop === 0) {
 -                                      event.preventDefault();
 +                              var allowScroll = false;
 +                              var element = event.target, clientHeight, scrollHeight, scrollTop;
 +                              while (true) {
 +                                      clientHeight = element.clientHeight;
 +                                      scrollHeight = element.scrollHeight;
 +                                      
 +                                      if (clientHeight < scrollHeight) {
 +                                              scrollTop = element.scrollTop;
 +                                              
-                                               // positive value: scrolling up
-                                               if (event.wheelDelta > 0 && scrollTop > 0) {
++                                              // negative value: scrolling up
++                                              if (event.deltaY < 0 && scrollTop > 0) {
 +                                                      allowScroll = true;
 +                                                      break;
 +                                              }
-                                               else if (event.wheelDelta < 0 && (scrollTop + clientHeight < scrollHeight)) {
++                                              else if (event.deltaY > 0 && (scrollTop + clientHeight < scrollHeight)) {
 +                                                      allowScroll = true;
 +                                                      break;
 +                                              }
 +                                      }
 +                                      
 +                                      if (!element || element === contentContainer) {
 +                                              break;
 +                                      }
 +                                      
 +                                      element = element.parentNode;
                                }
 -                              else if (event.deltaY > 0 && (contentContainer.scrollTop + contentContainer.clientHeight === contentContainer.scrollHeight)) {
 +                              
 +                              if (allowScroll === false) {
                                        event.preventDefault();
                                }
                        });
index 66842b64c82676fc8d66620022d49871422da8e3,d8403dbf7e3f33cbc57c8b219d76ac4cf4e07b18..16371a8defa493f3ea9075391c71f455f9028f10
@@@ -183,7 -183,7 +183,7 @@@ class ApplicationEditForm extends Abstr
                        if (!$page->pageID) {
                                throw new UserInputException('landingPageID');
                        }
-                       else if ($page->requireObjectID || $page->excludeFromLandingPage) {
 -                      else if ($page->requireObjectID || $page->isDisabled) {
++                      else if ($page->requireObjectID || $page->excludeFromLandingPage || $page->isDisabled) {
                                throw new UserInputException('landingPageID', 'invalid');
                        }
                }