Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-30032: CustomTags not saved correctly #833

Merged
merged 4 commits into from
Feb 12, 2019

Conversation

mateuszbieniek
Copy link
Contributor

@mateuszbieniek mateuszbieniek commented Feb 7, 2019

Question Answer
Tickets https://jira.ez.no/browse/EZP-30032
Bug fix? yes
New feature? no
BC breaks? no

This PR adds a line to fire editorInteraction event at the end of CustomTag creation in RichText so AlloyEditor's UI is updated and aware of the changes.

As a side effect this PR fixes also this issue: https://jira.ez.no/browse/EZP-30010

@@ -210,6 +210,8 @@
*/
setName: function(name) {
this.element.data('ezname', name);
window.clearTimeout(this.setNameFireEditorInteractionTimeout);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each timeout handler should be defined at the top (after the editables object).

setNameFireEditorInteractionTimeout: null

@@ -263,6 +265,8 @@
setAlignment: function(type) {
this.wrapper.data(DATA_ALIGNMENT_ATTR, type);
this.element.data(DATA_ALIGNMENT_ATTR, type);
window.clearTimeout(this.setAlignmentFireEditorInteractionTimeout);
this.setAlignmentFireEditorInteractionTimeout = window.setTimeout(this.fireEditorInteraction.bind(this,'aligmentUpdated'), 50);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after , in bind(this,'aligmentUpdated'), applies in other cases.

@@ -274,6 +278,8 @@
unsetAlignment: function() {
this.wrapper.data(DATA_ALIGNMENT_ATTR, false);
this.element.data(DATA_ALIGNMENT_ATTR, false);
window.clearTimeout(this.unsetAlignmentFireEditorInteractionTimeout);
this.unsetAlignmentFireEditorInteractionTimeout = window.setTimeout(this.fireEditorInteraction.bind(this,'aligmentRemoved'), 50);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those lines seem to be too long. Do you use Prettier?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I will in the future, thanks!

@lserwatka lserwatka merged commit c9f3de8 into ezsystems:1.4 Feb 12, 2019
@lserwatka
Copy link
Member

Could you merge it up?

@mateuszbieniek
Copy link
Contributor Author

Could you merge it up?

done

@mateuszbieniek mateuszbieniek deleted the EZP-30032 branch February 12, 2019 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

8 participants