diff --git a/src/bundle/Resources/public/js/scripts/admin.location.view.js b/src/bundle/Resources/public/js/scripts/admin.location.view.js
index 9aa3a69fdd..cf55e9624b 100644
--- a/src/bundle/Resources/public/js/scripts/admin.location.view.js
+++ b/src/bundle/Resources/public/js/scripts/admin.location.view.js
@@ -8,18 +8,22 @@
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const publishedContentId = urlParams.get('publishedContentId');
- const handleEditItem = (content, location) => {
+ const sendForm = () => {
+ doc.querySelector('#form_subitems_content_edit_create').click();
+ };
+ const updateForm = (contentId, languageCode) => {
+ doc.querySelector('#form_subitems_content_edit_content_info').value = contentId;
+ doc.querySelector(`#form_subitems_content_edit_language_${languageCode}`).checked = true;
+ };
+ const handleEditItem = (content, location, isLanguageSelectorOpened) => {
const contentId = content._id;
const locationId = location._id;
const languageCode = content.mainLanguageCode;
const checkVersionDraftLink = Routing.generate('ibexa.version_draft.has_no_conflict', { contentId, languageCode, locationId });
- const submitVersionEditForm = () => {
- doc.querySelector('#form_subitems_content_edit_content_info').value = contentId;
- doc.querySelector(`#form_subitems_content_edit_language_${languageCode}`).checked = true;
- doc.querySelector('#form_subitems_content_edit_create').click();
- };
+
const addDraft = () => {
- submitVersionEditForm();
+ updateForm(contentId, languageCode);
+ sendForm();
bootstrap.Modal.getOrCreateInstance(doc.querySelector('#version-draft-conflict-modal')).hide();
};
const attachModalListeners = (wrapper) => {
@@ -37,6 +41,9 @@
if (conflictModal) {
bootstrap.Modal.getOrCreateInstance(conflictModal).show();
conflictModal.addEventListener('shown.bs.modal', () => ibexa.helpers.tooltips.parse());
+ conflictModal.addEventListener('hide.bs.modal', () => {
+ doc.body.dispatchEvent(new CustomEvent('ibexa:edit-content-reset-language-selector'));
+ });
}
};
const showModal = (modalHtml) => {
@@ -71,7 +78,11 @@
if (response.status === 409) {
response.text().then(showModal);
} else if (response.status === 200) {
- submitVersionEditForm();
+ updateForm(contentId, languageCode);
+
+ if (!isLanguageSelectorOpened) {
+ sendForm();
+ }
}
})
.catch(ibexa.helpers.notification.showErrorNotification);
@@ -84,6 +95,7 @@
modalTableTitleNode.setAttribute('title', title);
modalTableTitleNode.dataset.originalTitle = title;
};
+
const setModalTableBody = (failedItemsData) => {
const modal = doc.querySelector(SELECTOR_MODAL_BULK_ACTION_FAIL);
const table = modal.querySelector('.ibexa-bulk-action-failed-modal__table');
@@ -194,6 +206,14 @@
);
});
+ doc.body.addEventListener(
+ 'ibexa-sub-items:submit-version-edit-form',
+ () => {
+ sendForm();
+ },
+ false,
+ );
+
if (publishedContentId) {
emdedItemsUpdateChannel.postMessage({ contentId: publishedContentId });
}
diff --git a/src/bundle/Resources/public/js/scripts/button.content.edit.js b/src/bundle/Resources/public/js/scripts/button.content.edit.js
index 8fa5cb7320..e84d9cff67 100644
--- a/src/bundle/Resources/public/js/scripts/button.content.edit.js
+++ b/src/bundle/Resources/public/js/scripts/button.content.edit.js
@@ -4,7 +4,7 @@
const editVersion = (event) => {
const versionEditForm = doc.querySelector(FORM_EDIT);
const versionEditFormName = versionEditForm.name;
- const { contentId, versionNo, languageCode } = event.currentTarget.dataset;
+ const { contentId, versionNo, languageCode, withConfirm } = event.currentTarget.dataset;
const contentInfoInput = versionEditForm.querySelector(`input[name="${versionEditFormName}[content_info]"]`);
const versionInfoContentInfoInput = versionEditForm.querySelector(
`input[name="${versionEditFormName}[version_info][content_info]"]`,
@@ -34,6 +34,7 @@
wrapper.innerHTML = modalHtml;
+ const conflictModal = doc.querySelector('#version-draft-conflict-modal');
const addDraftButton = wrapper.querySelector('.ibexa-btn--add-draft');
if (addDraftButton) {
@@ -43,7 +44,11 @@
wrapper
.querySelectorAll('.ibexa-btn--prevented')
.forEach((btn) => btn.addEventListener('click', (wrapperBtnEvent) => wrapperBtnEvent.preventDefault(), false));
- bootstrap.Modal.getOrCreateInstance(doc.querySelector('#version-draft-conflict-modal')).show();
+
+ bootstrap.Modal.getOrCreateInstance(conflictModal).show();
+ conflictModal.addEventListener('hide.bs.modal', () => {
+ doc.body.dispatchEvent(new CustomEvent('ibexa:edit-content-reset-language-selector'));
+ });
};
const handleCanEditCheck = (response) => {
if (response.canEdit) {
@@ -60,7 +65,9 @@
} else if (response.status === 403) {
response.text().then(showErrorNotification);
} else if (response.status === 200) {
- submitVersionEditForm();
+ if (!withConfirm) {
+ submitVersionEditForm();
+ }
}
};
diff --git a/src/bundle/Resources/public/js/scripts/button.translation.edit.js b/src/bundle/Resources/public/js/scripts/button.translation.edit.js
index 6242d98a35..c6de4dfd00 100644
--- a/src/bundle/Resources/public/js/scripts/button.translation.edit.js
+++ b/src/bundle/Resources/public/js/scripts/button.translation.edit.js
@@ -3,34 +3,32 @@
constructor(config) {
this.container = config.container;
this.toggler = config.container.querySelector('.ibexa-btn--translations-list-toggler');
- this.translationsList = config.container.querySelector('.ibexa-translation-selector__list-wrapper');
+ this.extraActionsContainer = config.container.querySelector('.ibexa-extra-actions');
+ this.closeBtn = config.container.querySelector('.ibexa-extra-actions__close-btn');
+ this.confirmBtn = config.container.querySelector('.ibexa-extra-actions__confirm-btn');
+ this.languagesBtns = config.container.querySelectorAll('.ibexa-btn--select-language');
this.backdrop = config.backdrop;
this.tableNode = null;
- this.hideTranslationsList = this.hideTranslationsList.bind(this);
- this.showTranslationsList = this.showTranslationsList.bind(this);
+ this.hideExtraActionPanel = this.hideExtraActionPanel.bind(this);
+ this.showExtraActionPanel = this.showExtraActionPanel.bind(this);
+ this.setActiveLanguage = this.setActiveLanguage.bind(this);
+ this.resetLanguageSelector = this.resetLanguageSelector.bind(this);
+
this.setPosition = this.setPosition.bind(this);
}
setPosition() {
- const topOffset = parseInt(this.translationsList.dataset.topOffset, 10);
+ const topOffset = parseInt(this.extraActionsContainer.dataset.topOffset, 10);
const topPosition = window.scrollY > topOffset ? 0 : topOffset - window.scrollY;
const height = window.scrollY > topOffset ? window.innerHeight : window.innerHeight + window.scrollY - topOffset;
- this.translationsList.style.top = `${topPosition}px`;
- this.translationsList.style.height = `${height}px`;
+ this.extraActionsContainer.style.top = `${topPosition}px`;
+ this.extraActionsContainer.style.height = `${height}px`;
}
- hideTranslationsList(event) {
- const closestTranslationSelector = event.target.closest('.ibexa-translation-selector');
- const clickedOnTranslationsList = closestTranslationSelector && closestTranslationSelector.isSameNode(this.container);
- const clickedOnDraftConflictModal = event.target.closest('.ibexa-modal--version-draft-conflict');
-
- if (clickedOnTranslationsList || clickedOnDraftConflictModal) {
- return;
- }
-
+ hideExtraActionPanel() {
if (this.tableNode) {
this.tableNode.classList.add('ibexa-table--last-column-sticky');
@@ -38,12 +36,13 @@
}
this.backdrop.hide();
- this.translationsList.classList.add('ibexa-translation-selector__list-wrapper--hidden');
- doc.removeEventListener('click', this.hideTranslationsList, false);
+ this.extraActionsContainer.classList.add('ibexa-extra-actions--hidden');
+
+ this.closeBtn.removeEventListener('click', this.hideExtraActionPanel, false);
}
- showTranslationsList({ currentTarget }) {
- this.translationsList.classList.remove('ibexa-translation-selector__list-wrapper--hidden');
+ showExtraActionPanel({ currentTarget }) {
+ this.extraActionsContainer.classList.remove('ibexa-extra-actions--hidden');
this.tableNode = currentTarget.closest('.ibexa-table--last-column-sticky');
@@ -52,14 +51,38 @@
}
this.setPosition();
-
this.backdrop.show();
- doc.addEventListener('click', this.hideTranslationsList, false);
+ this.closeBtn.addEventListener('click', this.hideExtraActionPanel, false);
+
ibexa.helpers.tooltips.hideAll();
}
+ setActiveLanguage(event) {
+ const { contentId, languageCode } = event.currentTarget.dataset;
+
+ this.confirmBtn.dataset.contentId = contentId;
+ this.confirmBtn.dataset.languageCode = languageCode;
+ this.confirmBtn.disabled = false;
+
+ this.languagesBtns.forEach((btn) => btn.classList.remove('ibexa-btn--active'));
+ event.currentTarget.classList.add('ibexa-btn--active');
+ }
+
+ resetLanguageSelector() {
+ this.confirmBtn.dataset.contentId = null;
+ this.confirmBtn.dataset.languageCode = null;
+ this.confirmBtn.disabled = true;
+
+ this.languagesBtns.forEach((btn) => btn.classList.remove('ibexa-btn--active'));
+ }
+
init() {
- this.toggler.addEventListener('click', this.showTranslationsList, false);
+ this.toggler.addEventListener('click', this.showExtraActionPanel, false);
+ this.languagesBtns.forEach((btn) => {
+ btn.addEventListener('click', this.setActiveLanguage, false);
+ });
+
+ document.body.addEventListener('ibexa:edit-content-reset-language-selector', this.resetLanguageSelector, false);
}
}
diff --git a/src/bundle/Resources/public/js/scripts/sidebar/btn/content.edit.js b/src/bundle/Resources/public/js/scripts/sidebar/btn/content.edit.js
index ebf7026dc4..494613836f 100644
--- a/src/bundle/Resources/public/js/scripts/sidebar/btn/content.edit.js
+++ b/src/bundle/Resources/public/js/scripts/sidebar/btn/content.edit.js
@@ -12,7 +12,13 @@
'click',
() => {
languageRadioOption.checked = true;
- languageRadioOption.dispatchEvent(new CustomEvent('change'));
+ languageRadioOption.dispatchEvent(
+ new CustomEvent('change', {
+ detail: {
+ sendImmediately: true,
+ },
+ }),
+ );
},
false,
);
diff --git a/src/bundle/Resources/public/js/scripts/sidebar/btn/location.edit.js b/src/bundle/Resources/public/js/scripts/sidebar/btn/location.edit.js
index 14bdd93530..5b8d3029e8 100644
--- a/src/bundle/Resources/public/js/scripts/sidebar/btn/location.edit.js
+++ b/src/bundle/Resources/public/js/scripts/sidebar/btn/location.edit.js
@@ -46,6 +46,7 @@
attachModalListeners(wrapper, form, btns);
};
const changeHandler = (form, btns, event) => {
+ const sendImmediately = event?.detail?.sendImmediately ?? false;
const contentIdInput = form.querySelector('.ibexa-extra-actions__form-field--content-info');
const locationInput = form.querySelector('.ibexa-extra-actions__form-field--location');
const contentId = contentIdInput.value;
@@ -53,12 +54,22 @@
const checkedBtn = event.currentTarget;
const languageCode = checkedBtn.value;
const checkVersionDraftLink = Routing.generate('ibexa.version_draft.has_no_conflict', { contentId, languageCode, locationId });
+ const activeLanguageItem = event.target.closest('.ibexa-instant-filter__group-item')?.querySelector('.ibexa-label');
+ const allLanguageItems = form.querySelectorAll('.ibexa-instant-filter__group-item .ibexa-label');
+ const submitBtn = form.querySelector('.ibexa-extra-actions__confirm-btn');
+
+ allLanguageItems.forEach((item) => {
+ item.classList.remove('ibexa-label--active');
+ });
fetch(checkVersionDraftLink, {
credentials: 'same-origin',
}).then((response) => {
if (response.status === 409) {
response.text().then(showModal.bind(null, form, btns));
+ submitBtn.disabled = true;
+
+ return;
} else if (response.status === 200) {
if (form.querySelector('#user_edit_version_info')) {
redirectToUserEdit(languageCode, contentId, form);
@@ -66,8 +77,13 @@
return;
}
- form.submit();
+ if (sendImmediately) {
+ form.submit();
+ }
}
+
+ submitBtn.disabled = false;
+ activeLanguageItem?.classList.add('ibexa-label--active');
});
};
const attachEventsToEditActionsWidget = (container) => {
diff --git a/src/bundle/Resources/public/js/scripts/sidebar/btn/user.edit.js b/src/bundle/Resources/public/js/scripts/sidebar/btn/user.edit.js
index b4cb65d27a..d2a8204ced 100644
--- a/src/bundle/Resources/public/js/scripts/sidebar/btn/user.edit.js
+++ b/src/bundle/Resources/public/js/scripts/sidebar/btn/user.edit.js
@@ -11,7 +11,13 @@
'click',
() => {
languageRadioOption.checked = true;
- languageRadioOption.dispatchEvent(new CustomEvent('change'));
+ languageRadioOption.dispatchEvent(
+ new CustomEvent('change', {
+ detail: {
+ sendImmediately: true,
+ },
+ }),
+ );
},
false,
);
diff --git a/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js b/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js
index 5cd3cc3175..9c2eee6d9a 100644
--- a/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js
+++ b/src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js
@@ -143,6 +143,7 @@ import { getInstance } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scri
initExtraActionsWidget(dataset);
});
doc.body.addEventListener('ibexa-extra-actions:toggle-widget', (event) => toggleExtraActionsWidget(event.detail), false);
+
closeBtns.forEach((closeBtn) =>
closeBtn.addEventListener(
'click',
diff --git a/src/bundle/Resources/public/scss/_extra-actions.scss b/src/bundle/Resources/public/scss/_extra-actions.scss
index 4279d4c412..25b0d21df6 100644
--- a/src/bundle/Resources/public/scss/_extra-actions.scss
+++ b/src/bundle/Resources/public/scss/_extra-actions.scss
@@ -1,9 +1,24 @@
.ibexa-extra-actions {
@include container-box-shadow-left;
+ $self: &;
+
background-color: $ibexa-color-white;
padding: calculateRem(16px) 0;
width: calculateRem(700px);
+ height: calc(100vh - #{calculateRem(73px)});
+ position: fixed;
+ top: calculateRem(73px);
+ right: 0;
+ z-index: 200;
+ transform: translate(0, 0) scaleX(1);
+ transform-origin: right center;
+ transition: $ibexa-admin-widget-open-transition;
+
+ &--hidden {
+ transform: translate(calc(100%), 0) scaleX(0);
+ transition: $ibexa-admin-widget-close-transition;
+ }
&__action {
display: block;
@@ -60,13 +75,8 @@
&__content {
padding: calculateRem(32px) 25% calculateRem(48px) calculateRem(32px);
- max-height: calc(100% - #{calculateRem(90px)});
+ max-height: calc(100vh - #{calculateRem(210px)});
overflow: auto;
-
- &--create {
- padding-top: calculateRem(24px);
- padding-bottom: 0;
- }
}
&__btns {
@@ -85,28 +95,47 @@
gap: calculateRem(16px);
}
+ &__section-content {
+ padding-bottom: calculateRem(32px);
+ background: $ibexa-color-white;
+ font-size: calculateRem(16px);
+ border-bottom: calculateRem(1px) solid $ibexa-color-light;
+
+ select {
+ display: inline-block;
+ width: 75%;
+ }
+ }
+
&--edit-user,
&--edit {
+ padding: 0;
+
+ #{$self} {
+ &__header,
+ &__content {
+ padding: calculateRem(16px);
+ }
+
+ &__header-content {
+ margin: 0;
+ }
+
+ &__confirm-wrapper {
+ padding: calculateRem(16px) calculateRem(20px);
+ }
+ }
+
.form-check {
padding-left: 0;
}
.ibexa-label {
- background: $ibexa-color-white;
- display: flex;
- width: 100%;
- padding: calculateRem(13px) calculateRem(10px);
- border: calculateRem(1px) solid $ibexa-color-light;
- border-radius: $ibexa-border-radius;
- box-shadow: calculateRem(4px) calculateRem(2px) calculateRem(17px) 0 rgba($ibexa-color-info, 0.05);
- transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
- cursor: pointer;
+ @include edit-language-item;
+ }
- &:hover {
- border-color: $ibexa-color-dark;
- transform: scale(1.02) translateX(-10px);
- box-shadow: calculateRem(4px) calculateRem(10px) calculateRem(17px) 0 rgba($ibexa-color-info, 0.2);
- }
+ .ibexa-instant-filter__input-wrapper {
+ margin: 0 0 calculateRem(30px) 0;
}
.ibexa-input[type='radio'] {
@@ -114,23 +143,12 @@
}
}
- &__section-content {
- padding-bottom: calculateRem(32px);
- background: $ibexa-color-white;
- font-size: calculateRem(16px);
- border-bottom: calculateRem(1px) solid $ibexa-color-light;
-
- select {
- display: inline-block;
- width: 75%;
- }
- }
-
&--create {
- .ibexa-extra-actions {
+ #{$self} {
&__content {
- max-height: calc(100% - #{calculateRem(157px)});
- overflow: auto;
+ max-height: calc(100% - #{calculateRem(155px)});
+ padding-top: calculateRem(24px);
+ padding-bottom: 0;
}
&__section-content--content-type {
@@ -168,6 +186,17 @@
}
}
}
+
+ &--full-height {
+ top: 0;
+ height: 100vh;
+
+ #{$self} {
+ &__content {
+ max-height: calc(100vh - #{calculateRem(136px)});
+ }
+ }
+ }
}
.ibexa-extra-actions-container {
@@ -180,22 +209,6 @@
z-index: 150;
background-color: rgba($ibexa-color-dark, 0.4);
}
-
- .ibexa-extra-actions {
- height: calc(100vh - #{calculateRem(73px)});
- position: fixed;
- top: calculateRem(73px);
- right: 0;
- z-index: 200;
- transform: translate(0, 0) scaleX(1);
- transform-origin: right center;
- transition: $ibexa-admin-widget-open-transition;
-
- &--hidden {
- transform: translate(calc(100%), 0) scaleX(0);
- transition: $ibexa-admin-widget-close-transition;
- }
- }
}
.ibexa-main-container {
diff --git a/src/bundle/Resources/public/scss/_instant-filter.scss b/src/bundle/Resources/public/scss/_instant-filter.scss
index de255680c0..e6ad37c9ac 100644
--- a/src/bundle/Resources/public/scss/_instant-filter.scss
+++ b/src/bundle/Resources/public/scss/_instant-filter.scss
@@ -13,72 +13,86 @@
}
}
-.ibexa-extra-actions--create {
- .ibexa-instant-filter {
- &__desc {
- color: $ibexa-color-dark-400;
- font-size: $ibexa-text-font-size-small;
- padding-top: calculateRem(14px);
- }
-
- &__group {
- display: flex;
- flex-wrap: wrap;
- padding-bottom: calculateRem(16px);
-
- &:not(:last-of-type) {
- border-bottom: calculateRem(1px) solid $ibexa-color-light;
+.ibexa-extra-actions {
+ &--create {
+ .ibexa-instant-filter {
+ &__desc {
+ color: $ibexa-color-dark-400;
+ font-size: $ibexa-text-font-size-small;
+ padding-top: calculateRem(14px);
}
- }
-
- &__group-name {
- margin: calculateRem(16px) 0 calculateRem(8px);
- color: $ibexa-color-dark;
- flex-basis: 100%;
- font-size: $ibexa-text-font-size-small;
- }
- &__group-item {
- position: relative;
- flex-basis: 50%;
- padding: calculateRem(4px);
- display: flex;
- align-items: center;
+ &__group {
+ display: flex;
+ flex-wrap: wrap;
+ padding-bottom: calculateRem(16px);
- label {
- cursor: pointer;
+ &:not(:last-of-type) {
+ border-bottom: calculateRem(1px) solid $ibexa-color-light;
+ }
}
- .form-check {
- width: 100%;
+ &__group-name {
+ margin: calculateRem(16px) 0 calculateRem(8px);
+ color: $ibexa-color-dark;
+ flex-basis: 100%;
+ font-size: $ibexa-text-font-size-small;
}
- .ibexa-icon {
- fill: $ibexa-color-black;
- position: absolute;
- left: calculateRem(20px);
- width: calculateRem(16px);
- height: calculateRem(16px);
- }
+ &__group-item {
+ position: relative;
+ flex-basis: 50%;
+ padding: calculateRem(4px);
+ display: flex;
+ align-items: center;
- &:hover {
- .ibexa-label--checkbox-radio {
- color: $ibexa-color-primary;
+ label {
+ cursor: pointer;
+ }
+
+ .form-check {
+ width: 100%;
}
.ibexa-icon {
- fill: $ibexa-color-primary;
+ fill: $ibexa-color-black;
+ position: absolute;
+ left: calculateRem(20px);
+ width: calculateRem(16px);
+ height: calculateRem(16px);
+ }
+
+ &:hover {
+ .ibexa-label--checkbox-radio {
+ color: $ibexa-color-primary;
+ }
+
+ .ibexa-icon {
+ fill: $ibexa-color-primary;
+ }
+ }
+
+ &--selected {
+ background: $ibexa-color-light-300;
+ border-radius: $ibexa-border-radius;
}
}
- &--selected {
- background: $ibexa-color-light-300;
- border-radius: $ibexa-border-radius;
+ &__group-item-label-icon {
+ height: calculateRem(16px);
}
}
+ }
- &__group-item-label-icon {
- height: calculateRem(16px);
+ &--edit,
+ &--edit-user {
+ .ibexa-instant-filter {
+ &__desc {
+ color: $ibexa-color-dark-400;
+ font-size: $ibexa-text-font-size-small;
+ margin-bottom: calculateRem(20px);
+ padding: 0;
+ }
}
}
}
diff --git a/src/bundle/Resources/public/scss/_mixins.scss b/src/bundle/Resources/public/scss/_mixins.scss
index 4709e7d4bb..c14cb10dab 100644
--- a/src/bundle/Resources/public/scss/_mixins.scss
+++ b/src/bundle/Resources/public/scss/_mixins.scss
@@ -14,6 +14,7 @@
@import 'mixins/spinner';
@import 'mixins/tab-selector';
@import 'mixins/tooltips';
+@import 'mixins/edit-language-selector';
@mixin datetime-field() {
&.is-invalid {
diff --git a/src/bundle/Resources/public/scss/_translation-selector.scss b/src/bundle/Resources/public/scss/_translation-selector.scss
index 937163575d..fa68b88008 100644
--- a/src/bundle/Resources/public/scss/_translation-selector.scss
+++ b/src/bundle/Resources/public/scss/_translation-selector.scss
@@ -1,63 +1,11 @@
.ibexa-translation-selector {
- &__list-wrapper {
- display: block;
- position: fixed;
- opacity: 1;
- text-align: left;
- background-color: $ibexa-color-white;
- border: calculateRem(16px) solid $ibexa-color-white;
- width: calculateRem(360px);
- padding: calculateRem(9px);
- box-shadow: calculateRem(-4px) calculateRem(4px) calculateRem(6px) 0 rgba($ibexa-color-dark-300, 0.35);
- border-radius: calculateRem(4px);
- top: calculateRem(100px);
- right: 0;
- height: calc(100vh - #{calculateRem(100px)});
- opacity: 1;
- transform: scaleX(1);
- transform-origin: right center;
- z-index: 200;
- transition:
- transform 0.4s ease-in,
- opacity 0.4s ease-in;
+ .ibexa-instant-filter__group-item {
+ .ibexa-btn {
+ @include edit-language-item;
- &--hidden {
- opacity: 0;
- transform: scaleX(0);
- transition:
- transform 0.2s ease-out,
- opacity 0.2s ease-out;
- }
- }
-
- &__title {
- color: $ibexa-color-primary;
- font-size: calculateRem(16px);
- line-height: 2;
- font-weight: bold;
- border-bottom: calculateRem(1px) solid $ibexa-color-primary;
- margin-bottom: calculateRem(15px);
- }
-
- &__list {
- display: flex;
- flex-direction: column;
- max-height: calculateRem(300px);
- overflow: auto;
-
- .ibexa-btn--content-edit {
- background-color: $ibexa-color-white;
- padding: calculateRem(9px) calculateRem(24px);
+ display: block;
+ width: 100%;
text-align: left;
- box-shadow: 0 calculateRem(2px) calculateRem(4px) 0 rgba($ibexa-color-black, 0.1);
- margin-bottom: calculateRem(8px);
-
- &:hover,
- &:focus {
- background: $ibexa-color-light;
- font-weight: 700;
- text-decoration: none;
- }
}
}
}
diff --git a/src/bundle/Resources/public/scss/mixins/_edit-language-selector.scss b/src/bundle/Resources/public/scss/mixins/_edit-language-selector.scss
new file mode 100644
index 0000000000..1d9b14fc3f
--- /dev/null
+++ b/src/bundle/Resources/public/scss/mixins/_edit-language-selector.scss
@@ -0,0 +1,19 @@
+@mixin edit-language-item {
+ display: block;
+ margin: 0 0 calculateRem(12px) 0;
+ padding: calculateRem(8px) calculateRem(16px);
+ border-radius: calculateRem(8px);
+ font-size: $ibexa-text-font-size-medium;
+ color: $ibexa-color-dark;
+ border: calculateRem(1px) solid $ibexa-color-light;
+
+ &:hover {
+ border-color: $ibexa-color-primary;
+ cursor: pointer;
+ }
+
+ &--active {
+ background-color: $ibexa-color-light-200;
+ border-color: $ibexa-color-light-400;
+ }
+}
diff --git a/src/bundle/Resources/public/scss/ui/modules/sub-items-list/_language.selector.scss b/src/bundle/Resources/public/scss/ui/modules/sub-items-list/_language.selector.scss
index a031328cd0..d9297f37b8 100644
--- a/src/bundle/Resources/public/scss/ui/modules/sub-items-list/_language.selector.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/sub-items-list/_language.selector.scss
@@ -1,13 +1,12 @@
.c-language-selector {
.ibexa-instant-filter {
- &__items {
- margin-top: calculateRem(5px);
- max-height: calc(100vh - #{calculateRem(220px)});
- overflow: auto;
-
+ &__item {
.form-check-label {
- font-size: $ibexa-text-font-size;
- line-height: calculateRem(50px);
+ @include edit-language-item;
+ }
+
+ .ibexa-input[type='radio'] {
+ display: none;
}
}
}
diff --git a/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_translation.selector.scss b/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_translation.selector.scss
index 866557f336..0382128c61 100644
--- a/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_translation.selector.scss
+++ b/src/bundle/Resources/public/scss/ui/modules/universal-discovery/_translation.selector.scss
@@ -1,64 +1,10 @@
.c-translation-selector {
- position: fixed;
- right: 0;
- top: 0;
- height: 100%;
- width: calculateRem(700px);
- background-color: $ibexa-color-white;
- transform: scaleX(1);
- transform-origin: right center;
- opacity: 1;
- transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
- padding: calculateRem(16px);
- z-index: 5;
- color: $ibexa-color-dark;
- box-shadow: calculateRem(4px) calculateRem(22px) calculateRem(47px) 0 rgba($ibexa-color-info, 0.15);
+ .ibexa-instant-filter {
+ &__item {
+ @include edit-language-item;
- &--hidden {
- transform: scaleX(0);
- opacity: 0;
- }
-
- &__header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: calculateRem(4px) calculateRem(8px) calculateRem(24px) calculateRem(16px);
- margin-bottom: calculateRem(24px);
- border-bottom: calculateRem(1px) solid $ibexa-color-light;
- }
-
- &__title {
- margin-bottom: 0;
- }
-
- &__close-button {
- padding: calculateRem(8px);
- }
-
- &__languages-wrapper {
- max-height: calc(100% - #{calculateRem(50px)});
- overflow: auto;
- width: 75%;
- padding: calculateRem(16px);
- }
-
- &__language {
- background: $ibexa-color-white;
- display: flex;
- width: 100%;
- padding: calculateRem(13px) calculateRem(10px);
- border: calculateRem(1px) solid $ibexa-color-light;
- border-radius: $ibexa-border-radius;
- box-shadow: calculateRem(4px) calculateRem(2px) calculateRem(17px) 0 rgba($ibexa-color-info, 0.05);
- transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
- cursor: pointer;
- margin-bottom: calculateRem(8px);
-
- &:hover {
- border-color: $ibexa-color-dark;
- transform: scale(1.02) translateX(-10px);
- box-shadow: calculateRem(4px) calculateRem(10px) calculateRem(17px) 0 rgba($ibexa-color-info, 0.2);
+ width: 100%;
+ text-align: left;
}
}
}
diff --git a/src/bundle/Resources/translations/ibexa_admin_ui.en.xliff b/src/bundle/Resources/translations/ibexa_admin_ui.en.xliff
index 8272a323fb..d4701e7130 100644
--- a/src/bundle/Resources/translations/ibexa_admin_ui.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_admin_ui.en.xliff
@@ -51,10 +51,30 @@
Edit
key: edit_translation.edit.title
-
- Select language
- Select language
- key: edit_translation.list.title
+
+ Discard
+ Discard
+ key: edit_translation.languages.discard
+
+
+ Edit
+ Edit
+ key: edit_translation.languages.edit
+
+
+ Languages
+ Languages
+ key: edit_translation.languages.filter.description
+
+
+ Search...
+ Search...
+ key: edit_translation.languages.filter.placeholder
+
+
+ Select translation
+ Select translation
+ key: edit_translation.languages.select_language_title
Removed '%languageCode%' translation from '%name%'.
diff --git a/src/bundle/Resources/translations/ibexa_locationview.en.xliff b/src/bundle/Resources/translations/ibexa_locationview.en.xliff
index 244a06bc4c..a6bf9ab341 100644
--- a/src/bundle/Resources/translations/ibexa_locationview.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_locationview.en.xliff
@@ -66,6 +66,26 @@
You do not have the '%function%' '%module%' permission for content ID: %contentId%
key: dashboard.table.relation.unauthorized
+
+ Discard
+ Discard
+ key: edit.languages.discard
+
+
+ Edit
+ Edit
+ key: edit.languages.edit
+
+
+ Search...
+ Search...
+ key: instant.filter.languages.placeholder
+
+
+ Languages
+ Languages
+ key: instant.filter.languages.select_language.desc
+
Add to bookmarks
Add to bookmarks
diff --git a/src/bundle/Resources/translations/ibexa_sub_items.en.xliff b/src/bundle/Resources/translations/ibexa_sub_items.en.xliff
index b1bb4d3c60..570f1bbde4 100644
--- a/src/bundle/Resources/translations/ibexa_sub_items.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_sub_items.en.xliff
@@ -181,6 +181,16 @@
The selected location(s) have been revealed.
key: bulk_unhide.success.message
+
+ Discard
+ Discard
+ key: edit.languages.discard
+
+
+ Edit
+ Edit
+ key: edit.languages.edit
+
Edit
Edit
@@ -191,9 +201,14 @@
Hide
key: hide_locations_btn.label
+
+ Languages
+ Languages
+ key: instant.filter.languages.select_language.desc
+
- Search by content type
- Search by content type
+ Search...
+ Search...
key: instant.filter.placeholder
@@ -282,8 +297,8 @@
key: items_table.row.visible.label
- Select language
- Select language
+ Select translation
+ Select translation
key: languages.modal.label
diff --git a/src/bundle/Resources/translations/ibexa_universal_discovery_widget.en.xliff b/src/bundle/Resources/translations/ibexa_universal_discovery_widget.en.xliff
index 87643b60b2..7d6670aa57 100644
--- a/src/bundle/Resources/translations/ibexa_universal_discovery_widget.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_universal_discovery_widget.en.xliff
@@ -191,6 +191,11 @@
Items already added to the list are marked as selected and unable to deselect.
key: init_selected_locations.alert.title
+
+ Search...
+ Search...
+ key: instant.filter.languages.placeholder
+
Could not fetch content names
Could not fetch content names
@@ -216,11 +221,26 @@
Edit
key: meta_preview.edit
+
+ Discard
+ Discard
+ key: meta_preview.edit.languages.discard
+
+
+ Edit
+ Edit
+ key: meta_preview.edit.languages.edit
+
Select translation
Select translation
key: meta_preview.edit_translation
+
+ Languages
+ Languages
+ key: meta_preview.instant.filter.languages.select_language.desc
+
Modified
Modified
diff --git a/src/bundle/Resources/views/themes/admin/content/widget/content_create.html.twig b/src/bundle/Resources/views/themes/admin/content/widget/content_create.html.twig
index 1e2ca2fb0d..4075118c31 100644
--- a/src/bundle/Resources/views/themes/admin/content/widget/content_create.html.twig
+++ b/src/bundle/Resources/views/themes/admin/content/widget/content_create.html.twig
@@ -16,7 +16,7 @@
{% endif %}
-