mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Navigation] remove mct-before-unload
Remove mct-before-unload, and move the functionality to the navigation service. The navigation service considers "unload" to be a navigation event and prompts in much the same way as it would before any other navigation event. https://github.com/nasa/openmct/issues/1360
This commit is contained in:
@ -64,24 +64,6 @@ define(
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the warning to show if the user attempts to navigate
|
||||
* away from Edit mode while unsaved changes are present.
|
||||
* @returns {string} the warning to show, or undefined if
|
||||
* there are no unsaved changes
|
||||
*/
|
||||
EditObjectController.prototype.getUnloadWarning = function () {
|
||||
var navigatedObject = this.scope.domainObject,
|
||||
policyMessage;
|
||||
|
||||
this.policyService.allow("navigation", navigatedObject, undefined, function (message) {
|
||||
policyMessage = message;
|
||||
});
|
||||
|
||||
return policyMessage;
|
||||
|
||||
};
|
||||
|
||||
return EditObjectController;
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user