Unload

This can be useful feature for prevent unwanted navigation from Editor like page if user has unsaved data.

Usage

Name Description
window.e.utils.v2.navigation.unload.init({headline, content, confirm, cancel}) Blocking navigation with Confirmation dialog
window.e.utils.v2.navigation.unload.reset() Allow navigate from page

Parameters

It is possible to change partially as well

Name Description Type Required Default value
headline Customize dialog headline. no Confirm Navigation?
content Customize dialog content. no Your unsaved changes will be lost.
confirm Label of confirm button. no Continue
cancel Label of cancel button. no Cancel

Examples

if (isCampaignDirty) {
window.e.utils.v2.navigation.unload.init();
} else {
window.e.utils.v2.navigation.unload.reset();
}