Move the credentials dialog to always be under the body

Fixes a CSS issue with display:table-cell and nesting
This commit is contained in:
Joseph Schorr 2016-05-12 13:42:11 -04:00
parent 23e925b259
commit 580814f712

View file

@ -22,6 +22,10 @@ angular.module('quay').directive('credentialsDialog', function () {
$scope.rkt = {};
$scope.docker = {};
$scope.$on('$destroy', function() {
document.body.removeChild($element[0]);
});
// Generate a unique ID for the dialog.
if (!$rootScope.credentialsDialogCounter) {
$rootScope.credentialsDialogCounter = 0;
@ -36,6 +40,10 @@ angular.module('quay').directive('credentialsDialog', function () {
$scope.show = function() {
$element.find('.modal').modal({});
// Move the dialog to the body to prevent it from being affected
// by being placed inside other tables.
document.body.appendChild($element[0]);
};
$scope.$watch('credentials', function(credentials) {