[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:
Pete Richards
2016-12-20 15:10:07 -08:00
parent f2d61604f7
commit daa71c4f69
8 changed files with 20 additions and 282 deletions

View File

@ -1338,20 +1338,6 @@ are supported:
Open MCT defines several Angular directives that are intended for use both
internally within the platform, and by plugins.
## Before Unload
The `mct-before-unload` directive is used to listen for (and prompt for user
confirmation) of navigation changes in the browser. This includes reloading,
following links out of Open MCT, or changing routes. It is used to hook into
both `onbeforeunload` event handling as well as route changes from within
Angular.
This directive is useable as an attribute. Its value should be an Angular
expression. When an action that would trigger an unload and/or route change
occurs, this Angular expression is evaluated. Its result should be a message to
display to the user to confirm their navigation change; if this expression
evaluates to a falsy value, no message will be displayed.
## Chart