Wired schedule edit to Jobs page. Fixed issues with modal dialogs. On inventory hosts focus is now set to first field rather than help icon. ESC key no longer closes jqueryui dialogs as it conflicts with clicking ESC to close help pop-over. Resizing a dialog no longer causes button pane (the dialog footer) to appear to grow taller and taller.

This commit is contained in:
Chris Houseknecht
2014-03-26 16:33:41 -04:00
parent 702e575ecf
commit 3d0d75e897
14 changed files with 123 additions and 42 deletions

View File

@@ -10,8 +10,9 @@
'use strict';
function ScheduleEdit($scope, $compile, $location, $routeParams, SchedulesList, GenerateList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
GetBasePath, LookUpInit, Wait, SchedulerInit, Breadcrumbs, SearchInit, PaginateInit, PageRangeSetup, EditSchedule, AddSchedule, Find, ToggleSchedule, DeleteSchedule) {
function ScheduleEditController($scope, $compile, $location, $routeParams, SchedulesList, GenerateList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
GetBasePath, LookUpInit, Wait, SchedulerInit, Breadcrumbs, SearchInit, PaginateInit, PageRangeSetup, EditSchedule, AddSchedule, Find, ToggleSchedule, DeleteSchedule,
LoadDialogPartial) {
ClearScope();
@@ -156,21 +157,33 @@ GetBasePath, LookUpInit, Wait, SchedulerInit, Breadcrumbs, SearchInit, PaginateI
});
};
// Load the parent object
id = $routeParams.id;
Rest.setUrl(GetBasePath(base) + id);
Rest.get()
.success(function(data) {
parentObject = data;
$scope.$emit('ParentLoaded');
})
.error(function(status) {
ProcessErrors($scope, null, status, null, { hdr: 'Error!',
msg: 'Call to ' + url + ' failed. GET returned: ' + status });
});
if ($scope.removeLoadParent) {
$scope.removeLoadParent();
}
$scope.removeLoadParent = $scope.$on('LoadParent', function() {
// Load the parent object
id = $routeParams.id;
url = GetBasePath(base) + id;
Rest.setUrl(url);
Rest.get()
.success(function(data) {
parentObject = data;
$scope.$emit('ParentLoaded');
})
.error(function(status) {
ProcessErrors($scope, null, status, null, { hdr: 'Error!',
msg: 'Call to ' + url + ' failed. GET returned: ' + status });
});
});
LoadDialogPartial({
scope: $scope,
element_id: 'schedule-dialog-target',
callback: 'LoadParent',
});
}
ScheduleEdit.$inject = ['$scope', '$compile', '$location', '$routeParams', 'SchedulesList', 'GenerateList', 'Rest', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller',
ScheduleEditController.$inject = ['$scope', '$compile', '$location', '$routeParams', 'SchedulesList', 'GenerateList', 'Rest', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller',
'ClearScope', 'GetBasePath', 'LookUpInit', 'Wait', 'SchedulerInit', 'Breadcrumbs', 'SearchInit', 'PaginateInit', 'PageRangeSetup', 'EditSchedule', 'AddSchedule',
'Find', 'ToggleSchedule', 'DeleteSchedule'
'Find', 'ToggleSchedule', 'DeleteSchedule', 'LoadDialogPartial'
];