mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Cleanup tower modal issue between saves
cleaned up the management modal between states
This commit is contained in:
parent
58ef1df906
commit
f5100ee110
@ -120,6 +120,7 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
||||
scope.cancelConfigure = function () {
|
||||
try {
|
||||
$('#configure-tower-dialog').dialog('close');
|
||||
$("#configure-save-button").remove();
|
||||
}
|
||||
catch(e) {
|
||||
//ignore
|
||||
@ -198,9 +199,6 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
||||
$('#prompt-for-days').dialog('open');
|
||||
Wait('stop');
|
||||
});
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
scope.configureSchedule = function(id, name) {
|
||||
@ -225,13 +223,11 @@ angular.module('ConfigureTowerHelper', [ 'Utilities', 'RestServices', 'Schedules
|
||||
})
|
||||
.error(function(data, status) {
|
||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||
msg: 'Failed updating job ' + scope.job_template_id + ' with variables. PUT returned: ' + status });
|
||||
msg: 'Failed getting schedule information' });
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
parent_scope.refreshJobs = function(){
|
||||
scope.search(SchedulesList.iterator);
|
||||
};
|
||||
@ -259,17 +255,6 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
container,
|
||||
elem;
|
||||
|
||||
// <div id='configure-tower-dialog' style="display:none">
|
||||
// <div id="configure-jobs-list"></div>
|
||||
// <div id="configure-schedule-form"></div>
|
||||
// </div>
|
||||
|
||||
// Wait('start');
|
||||
// detail = $('#schedules-detail').hide();
|
||||
// list = $('#schedules-list');
|
||||
// target = $('#schedules-form');
|
||||
// container = $('#schedules-form-container');
|
||||
|
||||
Wait('start');
|
||||
// $('#configure-jobs').hide();
|
||||
detail = $('#configure-schedules-detail').hide();
|
||||
@ -289,6 +274,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$("#configure-cancel-button").after('<button type="button" class="btn btn-primary btn-sm" id="configure-save-button" ng-click="saveScheduleForm()" style="margin-left:5px"><i class="fa fa-check"></i> Save</button>');
|
||||
elem = angular.element(document.getElementById('configure-schedules-form-container'));
|
||||
$compile(elem)(scope);
|
||||
|
||||
@ -367,6 +353,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
}
|
||||
scope.removeScheduleSaved = scope.$on('ScheduleSaved', function() {
|
||||
Wait('stop');
|
||||
$("#configure-save-button").remove();
|
||||
container.hide('slide', { direction: 'left' }, 500, restoreList);
|
||||
scope.$destroy();
|
||||
});
|
||||
@ -452,6 +439,7 @@ function($compile, SchedulerInit, Rest, Wait, SetSchedulesInnerDialogSize, Sched
|
||||
|
||||
scope.cancelScheduleForm = function() {
|
||||
container.hide('slide', { direction: 'right' }, 500, restoreList);
|
||||
$("#configure-save-button").remove();
|
||||
scope.$destroy();
|
||||
};
|
||||
|
||||
|
||||
@ -416,8 +416,8 @@
|
||||
<a id="configure-schedules-flip-link" ng-show="formShowing" ng-click="showScheduleDetail()" href=""><i class="fa fa-search-plus"></i> View Details</a>
|
||||
<a id="configure-schedules-flip-link" ng-show="!formShowing" ng-click="showScheduleDetail()" href=""><i class="fa fa-arrow-circle-left"></i> Back to options</a>
|
||||
<button type="button" class="btn btn-default btn-sm" id="configure-schedule-delete-button" ng-show="mode==='edit'" ng-click="deleteSystemSchedule($event)"><i class="fa fa-trash-o"></i> Delete</button>
|
||||
<button type="button" class="btn btn-default btn-sm" id="configure-reset-button" ng-click="cancelScheduleForm()"><i class="fa fa-times"></i> Cancel</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="configure-save-button" ng-click="saveScheduleForm()"><i class="fa fa-check"></i> Save</button>
|
||||
<button type="button" class="btn btn-default btn-sm" id="configure-cancel-button" ng-click="cancelScheduleForm()"><i class="fa fa-times"></i> Cancel</button>
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm" id="configure-save-button" ng-click="saveScheduleForm()"><i class="fa fa-check"></i> Save</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user