<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}{@" "|str_repeat:($pageNode->getDepth() - 1)}{/if}{$pageNode->name}</option>
{/if}
{/foreach}
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();
}
});
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');
}
}