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

Added an event when saving in an ElementEditor #2688

Closed
wants to merge 1 commit into from
Closed

Added an event when saving in an ElementEditor #2688

wants to merge 1 commit into from

Conversation

joshangell
Copy link
Contributor

@joshangell joshangell commented Apr 5, 2018

This allows any other cp JavaScript to listen to this event and therefore react when an element is saved from an ElementEditor.

I have made this change against Craft 2, but it should work on both.

This allows other JavaScript to listen to this event and therefore react when an element is saved from an ElementEditor.
@brandonkelly
Copy link
Member

That’s not the right way to go about it

  • change would need to be made on ElementEditor.js, while grunt watch is running
  • pretty sure you can’t have .s in event names, and attempting to listen to elementEditor.saveElement would really be listening to elementEditor events, with the listener getting namespaced to saveElement.

But I’m open to adding something similar. Can you explain the use case?

@brandonkelly
Copy link
Member

Nevermind, just saw #2689. Will follow up there.

@joshangell
Copy link
Contributor Author

Ah sorry, I couldn't get the local build working properly, which to be fair means this should never have been a PR ... sorry about that!

@joshangell joshangell deleted the feature/element-editor-save-event branch April 9, 2018 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants