[Edit] Add mct-before-unload directive

Add directive for exposing expressions which should be
evaluated for the browser's onbeforeunload event, to
prevent user-initiated navigation from causing a loss
of unsaved changes. WTD-1035.
This commit is contained in:
Victor Woeltjen
2015-03-16 17:28:08 -07:00
parent d86e27504f
commit 783d2f332b
6 changed files with 110 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
<div content="jquery-wrapper"
class="abs holder-all edit-mode"
ng-controller="EditController">
ng-controller="EditController as editMode"
mct-before-unload="editMode.getUnloadWarning()">
<mct-representation key="'edit-object'" mct-object="navigatedObject">
<mct-representation key="'edit-object'" mct-object="editMode.navigatedObject()">
</mct-representation>
<mct-include key="'bottombar'"></mct-include>