Commit 27881b60 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Benni Mack
Browse files

[TASK] Update bootstrap javascript to 5.0.0-beta1

Bootstrap v5 – introduced in #92616 – was added with CCS from beta1 but
JavaScript from alpha2. bootstrap.bundle.js was manually wrapped
into a AMD closure, and because bootstrap 5.0.0-beta1 contains alot of
changes regarding data tags, it couldn't be updated in the initial
patch.

Bootstrap is now bundled using rollup using the ES6 sources in order
to allow for automatic updates through `grunt build`.

popperjs – previously bundled into bootstrap distributed files –
is now added as dependency. The bootstap ES6 sources, that we now use
through rollup, do not bundle this external dependency (for good reasons).

Dependency added with:

   yarn add @popperjs/core

Further adaptions contained in this change to ensure beta1 compatibility:

a) Carousel "item" to "carousel-item" class migration
b) $.fn.modal(options) does no longer imply $.fn.modal('show')
c) Fix panels, both JS and CSS (card-group can't be used here)
d) All bootstrap data- tags are migrated to data-bs-.
   (see https://github.com/twbs/bootstrap/pull/31827)
   Migrated with

   # renderes a sed substition with the help of a nested sed from all the
   # data-bs attributes that where changed in the twbs/bootstrap commit
   git grep -l data- | xargs sed -i $( \
        curl -s \
        https://patch-diff.githubusercontent.com/raw/twbs/bootstrap/pull/31827.patch | \
        sed 's/data-bs-[a-z-]*/\n&\n/g' | grep "data-bs-[a-z-]" | \
        sort | uniq | \
        sed 's/data-bs-\(.*\)\([^a-z-]\|$\)/ -e s\/data-\1\\\([^a-z-]\\\)\/data-bs-\1\\1\/g -e s\/data('"'"'\1'"'"')\/data('"'"'bs-\1'"'"')\/g/g' \
   )

   # Revert false positives from the above auto-replacement
   git checkout -- typo3/sysext/core/Documentation/Changelog/ \
        typo3/sysext/backend/Classes/Form/Container/FlexFormContainerContainer.php \
        Build/Sources/TypeScript/backend/Resources/Public/TypeScript/LiveSearch.ts \
        Build/Sources/TypeScript/backend/Resources/Public/TypeScript/FormEngineFlexForm.ts \
        Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/Settings/ExtensionConfiguration.ts \
        Build/Sources/Sass/typo3/_element_panel.scss

   (cd Build && grunt build)

Resolves: #93126
Resolves: #93123
Resolves: #93132
Related: #92616
Releases: master
Change-Id: Ie194d0f87d2c60df7b9e8a6de4893cfaaea55356
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67215

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarMartin Kutschker <mkutschker-typo3@yahoo.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarMartin Kutschker <mkutschker-typo3@yahoo.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 89f2e9f8
...@@ -965,7 +965,7 @@ class PageLayoutView implements LoggerAwareInterface ...@@ -965,7 +965,7 @@ class PageLayoutView implements LoggerAwareInterface
{ {
$pasteIcon = json_encode( $pasteIcon = json_encode(
' <button type="button"' ' <button type="button"'
. ' data-content="' . htmlspecialchars((string)$pasteItem) . '"' . ' data-bs-content="' . htmlspecialchars((string)$pasteItem) . '"'
. ' data-title="' . htmlspecialchars($pasteTitle) . '"' . ' data-title="' . htmlspecialchars($pasteTitle) . '"'
. ' data-severity="warning"' . ' data-severity="warning"'
. ' class="t3js-paste t3js-paste' . htmlspecialchars($copyMode) . ' ' . htmlspecialchars($cssClass) . ' btn btn-default btn-sm"' . ' class="t3js-paste t3js-paste' . htmlspecialchars($copyMode) . ' ' . htmlspecialchars($cssClass) . ' btn btn-default btn-sm"'
...@@ -1088,7 +1088,7 @@ class PageLayoutView implements LoggerAwareInterface ...@@ -1088,7 +1088,7 @@ class PageLayoutView implements LoggerAwareInterface
$out .= '<a class="btn btn-default t3js-modal-trigger" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction($params)) . '"' $out .= '<a class="btn btn-default t3js-modal-trigger" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction($params)) . '"'
. ' data-severity="warning"' . ' data-severity="warning"'
. ' data-title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')) . '"' . ' data-title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')) . '"'
. ' data-content="' . htmlspecialchars($confirm) . '" ' . ' data-bs-content="' . htmlspecialchars($confirm) . '" '
. ' data-button-close-text="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')) . '"' . ' data-button-close-text="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')) . '"'
. ' title="' . htmlspecialchars($this->getLanguageService()->getLL('deleteItem')) . '">' . ' title="' . htmlspecialchars($this->getLanguageService()->getLL('deleteItem')) . '">'
. $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>'; . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
...@@ -1140,7 +1140,7 @@ class PageLayoutView implements LoggerAwareInterface ...@@ -1140,7 +1140,7 @@ class PageLayoutView implements LoggerAwareInterface
} }
// Get record locking status: // Get record locking status:
if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) { if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) {
$additionalIcons[] = '<a href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">' $additionalIcons[] = '<a href="#" data-bs-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</a>'; . $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
} }
// Call stats information hook // Call stats information hook
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<f:render partial="LoginNews" arguments="{_all}" /> <f:render partial="LoginNews" arguments="{_all}" />
<div class="card-footer"> <div class="card-footer">
<div class="typo3-login-copyright-wrap"> <div class="typo3-login-copyright-wrap">
<a href="#loginCopyright" class="typo3-login-copyright-link collapsed" data-toggle="collapse" aria-expanded="false" aria-controls="loginCopyright"> <a href="#loginCopyright" class="typo3-login-copyright-link collapsed" data-bs-toggle="collapse" aria-expanded="false" aria-controls="loginCopyright">
<span><f:translate key="login.copyrightLink" /></span> <span><f:translate key="login.copyrightLink" /></span>
<img src="{images.typo3}" alt="{f:translate(key: 'login.typo3Logo')}" width="70" height="20" /> <img src="{images.typo3}" alt="{f:translate(key: 'login.typo3Logo')}" width="70" height="20" />
</a> </a>
......
<div class="btn-group"> <div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="copymodeSelector" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <button class="btn btn-default dropdown-toggle" type="button" id="copymodeSelector" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<f:if condition="{currentMode} == 'copy'"> <f:if condition="{currentMode} == 'copy'">
<f:then> <f:then>
{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:copyElements')} {f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:copyElements')}
......
<div class="btn-group"> <div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="menuSelector" data-toggle="dropdown" <button class="btn btn-default dropdown-toggle" type="button" id="menuSelector" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="true"> aria-haspopup="true" aria-expanded="true">
{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.menu')} {f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.menu')}
<span class="caret"></span> <span class="caret"></span>
......
<f:if condition="{loginNewsItems}"> <f:if condition="{loginNewsItems}">
<div class="panel-carousel carousel slide t3js-login-news-carousel" id="loginNews" data-interval="0" data-ride="carousel"> <div class="panel-carousel carousel slide t3js-login-news-carousel" id="loginNews" data-bs-interval="0" data-bs-ride="carousel">
<div class="carousel-inner"> <div class="carousel-inner">
<f:for each="{loginNewsItems}" as="item" iteration="loginNewsIterator"> <f:for each="{loginNewsItems}" as="item" iteration="loginNewsIterator">
<div class="item{f:if(condition: loginNewsIterator.isFirst,then: ' active')}"> <div class="carousel-item{f:if(condition: loginNewsIterator.isFirst,then: ' active')}">
<h3 class="typo3-login-news-heading">{item.header}</h3> <h3 class="typo3-login-news-heading">{item.header}</h3>
<f:format.html>{item.content}</f:format.html> <f:format.html>{item.content}</f:format.html>
<span class="text-muted">{item.date}</span> <span class="text-muted">{item.date}</span>
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
</f:for> </f:for>
</div> </div>
<f:if condition="{loginNewsItems -> f:count()} > 1"> <f:if condition="{loginNewsItems -> f:count()} > 1">
<a class="left typo3-login-carousel-control" href="#loginNews" role="button" data-slide="prev"> <a class="left typo3-login-carousel-control" href="#loginNews" role="button" data-bs-slide="prev">
<i class="fa fa-angle-left"></i> <i class="fa fa-angle-left"></i>
<span class="sr-only"><f:translate key="login.news.previous" /></span> <span class="sr-only"><f:translate key="login.news.previous" /></span>
</a> </a>
<a class="right typo3-login-carousel-control" href="#loginNews" role="button" data-slide="next"> <a class="right typo3-login-carousel-control" href="#loginNews" role="button" data-bs-slide="next">
<i class="fa fa-angle-right"></i> <i class="fa fa-angle-right"></i>
<span class="sr-only"><f:translate key="login.news.next" /></span> <span class="sr-only"><f:translate key="login.news.next" /></span>
</a> </a>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<a class="btn btn-default t3js-modal-trigger" href="{item.deleteUrl}" <a class="btn btn-default t3js-modal-trigger" href="{item.deleteUrl}"
data-severity="warning" data-severity="warning"
data-title="{item.deleteConfirmText}" data-title="{item.deleteConfirmText}"
data-content="{item.deleteConfirmText}" data-bs-content="{item.deleteConfirmText}"
data-button-close-text="{item.deleteCancelText}" data-button-close-text="{item.deleteCancelText}"
title="{item.deleteTitle}"> title="{item.deleteTitle}">
<core:icon identifier="actions-edit-delete" size="small" /> <core:icon identifier="actions-edit-delete" size="small" />
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<td> <td>
<div class="btn-group"> <div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="copymodeSelector" <button class="btn btn-default dropdown-toggle" type="button" id="copymodeSelector"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<f:for each="{currentSelection}" as="currentSelectionValue" key="currentSelectionKey"> <f:for each="{currentSelection}" as="currentSelectionValue" key="currentSelectionKey">
<f:if condition="{currentSelectionKey} == {key}"> <f:if condition="{currentSelectionKey} == {key}">
<f:then> <f:then>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<f:if condition="{item.content}"> <f:if condition="{item.content}">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading" role="tab" id="{id}-{iteration.cycle}-heading"> <div class="panel-heading" role="tab" id="{id}-{iteration.cycle}-heading">
<a data-toggle="collapse" title="{item.linkTitle}" data-parent="#{id}" href="#{id}-{iteration.cycle}" aria-expanded="true" aria-controls="{id}-{iteration.cycle}"> <a data-bs-toggle="collapse" title="{item.linkTitle}" data-bs-parent="#{id}" href="#{id}-{iteration.cycle}" aria-expanded="true" aria-controls="{id}-{iteration.cycle}">
<f:if condition="{item.icon}"> <f:if condition="{item.icon}">
<f:format.raw>{item.icon}</f:format.raw> <f:format.raw>{item.icon}</f:format.raw>
</f:if> </f:if>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<f:for each="{items}" as="item" iteration="iteration"> <f:for each="{items}" as="item" iteration="iteration">
<f:if condition="{item.content}"> <f:if condition="{item.content}">
<li role="presentation" class="t3js-tabmenu-item nav-item"> <li role="presentation" class="t3js-tabmenu-item nav-item">
<a href="#{id}-{iteration.cycle}" class="nav-link {f:if(condition: '{iteration.cycle} == {defaultTabIndex}', then: ' active')}" title="{item.linkTitle}" aria-controls="{id}-{iteration.cycle}" role="tab" data-toggle="tab"> <a href="#{id}-{iteration.cycle}" class="nav-link {f:if(condition: '{iteration.cycle} == {defaultTabIndex}', then: ' active')}" title="{item.linkTitle}" aria-controls="{id}-{iteration.cycle}" role="tab" data-bs-toggle="tab">
<f:if condition="{item.icon}"> <f:if condition="{item.icon}">
<f:format.raw>{item.icon}</f:format.raw> <f:format.raw>{item.icon}</f:format.raw>
</f:if> </f:if>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading" role="tab" id="cropper-accordion-heading-{cropVariantIterator.cycle}"> <div class="panel-heading" role="tab" id="cropper-accordion-heading-{cropVariantIterator.cycle}">
<h4 class="panel-title"> <h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion-cropper-variants" <a role="button" data-bs-toggle="collapse" data-bs-parent="#accordion-cropper-variants"
href="#cropper-collapse-{cropVariantIterator.cycle}" href="#cropper-collapse-{cropVariantIterator.cycle}"
aria-expanded="{f:if(condition:cropVariantIterator.isFirst, then:'true', else:'false')}" aria-expanded="{f:if(condition:cropVariantIterator.isFirst, then:'true', else:'false')}"
aria-controls="cropper-collapse-{cropVariantIterator.cycle}" aria-controls="cropper-collapse-{cropVariantIterator.cycle}"
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
<f:translate id="LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.aspect-ratio"/> <f:translate id="LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.aspect-ratio"/>
</label> </label>
<div id="ratio-{cropVariantIterator.cycle}" class="ratio-buttons t3js-ratio-buttons" <div id="ratio-{cropVariantIterator.cycle}" class="ratio-buttons t3js-ratio-buttons"
data-toggle="buttons"> data-bs-toggle="buttons">
<f:for each="{cropVariant.allowedAspectRatios}" as="ratio" iteration="ratioIterator"> <f:for each="{cropVariant.allowedAspectRatios}" as="ratio" iteration="ratioIterator">
<label class="btn btn-secondary" data-method="setAspectRatio" data-option="{ratio.id}" title="{f:translate(id:'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.set-aspect-ratio')}"> <label class="btn btn-secondary" data-method="setAspectRatio" data-bs-option="{ratio.id}" title="{f:translate(id:'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.set-aspect-ratio')}">
<input <input
class="sr-only" id="aspectRatio-{cropVariantIterator.cycle}-{ratioIterator.cycle}" class="sr-only" id="aspectRatio-{cropVariantIterator.cycle}-{ratioIterator.cycle}"
name="aspectRatio-{cropVariantIterator.cycle}-{ratioIterator.cycle}" value="{cropVariant.id}" name="aspectRatio-{cropVariantIterator.cycle}-{ratioIterator.cycle}" value="{cropVariant.id}"
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
<f:render section="FilterNothingFound" /> <f:render section="FilterNothingFound" />
</f:then> </f:then>
<f:else> <f:else>
<div id="new-content-element-wizard-carousel" class="carousel slide" data-ride="carousel" data-interval="false"> <div id="new-content-element-wizard-carousel" class="carousel slide" data-bs-ride="carousel" data-bs-interval="false">
<div class="carousel-inner" role="listbox"> <div class="carousel-inner" role="listbox">
<div class="item active" data-slide="next"> <div class="carousel-item active" data-bs-slide="next">
<div class="t3-new-content-element-wizard-title"> <div class="t3-new-content-element-wizard-title">
<h2>{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:1_selectType')}</h2> <h2>{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:1_selectType')}</h2>
</div> </div>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
{renderedTabs -> f:format.raw()} {renderedTabs -> f:format.raw()}
<f:render section="FilterNothingFound" /> <f:render section="FilterNothingFound" />
</div> </div>
<div class="item"> <div class="carousel-item">
<div class="t3-new-content-element-wizard-title"> <div class="t3-new-content-element-wizard-title">
<h2>{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:2_selectPosition') -> f:format.htmlspecialchars()}</h2> <h2>{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:2_selectPosition') -> f:format.htmlspecialchars()}</h2>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="t3js-media-new-content-element-wizard media-new-content-element-wizard"> <div class="t3js-media-new-content-element-wizard media-new-content-element-wizard">
<f:if condition="{onClickEvent}"> <f:if condition="{onClickEvent}">
<f:then> <f:then>
<a href="#" class="media" onclick="{aOnClick -> f:format.htmlspecialchars()}" data-dismiss="modal"> <a href="#" class="media" onclick="{aOnClick -> f:format.htmlspecialchars()}" data-bs-dismiss="modal">
<f:if condition="{content}"> <f:if condition="{content}">
{content -> f:format.raw()} {content -> f:format.raw()}
</f:if> </f:if>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<input type="radio" class="hide" name="tempB" value="{wizardKey -> f:format.htmlspecialchars()}" <input type="radio" class="hide" name="tempB" value="{wizardKey -> f:format.htmlspecialchars()}"
onclick="{wizardOnClick -> f:format.htmlspecialchars()}"/> onclick="{wizardOnClick -> f:format.htmlspecialchars()}"/>
<a href="#new-content-element-wizard-carousel" class="media" onclick="{aOnClick -> f:format.htmlspecialchars()}" <a href="#new-content-element-wizard-carousel" class="media" onclick="{aOnClick -> f:format.htmlspecialchars()}"
data-slide="next"> data-bs-slide="next">
<f:if condition="{content}"> <f:if condition="{content}">
{content -> f:format.raw()} {content -> f:format.raw()}
</f:if> </f:if>
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
<div id="page_new_icon_{line.index}" class="input-group-addon input-group-icon"> <div id="page_new_icon_{line.index}" class="input-group-addon input-group-icon">
<core:iconForRecord table="pages" row="{id: '0'}" /> <core:iconForRecord table="pages" row="{id: '0'}" />
</div> </div>
<select id="page_new_select_{line.index}" class="form-control form-control-adapt t3js-newmultiplepages-select-doktype" name="pages[NEW{line.index}][doktype]" data-target="#page_new_icon_{line.index}"> <select id="page_new_select_{line.index}" class="form-control form-control-adapt t3js-newmultiplepages-select-doktype" name="pages[NEW{line.index}][doktype]" data-bs-target="#page_new_icon_{line.index}">
<f:for each="{line.pageTypes}" as="typegroup" key="group"> <f:for each="{line.pageTypes}" as="typegroup" key="group">
<optgroup label="{f:translate(key: '{group}')}"> <optgroup label="{f:translate(key: '{group}')}">
<f:for each="{typegroup}" as="type"> <f:for each="{typegroup}" as="type">
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<core:iconForRecord table="pages" row="{page.record}" /> <core:iconForRecord table="pages" row="{page.record}" />
<f:if condition="!{page.canEdit}"> <f:if condition="!{page.canEdit}">
<span <span
data-toggle="tooltip" data-bs-toggle="tooltip"
data-title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:noEditPermissions')}" data-title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:noEditPermissions')}"
> >
<core:icon identifier="status-status-permission-denied" /> <core:icon identifier="status-status-permission-denied" />
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
data-severity="warning" data-severity="warning"
data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}" data-bs-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}"
> >
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByTitle" /> <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByTitle" />
</a> </a>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
data-severity="warning" data-severity="warning"
data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}" data-bs-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}"
> >
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderBySubtitle" /> <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderBySubtitle" />
</a> </a>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
data-severity="warning" data-severity="warning"
data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}" data-bs-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}"
> >
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByNavtitle" /> <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByNavtitle" />
</a> </a>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
data-severity="warning" data-severity="warning"
data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}" data-bs-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}"
> >
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByTstamp" /> <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByTstamp" />
</a> </a>
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
data-severity="warning" data-severity="warning"
data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}" data-bs-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}"
> >
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByCreate" /> <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderByCreate" />
</a> </a>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
data-severity="warning" data-severity="warning"
data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}" data-bs-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderConfirm')}"
> >
<f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderReverse" /> <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:changeOrderReverse" />
</a> </a>
......
...@@ -12,6 +12,6 @@ ...@@ -12,6 +12,6 @@
</div> </div>
</div> </div>
</form> </form>
<a href="#" class="dropdown-toggle t3js-toolbar-search-dropdowntoggle" data-bs-toggle="dropdown" aria-expanded="false"></a> <a href="#" class="dropdown-toggle pull-right t3js-toolbar-search-dropdowntoggle" data-bs-toggle="dropdown" aria-expanded="false"></a>
<div class="dropdown-menu" role="menu"></div> <div class="dropdown-menu" role="menu"></div>
</html> </html>
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
* *
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define(["require","exports","TYPO3/CMS/Backend/BroadcastMessage","TYPO3/CMS/Core/Ajax/AjaxRequest","./Enum/Severity","jquery","TYPO3/CMS/Backend/BroadcastService","./Icons","./Modal","./Notification","./Viewport"],(function(e,t,a,n,s,i,r,o,l,d,c){"use strict";var h;i=__importDefault(i),function(e){e.hide=".t3js-record-hide",e.delete=".t3js-record-delete",e.icon=".t3js-icon"}(h||(h={}));class u{static refreshPageTree(){c.NavigationContainer&&c.NavigationContainer.PageTree&&c.NavigationContainer.PageTree.refreshTree()}static call(e){return new n(TYPO3.settings.ajaxUrls.record_process).withQueryArguments(e).get().then(async e=>await e.resolve())}constructor(){i.default(()=>{this.initialize()})}process(e,t){return u.call(e).then(e=>{if(e.hasErrors&&this.handleErrors(e),t){const n=Object.assign(Object.assign({},t),{hasErrors:e.hasErrors}),s=new a.BroadcastMessage("datahandler","process",n);r.post(s);const i=new CustomEvent("typo3:datahandler:process",{detail:{payload:n}});document.dispatchEvent(i)}return e})}initialize(){i.default(document).on("click",h.hide,e=>{e.preventDefault();const t=i.default(e.currentTarget),a=t.find(h.icon),n=t.closest("tr[data-uid]"),s=t.data("params");this._showSpinnerIcon(a),this.process(s).then(e=>{e.hasErrors?this.handleErrors(e):this.toggleRow(n)})}),i.default(document).on("click",h.delete,e=>{e.preventDefault();const t=i.default(e.currentTarget);t.tooltip("hide");l.confirm(t.data("title"),t.data("message"),s.SeverityEnum.warning,[{text:t.data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:t.data("button-ok-text")||TYPO3.lang["button.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",e=>{"cancel"===e.target.getAttribute("name")?l.dismiss():"delete"===e.target.getAttribute("name")&&(l.dismiss(),this.deleteRecord(t))})})}toggleRow(e){const t=e.find(h.hide),a=t.closest("table[data-table]").data("table"),n=t.data("params");let s,r,l;"hidden"===t.data("state")?(r="visible",s=n.replace("=0","=1"),l="actions-edit-hide"):(r="hidden",s=n.replace("=1","=0"),l="actions-edit-unhide"),t.data("state",r).data("params",s),t.tooltip("hide").one("hidden.bs.tooltip",()=>{const e=t.data("toggleTitle");t.data("toggleTitle",t.attr("data-original-title")).attr("data-original-title",e)});const d=t.find(h.icon);o.getIcon(l,o.sizes.small).then(e=>{d.replaceWith(e)});const c=e.find(".col-icon "+h.icon);"hidden"===r?o.getIcon("miscellaneous-placeholder",o.sizes.small,"overlay-hidden").then(e=>{c.append(i.default(e).find(".icon-overlay"))}):c.find(".icon-overlay").remove(),e.fadeTo("fast",.4,()=>{e.fadeTo("fast",1)}),"pages"===a&&u.refreshPageTree()}deleteRecord(e){const t=e.data("params");let a=e.find(h.icon);this._showSpinnerIcon(a);const n=e.closest("table[data-table]"),s=n.data("table");let i=e.closest("tr[data-uid]");const r=i.data("uid"),l={component:"datahandler",action:"delete",table:s,uid:r};this.process(t,l).then(t=>{if(o.getIcon("actions-edit-delete",o.sizes.small).then(t=>{a=e.find(h.icon),a.replaceWith(t)}),t.hasErrors)this.handleErrors(t);else{const t=e.closest(".panel"),a=t.find(".panel-heading"),o=n.find("[data-l10nparent="+r+"]").closest("tr[data-uid]");if(i=i.add(o),i.fadeTo("slow",.4,()=>{i.slideUp("slow",()=>{i.remove(),0===n.find("tbody tr").length&&t.slideUp("slow")})}),"0"===e.data("l10parent")||""===e.data("l10parent")){const e=Number(a.find(".t3js-table-total-items").html());a.find(".t3js-table-total-items").text(e-1)}"pages"===s&&u.refreshPageTree()}})}handleErrors(e){i.default.each(e.messages,(e,t)=>{d.error(t.title,t.message)})}_showSpinnerIcon(e){o.getIcon("spinner-circle-dark",o.sizes.small).then(t=>{e.replaceWith(t)})}}return new u})); var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define(["require","exports","TYPO3/CMS/Backend/BroadcastMessage","TYPO3/CMS/Core/Ajax/AjaxRequest","./Enum/Severity","jquery","TYPO3/CMS/Backend/BroadcastService","./Icons","./Modal","./Notification","./Viewport"],(function(e,t,a,n,s,i,r,o,l,d,c){"use strict";var h;i=__importDefault(i),function(e){e.hide=".t3js-record-hide",e.delete=".t3js-record-delete",e.icon=".t3js-icon"}(h||(h={}));class u{static refreshPageTree(){c.NavigationContainer&&c.NavigationContainer.PageTree&&c.NavigationContainer.PageTree.refreshTree()}static call(e){return new n(TYPO3.settings.ajaxUrls.record_process).withQueryArguments(e).get().then(async e=>await e.resolve())}constructor(){i.default(()=>{this.initialize()})}process(e,t){return u.call(e).then(e=>{if(e.hasErrors&&this.handleErrors(e),t){const n=Object.assign(Object.assign({},t),{hasErrors:e.hasErrors}),s=new a.BroadcastMessage("datahandler","process",n);r.post(s);const i=new CustomEvent("typo3:datahandler:process",{detail:{payload:n}});document.dispatchEvent(i)}return e})}initialize(){i.default(document).on("click",h.hide,e=>{e.preventDefault();const t=i.default(e.currentTarget),a=t.find(h.icon),n=t.closest("tr[data-uid]"),s=t.data("params");this._showSpinnerIcon(a),this.process(s).then(e=>{e.hasErrors?this.handleErrors(e):this.toggleRow(n)})}),i.default(document).on("click",h.delete,e=>{e.preventDefault();const t=i.default(e.currentTarget);t.tooltip("hide");l.confirm(t.data("title"),t.data("message"),s.SeverityEnum.warning,[{text:t.data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:t.data("button-ok-text")||TYPO3.lang["button.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",e=>{"cancel"===e.target.getAttribute("name")?l.dismiss():"delete"===e.target.getAttribute("name")&&(l.dismiss(),this.deleteRecord(t))})})}toggleRow(e){const t=e.find(h.hide),a=t.closest("table[data-table]").data("table"),n=t.data("params");let s,r,l;"hidden"===t.data("state")?(r="visible",s=n.replace("=0","=1"),l="actions-edit-hide"):(r="hidden",s=n.replace("=1","=0"),l="actions-edit-unhide"),t.data("state",r).data("params",s),t.tooltip("hide").one("hidden.bs.tooltip",()=>{const e=t.data("toggleTitle");t.data("toggleTitle",t.attr("data-bs-original-title")).attr("data-bs-original-title",e)});const d=t.find(h.icon);o.getIcon(l,o.sizes.small).then(e=>{d.replaceWith(e)});const c=e.find(".col-icon "+h.icon);"hidden"===r?o.getIcon("miscellaneous-placeholder",o.sizes.small,"overlay-hidden").then(e=>{c.append(i.default(e).find(".icon-overlay"))}):c.find(".icon-overlay").remove(),e.fadeTo("fast",.4,()=>{e.fadeTo("fast",1)}),"pages"===a&&u.refreshPageTree()}deleteRecord(e){const t=e.data("params");let a=e.find(h.icon);this._showSpinnerIcon(a);const n=e.closest("table[data-table]"),s=n.data("table");let i=e.closest("tr[data-uid]");const r=i.data("uid"),l={component:"datahandler",action:"delete",table:s,uid:r};this.process(t,l).then(t=>{if(o.getIcon("actions-edit-delete",o.sizes.small).then(t=>{a=e.find(h.icon),a.replaceWith(t)}),t.hasErrors)this.handleErrors(t);else{const t=e.closest(".panel"),a=t.find(".panel-heading"),o=n.find("[data-l10nparent="+r+"]").closest("tr[data-uid]");if(i=i.add(o),i.fadeTo("slow",.4,()=>{i.slideUp("slow",()=>{i.remove(),0===n.find("tbody tr").length&&t.slideUp("slow")})}),"0"===e.data("l10parent")||""===e.data("l10parent")){const e=Number(a.find(".t3js-table-total-items").html());a.find(".t3js-table-total-items").text(e-1)}"pages"===s&&u.refreshPageTree()}})}handleErrors(e){i.default.each(e.messages,(e,t)=>{d.error(t.title,t.message)})}_showSpinnerIcon(e){o.getIcon("spinner-circle-dark",o.sizes.small).then(t=>{e.replaceWith(t)})}}return new u}));
\ No newline at end of file \ No newline at end of file
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
* *
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};define(["require","exports","jquery","TYPO3/CMS/Core/Ajax/AjaxRequest","./Popover","bootstrap"],(function(t,e,a,o,l){"use strict";a=__importDefault(a);class i{constructor(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".help-link",this.initialize()}static resolveBackend(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top}initialize(){const t=i.resolveBackend();void 0!==t.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=t.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===t.TYPO3.ShortcutMenu&&a.default(".icon-actions-system-shortcut-new").closest(".btn").hide();let e="&nbsp;";void 0!==t.TYPO3.lang&&(e=t.TYPO3.lang.csh_tooltip_loading);const o=a.default(this.selector);o.attr("data-loaded","false").attr("data-html","true").attr("data-original-title",e).attr("data-placement",this.placement).attr("data-trigger",this.trigger),l.popover(o),a.default(document).on("show.bs.popover",this.selector,t=>{const e=a.default(t.currentTarget),o=e.data("description");if(void 0!==o&&""!==o){const t={title:e.data("title"),content:o};l.setOptions(e,t)}else"false"===e.attr("data-loaded")&&e.data("table")&&this.loadHelp(e);e.closest(".t3js-module-docheader").length&&l.setOption(e,"placement","bottom")}).on("click",".help-has-link",t=>{a.default(".popover").each((e,o)=>{const l=a.default(o);l.has(t.target).length&&this.showHelpPopup(a.default('[aria-describedby="'+l.attr("id")+'"]'))})}).on("click","body",t=>{a.default(this.selector).each((e,o)=>{const i=a.default(o);i.is(t.target)||0!==i.has(t.target).length||0!==a.default(".popover").has(t.target).length||l.hide(i)})})}showHelpPopup(t){try{const e=window.open(this.helpModuleUrl+"&table="+t.data("table")+"&field="+t.data("field")+"&action=detail","ContextHelpWindow","height=400,width=600,status=0,menubar=0,scrollbars=1");return e.focus(),l.hide(t),e}catch(t){}}loadHelp(t){const e=t.data("table"),a=t.data("field");e&&new o(this.ajaxUrl).withQueryArguments({params:{action:"getContextHelp",table:e,field:a}}).get().then(async e=>{const a=await e.resolve(),o={title:a.title||"",content:a.content||"<p></p>"};l.setOptions(t,o),t.attr("data-loaded","true").one("hidden.bs.popover",()=>{l.show(t)}),l.hide(t)})}}return new i})); var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};define(["require","exports","jquery","TYPO3/CMS/Core/Ajax/AjaxRequest","./Popover","bootstrap"],(function(t,e,a,o,l){"use strict";a=__importDefault(a);class s{constructor(){this.ajaxUrl=TYPO3.settings.ajaxUrls.context_help,this.trigger="click",this.placement="auto",this.selector=".help-link",this.initialize()}static resolveBackend(){return void 0!==window.opener&&null!==window.opener?window.opener.top:top}initialize(){const t=s.resolveBackend();void 0!==t.TYPO3.settings.ContextHelp&&(this.helpModuleUrl=t.TYPO3.settings.ContextHelp.moduleUrl),void 0===TYPO3.ShortcutMenu&&void 0===t.TYPO3.ShortcutMenu&&a.default(".icon-actions-system-shortcut-new").closest(".btn").hide();let e="&nbsp;";void 0!==t.TYPO3.lang&&(e=t.TYPO3.lang.csh_tooltip_loading);const o=a.default(this.selector);o.attr("data-loaded","false").attr("data-bs-html","true").attr("data-bs-original-title",e).attr("data-bs-placement",this.placement).attr("data-bs-trigger",this.trigger),l.popover(o),a.default(document).on("show.bs.popover",this.selector,t=>{const e=a.default(t.currentTarget),o=e.data("description");if(void 0!==o&&""!==o){const t={title:e.data("title"),content:o};l.setOptions(e,t)}else"false"===e.attr("data-loaded")&&e.data("table")&&this.loadHelp(e);e.closest(".t3js-module-docheader").length&&l.setOption(e,"placement","bottom")}).on("click",".help-has-link",t=>{a.default(".popover").each((e,o)=>{const l=a.default(o);l.has(t.target).length&&this.showHelpPopup(a.default('[aria-describedby="'+l.attr("id")+'"]'))})}).on("click","body",t=>{a.default(this.selector).each((e,o)=>{const s=a.default(o);s.is(t.target)||0!==s.has(t.target).length||0!==a.default(".popover").has(t.target).length||l.hide(s)})})}showHelpPopup(t){try{const e=window.open(this.helpModuleUrl+"&table="+t.data("table")+"&field="+t.data("field")+"&action=detail","ContextHelpWindow","height=400,width=600,status=0,menubar=0,scrollbars=1");return e.focus(),l.hide(t),e}catch(t){}}loadHelp(t){const e=t.data("table"),a=t.data("field");e&&new o(this.ajaxUrl).withQueryArguments({params:{action:"getContextHelp",table:e,field:a}}).get().then(async e=>{const a=await e.resolve(),o={title:a.title||"",content:a.content||"<p></p>"};l.setOptions(t,o),t.attr("data-loaded","true").one("hidden.bs.popover",()=>{l.show(t)}),l.hide(t)})}}return new s}));
\ No newline at end of file \ No newline at end of file
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
* *
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};define(["require","exports","jquery"],(function(t,e,s){"use strict";s=__importDefault(s);class a{constructor(){this.settings={autoscroll:!0},s.default(()=>{this.createDom()})}static incrementInactiveTabCounter(t){if(!t.hasClass("active")){const e=t.find(".badge");let s=parseInt(e.text(),10);isNaN(s)&&(s=0),e.text(++s)}}add(t,e,n){this.attachToViewport();const o=s.default("<p />").html(t);void 0!==e&&e.length>0&&o.prepend(s.default("<strong />").text(e)),void 0!==n&&0!==n.length||(n="Debug");const l="debugtab-"+n.toLowerCase().replace(/\W+/g,"-"),d=this.$consoleDom.find(".t3js-debuggroups"),i=this.$consoleDom.find(".t3js-debugcontent");let c=this.$consoleDom.find(".t3js-debuggroups li[data-identifier="+l+"]");0===c.length&&(c=s.default("<li />",{role:"presentation",class:"nav-item","data-identifier":l}).append(s.default("<a />",{"aria-controls":l,"data-toggle":"tab",class:"nav-link",href:"#"+l,role:"tab"}).text(n+" ").append(s.default("<span />",{class:"badge"}))).on("shown.bs.tab",t=>{s.default(t.currentTarget).find(".badge").text("")}),d.append(c),i.append(s.default("<div />",{role:"tabpanel",class:"tab-pane",id:l}).append(s.default("<div />",{class:"t3js-messages messages"})))),0===d.find(".active").length&&d.find("a:first").tab("show"),a.incrementInactiveTabCounter(c),this.incrementUnreadMessagesIfCollapsed();const r=s.default("#"+l+" .t3js-messages"),u=r.parent().hasClass("active");r.append(o),this.settings.autoscroll&&u&&r.scrollTop(r.prop("scrollHeight"))}createDom(){void 0===this.$consoleDom&&(this.$consoleDom=s.default("<div />",{id:"typo3-debug-console"}).append(s.default("<div />",{class:"t3js-topbar topbar"}).append(s.default("<p />",{class:"pull-left"}).text(" TYPO3 Debug Console").prepend(s.default("<span />",{class:"fa fa-terminal topbar-icon"})).append(s.default("<span />",{class:"badge"})),s.default("<div />",{class:"t3js-buttons btn-group pull-right"})),s.default("<div />").append(s.default("<div />",{role:"tabpanel"}).append(s.default("<ul />",{class:"nav nav-tabs t3js-debuggroups",role:"tablist"})),s.default("<div />",{class:"tab-content t3js-debugcontent"}))),this.addButton(s.default("<button />",{class:"btn btn-default btn-sm "+(this.settings.autoscroll?"active":""),title:TYPO3.lang["debuggerconsole.autoscroll"]}).append(s.default("<span />",{class:"t3-icon fa fa-magnet"})),()=>{s.default(this).button("toggle"),this.settings.autoscroll=!this.settings.autoscroll}).addButton(s.default("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.toggle.collapse"]}).append(s.default("<span />",{class:"t3-icon fa fa-chevron-down"})),t=>{let e=s.default(t.currentTarget),a=e.find(".t3-icon"),n=this.$consoleDom.find(".t3js-topbar").next();n.toggle(),n.is(":visible")?(e.attr("title",TYPO3.lang["debuggerconsole.toggle.collapse"]),a.toggleClass("fa-chevron-down",!0).toggleClass("fa-chevron-up",!1),this.resetGlobalUnreadCounter()):(e.attr("title",TYPO3.lang["debuggerconsole.toggle.expand"]),a.toggleClass("fa-chevron-down",!1).toggleClass("fa-chevron-up",!0))}).addButton(s.default("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.clear"]}).append(s.default("<span />",{class:"t3-icon fa fa-undo"})),()=>{this.flush()}).addButton(s.default("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.close"]}).append(s.default("<span />",{class:"t3-icon fa fa-times"})),()=>{this.destroy(),this.createDom()}))}addButton(t,e){return t.on("click",e),this.$consoleDom.find(".t3js-buttons").append(t),this}attachToViewport(){const t=s.default(".t3js-scaffold-content");0===t.has(this.$consoleDom).length&&t.append(this.$consoleDom)}incrementUnreadMessagesIfCollapsed(){const t=this.$consoleDom.find(".t3js-topbar");if(t.next().is(":hidden")){const e=t.find(".badge");let s=parseInt(e.text(),10);isNaN(s)&&(s=0),e.text(++s)}}resetGlobalUnreadCounter(){this.$consoleDom.find(".t3js-topbar").find(".badge").text("")}flush(){const t=this.$consoleDom.find(".t3js-debuggroups"),e=this.$consoleDom.find(".t3js-debugcontent");t.children().remove(),e.children().remove()}destroy(){this.$consoleDom.remove(),this.$consoleDom=void 0}}const n=new a;return TYPO3.DebugConsole=n,n})); var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};define(["require","exports","jquery"],(function(t,e,s){"use strict";s=__importDefault(s);class a{constructor(){this.settings={autoscroll:!0},s.default(()=>{this.createDom()})}static incrementInactiveTabCounter(t){if(!t.hasClass("active")){const e=t.find(".badge");let s=parseInt(e.text(),10);isNaN(s)&&(s=0),e.text(++s)}}add(t,e,n){this.attachToViewport();const o=s.default("<p />").html(t);void 0!==e&&e.length>0&&o.prepend(s.default("<strong />").text(e)),void 0!==n&&0!==n.length||(n="Debug");const l="debugtab-"+n.toLowerCase().replace(/\W+/g,"-"),d=this.$consoleDom.find(".t3js-debuggroups"),i=this.$consoleDom.find(".t3js-debugcontent");let c=this.$consoleDom.find(".t3js-debuggroups li[data-identifier="+l+"]");0===c.length&&(c=s.default("<li />",{role:"presentation",class:"nav-item","data-identifier":l}).append(s.default("<a />",{"aria-controls":l,"data-bs-toggle":"tab",class:"nav-link",href:"#"+l,role:"tab"}).text(n+" ").append(s.default("<span />",{class:"badge"}))).on("shown.bs.tab",t=>{s.default(t.currentTarget).find(".badge").text("")}),d.append(c),i.append(s.default("<div />",{role:"tabpanel",class:"tab-pane",id:l}).append(s.default("<div />",{class:"t3js-messages messages"})))),0===d.find(".active").length&&d.find("a:first").tab("show"),a.incrementInactiveTabCounter(c),this.incrementUnreadMessagesIfCollapsed();const r=s.default("#"+l+" .t3js-messages"),u=r.parent().hasClass("active");r.append(o),this.settings.autoscroll&&u&&r.scrollTop(r.prop("scrollHeight"))}createDom(){void 0===this.$consoleDom&&(this.$consoleDom=s.default("<div />",{id:"typo3-debug-console"}).append(s.default("<div />",{class:"t3js-topbar topbar"}).append(s.default("<p />",{class:"pull-left"}).text(" TYPO3 Debug Console").prepend(s.default("<span />",{class:"fa fa-terminal topbar-icon"})).append(s.default("<span />",{class:"badge"})),s.default("<div />",{class:"t3js-buttons btn-group pull-right"})),s.default("<div />").append(s.default("<div />",{role:"tabpanel"}).append(s.default("<ul />",{class:"nav nav-tabs t3js-debuggroups",role:"tablist"})),s.default("<div />",{class:"tab-content t3js-debugcontent"}))),this.addButton(s.default("<button />",{class:"btn btn-default btn-sm "+(this.settings.autoscroll?"active":""),title:TYPO3.lang["debuggerconsole.autoscroll"]}).append(s.default("<span />",{class:"t3-icon fa fa-magnet"})),()=>{s.default(this).button("toggle"),this.settings.autoscroll=!this.settings.autoscroll}).addButton(s.default("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.toggle.collapse"]}).append(s.default("<span />",{class:"t3-icon fa fa-chevron-down"})),t=>{let e=s.default(t.currentTarget),a=e.find(".t3-icon"),n=this.$consoleDom.find(".t3js-topbar").next();n.toggle(),n.is(":visible")?(e.attr("title",TYPO3.lang["debuggerconsole.toggle.collapse"]),a.toggleClass("fa-chevron-down",!0).toggleClass("fa-chevron-up",!1),this.resetGlobalUnreadCounter()):(e.attr("title",TYPO3.lang["debuggerconsole.toggle.expand"]),a.toggleClass("fa-chevron-down",!1).toggleClass("fa-chevron-up",!0))}).addButton(s.default("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.clear"]}).append(s.default("<span />",{class:"t3-icon fa fa-undo"})),()=>{this.flush()}).addButton(s.default("<button />",{class:"btn btn-default btn-sm",title:TYPO3.lang["debuggerconsole.close"]}).append(s.default("<span />",{class:"t3-icon fa fa-times"})),()=>{this.destroy(),this.createDom()}))}addButton(t,e){return t.on("click",e),this.$consoleDom.find(".t3js-buttons").append(t),this}attachToViewport(){const t=s.default(".t3js-scaffold-content");0===t.has(this.$consoleDom).length&&t.append(this.$consoleDom)}incrementUnreadMessagesIfCollapsed(){const t=this.$consoleDom.find(".t3js-topbar");if(t.next().is(":hidden")){const e=t.find(".badge");let s=parseInt(e.text(),10);isNaN(s)&&(s=0),e.text(++s)}}resetGlobalUnreadCounter(){this.$consoleDom.find(".t3js-topbar").find(".badge").text("")}flush(){const t=this.$consoleDom.find(".t3js-debuggroups"),e=this.$consoleDom.find(".t3js-debugcontent");t.children().remove(),e.children().remove()}destroy(){this.$consoleDom.remove(),this.$consoleDom=void 0}}const n=new a;return TYPO3.DebugConsole=n,n}));
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment