mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
fix wf unsaved changes exit functionality
This commit is contained in:
parent
9f5f86c6a7
commit
dc206c9ad6
@ -62,15 +62,15 @@ export default ['templateUrl', 'CreateDialog', 'Wait', '$state', '$window',
|
||||
scope.$broadcast("refreshWorkflowChart");
|
||||
});
|
||||
|
||||
scope.closeDialog = function() {
|
||||
if (scope.workflowChangesUnsaved || scope.workflowChangesStarted) {
|
||||
scope.unsavedChangesVisible = true;
|
||||
} else {
|
||||
scope.closeDialog = function(exitWithUnsavedChanges) {
|
||||
if (exitWithUnsavedChanges || !(scope.workflowChangesUnsaved || scope.workflowChangesStarted)) {
|
||||
scope.unsavedChangesVisible = false;
|
||||
$('#workflow-modal-dialog').dialog('destroy');
|
||||
$('body').removeClass('WorkflowMaker-preventBodyScrolling');
|
||||
|
||||
$state.go('^');
|
||||
} else {
|
||||
scope.unsavedChangesVisible = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<div class="Prompt-bodyQuery">{{strings.get('workflow_maker.UNSAVED_CHANGES_PROMPT_TEXT')}}</div>
|
||||
</div>
|
||||
<div class="Modal-footer">
|
||||
<button ng-click="closeDialog()" class="btn Modal-footerButton Modal-errorButton">{{strings.get('workflow_maker.EXIT')}}</button>
|
||||
<button ng-click="closeDialog(true)" class="btn Modal-footerButton Modal-errorButton">{{strings.get('workflow_maker.EXIT')}}</button>
|
||||
<button ng-click="cancelUnsavedChanges()" class="btn Modal-footerButton Modal-defaultButton">{{strings.get('workflow_maker.CANCEL')}}</button>
|
||||
<button
|
||||
ng-hide="formState.showNodeForm || formState.showLinkForm"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user