London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Basically, you can listen on:
IContentEvents.DeletedContentVersion
on server side then I guess that you'll have a confusion between "Revert To Published" and "Delete Version" action!
But never mind you can use client side as a "spy agency" to do this.
dojo.require(["dojo/aspect", "epi/dependency"], function(aspect, dependencey) {
var editingCommands = dependency.resolve("epi.cms.contentEditing.command.Editing");
aspect.before(editingCommands.revertToPublished, "_execute", function() {
// TODO: Reverting Content To Published
});
});
I don't try this code above but I think it's should work.
//Ha Bui
Hi!
How can I catch an event, when I click "Revert to Publish"?