Skip to content

Commit

Permalink
chore(edit-page-2): Updated logic to hide ema-tools menu (#28326)
Browse files Browse the repository at this point in the history
* Updated logic to hide ema-tools menu

* Added missing message on save content from inline editing

---------

Co-authored-by: KevinDavilaDotCMS <kfariid@gmail.com>
Co-authored-by: Jalinson Diaz <zjaaaldev@gmail.com>
  • Loading branch information
3 people authored and Neehakethi committed Apr 24, 2024
1 parent 8966531 commit 7920bbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,7 @@ export class EditEmaStore extends ComponentStore<EditEmaState> {
() => {
this.messageService.add({
severity: 'success',
summary: this.dotMessageService.get(
'editpage.content.update.success'
),
summary: this.dotMessageService.get('message.content.saved'),
life: 2000
});
this.setEditorMode(EDITOR_MODE.EDIT);
Expand All @@ -468,7 +466,7 @@ export class EditEmaStore extends ComponentStore<EditEmaState> {
this.messageService.add({
severity: 'error',
summary: this.dotMessageService.get(
'editpage.content.update.error'
'editpage.content.update.contentlet.error'
),
life: 2000
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,13 @@ export class EmaContentletToolsComponent implements OnInit, OnChanges {
const currentValue = contentletChange.currentValue?.payload;
const previousValue = contentletChange.previousValue?.payload;

const hasIdentifierChanged =
const hasContentletIdentifierChanged =
currentValue?.contentlet.identifier !== previousValue?.contentlet.identifier;
const hasUUIDChanged = currentValue?.container.uuid !== previousValue?.container.uuid;
const hasContainerIdentifierChanged =
currentValue?.container.identifier !== previousValue?.container.identifier;

return hasIdentifierChanged || hasUUIDChanged;
return hasContentletIdentifierChanged || hasUUIDChanged || hasContainerIdentifierChanged;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5015,6 +5015,7 @@ editpage.header.copy=Copy URL
editpage.preview=Show Preview
editpage.header.back.to.experiment=Back to experiment
editpage.container.is.empty=This container is empty
editpage.content.update.contentlet.error=Error saving content
errors.user.front-end-role.missing=User does not have the Front-end User Role.
image.editor.heading.file.settings=File Settings
image.editor.heading.image-size=Image Size
Expand Down

0 comments on commit 7920bbd

Please sign in to comment.