mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Merge pull request #3026 from mabashian/backspace-job-launch
Better fix for the job launch modal backspace bug
This commit is contained in:
@@ -255,16 +255,6 @@ var tower = angular.module('Tower', [
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}]
|
}]
|
||||||
},
|
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
}
|
||||||
}).
|
}).
|
||||||
|
|
||||||
@@ -274,16 +264,6 @@ var tower = angular.module('Tower', [
|
|||||||
controller: JobsListController,
|
controller: JobsListController,
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
label: "JOBS"
|
label: "JOBS"
|
||||||
},
|
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
}
|
||||||
}).
|
}).
|
||||||
|
|
||||||
|
|||||||
@@ -17,15 +17,5 @@ export default {
|
|||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
skip: true // Never display this state in breadcrumb.
|
skip: true // Never display this state in breadcrumb.
|
||||||
},
|
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,15 +30,5 @@ export default {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
templateUrl: templateUrl('job-detail/job-detail'),
|
templateUrl: templateUrl('job-detail/job-detail'),
|
||||||
controller: 'JobDetailController',
|
controller: 'JobDetailController'
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -89,6 +89,12 @@ export default [ 'templateUrl', 'CreateDialog', 'Wait', 'CreateSelect2', 'ParseT
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
scope.$on("$stateChangeStart", function() {
|
||||||
|
scope.$evalAsync(function( scope ) {
|
||||||
|
scope.clearDialog();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
scope.init();
|
scope.init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,8 @@ export default {
|
|||||||
label: "CREATE JOB TEMPLATE"
|
label: "CREATE JOB TEMPLATE"
|
||||||
},
|
},
|
||||||
onExit: function(){
|
onExit: function(){
|
||||||
// close the job launch modal
|
// close the survey maker modal
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
|
|
||||||
if($("#survey-modal-dialog").hasClass('ui-dialog-content')) {
|
if($("#survey-modal-dialog").hasClass('ui-dialog-content')) {
|
||||||
$('#survey-modal-dialog').dialog('destroy');
|
$('#survey-modal-dialog').dialog('destroy');
|
||||||
|
|||||||
@@ -19,14 +19,8 @@ export default {
|
|||||||
label: "{{name}}"
|
label: "{{name}}"
|
||||||
},
|
},
|
||||||
onExit: function(){
|
onExit: function(){
|
||||||
// close the job launch modal
|
// close the survey maker modal
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
|
|
||||||
if($("#survey-modal-dialog").hasClass('ui-dialog-content')) {
|
if($("#survey-modal-dialog").hasClass('ui-dialog-content')) {
|
||||||
$('#survey-modal-dialog').dialog('destroy');
|
$('#survey-modal-dialog').dialog('destroy');
|
||||||
|
|||||||
@@ -17,15 +17,5 @@ export default {
|
|||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
label: "JOB TEMPLATES"
|
label: "JOB TEMPLATES"
|
||||||
},
|
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -121,16 +121,6 @@ export default [
|
|||||||
features: ['FeaturesService', function(FeaturesService) {
|
features: ['FeaturesService', function(FeaturesService) {
|
||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
}]
|
}]
|
||||||
},
|
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,15 +24,5 @@ export default {
|
|||||||
templateUrl: templateUrl('portal-mode/portal-mode-jobs'),
|
templateUrl: templateUrl('portal-mode/portal-mode-jobs'),
|
||||||
controller: PortalModeJobsController
|
controller: PortalModeJobsController
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onExit: function(){
|
|
||||||
// close the job launch modal
|
|
||||||
// using an onExit event to handle cases where the user navs away using the url bar / back and not modal "X"
|
|
||||||
// Destroy the dialog
|
|
||||||
if($("#job-launch-modal").hasClass('ui-dialog-content')) {
|
|
||||||
$('#job-launch-modal').dialog('destroy');
|
|
||||||
}
|
|
||||||
// Remove the directive from the page (if it's there)
|
|
||||||
$('#content-container').find('submit-job').remove();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user