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