diff --git a/src/bundle/Resources/public/img/icons/about.svg b/src/bundle/Resources/public/img/icons/about.svg index ef807ca158..ff2ac884e2 100755 --- a/src/bundle/Resources/public/img/icons/about.svg +++ b/src/bundle/Resources/public/img/icons/about.svg @@ -1,4 +1,4 @@ - + about diff --git a/src/bundle/Resources/public/img/icons/approved.svg b/src/bundle/Resources/public/img/icons/approved.svg index 28df2519da..524f21d36f 100644 --- a/src/bundle/Resources/public/img/icons/approved.svg +++ b/src/bundle/Resources/public/img/icons/approved.svg @@ -1,4 +1,4 @@ - + approved diff --git a/src/bundle/Resources/public/img/icons/notice.svg b/src/bundle/Resources/public/img/icons/notice.svg index a1446a8139..c5a47a075b 100755 --- a/src/bundle/Resources/public/img/icons/notice.svg +++ b/src/bundle/Resources/public/img/icons/notice.svg @@ -1,4 +1,4 @@ - + notice - + diff --git a/src/bundle/Resources/public/js/scripts/helpers/content.type.helper.js b/src/bundle/Resources/public/js/scripts/helpers/content.type.helper.js index a518799c1a..c7367c8835 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/content.type.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/content.type.helper.js @@ -77,7 +77,7 @@ const getContentTypeByIdentifier = (contentTypeIdentifier) => { } return contentTypesDataMap[contentTypeIdentifier]; -} +}; const getContentTypeIconUrlByHref = (contentTypeHref) => { if (!contentTypesDataMapByHref) { @@ -109,4 +109,12 @@ const getContentTypeDataByHref = (contentTypeHref) => { return contentTypesDataMapByHref[contentTypeHref]; }; -export { getContentTypeIconUrl, getContentTypeName, getContentTypeByIdentifier, getContentTypeIconUrlByHref, getContentTypeDataByHref, getContentTypeNameByHref }; +export { + createContentTypeDataMapByHref, + getContentTypeIconUrl, + getContentTypeName, + getContentTypeByIdentifier, + getContentTypeIconUrlByHref, + getContentTypeDataByHref, + getContentTypeNameByHref, +}; diff --git a/src/bundle/Resources/public/js/scripts/helpers/notification.helper.js b/src/bundle/Resources/public/js/scripts/helpers/notification.helper.js index fbaee33f5a..3c9b27e123 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/notification.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/notification.helper.js @@ -1,4 +1,4 @@ -const { document: doc } = window; +import { getRootDOMElement } from './context.helper'; const NOTIFICATION_INFO_LABEL = 'info'; const NOTIFICATION_SUCCESS_LABEL = 'success'; @@ -16,9 +16,10 @@ const NOTIFICATION_ERROR_LABEL = 'error'; * @param {Object} detail.rawPlaceholdersMap */ const showNotification = (detail) => { + const rootDOMElement = getRootDOMElement(); const event = new CustomEvent('ibexa-notify', { detail }); - doc.body.dispatchEvent(event); + rootDOMElement.dispatchEvent(event); }; /** diff --git a/src/bundle/Resources/public/js/scripts/helpers/request.helper.js b/src/bundle/Resources/public/js/scripts/helpers/request.helper.js index f75e535b55..ea378f2d86 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/request.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/request.helper.js @@ -1,5 +1,4 @@ const handleRequest = (response) => { - console.log('Handle request:', response); if (!response.ok) { throw Error(response.statusText); } diff --git a/src/bundle/Resources/public/scss/mixins/_modals.scss b/src/bundle/Resources/public/scss/mixins/_modals.scss index 4ef706862d..7ce2e877d7 100644 --- a/src/bundle/Resources/public/scss/mixins/_modals.scss +++ b/src/bundle/Resources/public/scss/mixins/_modals.scss @@ -39,6 +39,7 @@ cursor: pointer; opacity: 1; border: none; + background: transparent; .ibexa-icon { margin: 0; diff --git a/src/bundle/Resources/views/themes/admin/ui/layout.html.twig b/src/bundle/Resources/views/themes/admin/ui/layout.html.twig index af6d20cbf8..8aa2d6d78a 100644 --- a/src/bundle/Resources/views/themes/admin/ui/layout.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/layout.html.twig @@ -102,8 +102,10 @@ {{ ibexa_render_component_group('stylesheet-head') }} {{ ibexa_render_component_group('script-head') }} - - + {# #} + + {# #} + diff --git a/src/bundle/ui-dev/src/modules/common/icon/inculdedIcon.js b/src/bundle/ui-dev/src/modules/common/icon/inculdedIcon.js index 18787b4e2d..99f4eeb364 100644 --- a/src/bundle/ui-dev/src/modules/common/icon/inculdedIcon.js +++ b/src/bundle/ui-dev/src/modules/common/icon/inculdedIcon.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import About from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/about.svg'; import AboutInfo from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/about-info.svg'; +import Approved from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/approved.svg'; import Article from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/article.svg'; import Back from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/back.svg'; import Blog from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/blog.svg'; @@ -22,6 +23,7 @@ import Form from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/form.svg import Gallery from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/gallery.svg'; import Image from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/image.svg'; import LandingPage from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/landing_page.svg'; +import Notice from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/notice.svg'; import Options from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/options.svg'; import Place from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/place.svg'; import Product from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/product.svg'; @@ -41,6 +43,7 @@ import Warning from '@ibexa-admin-ui/src/bundle/Resources/public/img/icons/warni const iconsMap = { about: About, 'about-info': AboutInfo, + approved: Approved, article: Article, back: Back, blog: Blog, @@ -60,6 +63,7 @@ const iconsMap = { gallery: Gallery, image: Image, landing_page: LandingPage, + notice: Notice, options: Options, place: Place, product: Product, diff --git a/src/bundle/ui-dev/src/modules/common/popup/popup.component.js b/src/bundle/ui-dev/src/modules/common/popup/popup.component.js index a539ddd9c3..33f5658c7b 100644 --- a/src/bundle/ui-dev/src/modules/common/popup/popup.component.js +++ b/src/bundle/ui-dev/src/modules/common/popup/popup.component.js @@ -3,7 +3,11 @@ import PropTypes from 'prop-types'; import Icon from '../icon/icon'; import { createCssClassNames } from '@ibexa-admin-ui/src/bundle/ui-dev/src/modules/common/helpers/css.class.names'; -import { getTranslator, getBootstrap } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/context.helper'; +import { + getTranslator, + getBootstrap, + getRootDOMElement, +} from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/context.helper'; const CLASS_NON_SCROLLABLE = 'ibexa-non-scrollable'; const CLASS_MODAL_OPEN = 'modal-open'; @@ -32,13 +36,14 @@ const Popup = ({ extraClasses, showTooltip, }) => { + const rootDOMElement = getRootDOMElement(); const modalRef = useRef(null); const Translator = getTranslator(); const bootstrap = getBootstrap(); useEffect(() => { - document.body.classList.toggle(CLASS_MODAL_OPEN, isVisible); - document.body.classList.toggle(CLASS_NON_SCROLLABLE, isVisible); + rootDOMElement.classList.toggle(CLASS_MODAL_OPEN, isVisible); + rootDOMElement.classList.toggle(CLASS_NON_SCROLLABLE, isVisible); if (isVisible) { showPopup(); @@ -58,7 +63,7 @@ const Popup = ({ const closeBtnLabel = Translator.trans(/*@Desc("Close")*/ 'popup.close.label', {}, 'ibexa_universal_discovery_widget'); const hidePopup = () => { bootstrap.Modal.getOrCreateInstance(modalRef.current).hide(); - document.body.classList.remove(CLASS_MODAL_OPEN, CLASS_NON_SCROLLABLE); + rootDOMElement.classList.remove(CLASS_MODAL_OPEN, CLASS_NON_SCROLLABLE); }; const showPopup = () => { const bootstrapModal = bootstrap.Modal.getOrCreateInstance(modalRef.current, { @@ -97,14 +102,14 @@ const Popup = ({
{noHeader - ? renderCloseBtn + ? renderCloseBtn() : title && (

{title} {subtitle && {subtitle}}

- {renderCloseBtn} + {renderCloseBtn()}
)}
{children}
diff --git a/src/bundle/ui-dev/src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js b/src/bundle/ui-dev/src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js index 1fe81233a1..dbca958fd3 100644 --- a/src/bundle/ui-dev/src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js +++ b/src/bundle/ui-dev/src/modules/multi-file-upload/components/upload-popup/upload.popup.component.js @@ -16,11 +16,11 @@ export default class UploadPopupModule extends Component { super(props); this.refTooltip = React.createRef(); - this.rootNode = getRootDOMElement(); + this.rootDOMElement = getRootDOMElement(); } componentDidMount() { - this.rootNode.classList.add(CLASS_SCROLL_DISABLED); + this.rootDOMElement.classList.add(CLASS_SCROLL_DISABLED); parseTooltips(this.refTooltip.current); }