Merge pull request #1455 from coreos-inc/better-dialogs

Better dialogs
This commit is contained in:
josephschorr 2016-05-16 18:27:03 -04:00
commit ee557c944a
32 changed files with 702 additions and 233 deletions

View file

@ -22,6 +22,12 @@ angular.module('quay').directive('credentialsDialog', function () {
$scope.rkt = {};
$scope.docker = {};
$scope.$on('$destroy', function() {
if ($scope.inBody) {
document.body.removeChild($element[0]);
}
});
// Generate a unique ID for the dialog.
if (!$rootScope.credentialsDialogCounter) {
$rootScope.credentialsDialogCounter = 0;
@ -36,6 +42,11 @@ 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.
$scope.inBody = true;
document.body.appendChild($element[0]);
};
$scope.$watch('credentials', function(credentials) {