Get app information dialog working

This commit is contained in:
Joseph Schorr 2014-03-20 12:06:29 -04:00
parent 0992c8a47e
commit e07670613e
3 changed files with 53 additions and 2 deletions

View file

@ -1149,6 +1149,24 @@ quayApp.directive('entityReference', function () {
});
quayApp.directive('applicationInfo', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/application-info.html',
replace: false,
transclude: false,
restrict: 'C',
scope: {
'application': '=application'
},
controller: function($scope, $element, ApiService) {
}
};
return directiveDefinitionObject;
});
quayApp.directive('applicationReference', function () {
var directiveDefinitionObject = {
priority: 0,
@ -1167,7 +1185,13 @@ quayApp.directive('applicationReference', function () {
};
ApiService.getApplicationInformation(null, params).then(function(resp) {
// TODO: display the application information here.
$scope.applicationInfo = resp;
$modal({
title: 'Application Information',
scope: $scope,
template: '/static/directives/application-reference-dialog.html',
show: true
});
}, function() {
bootbox.dialog({
"message": 'The application could not be found; it might have been deleted.',
@ -1388,7 +1412,7 @@ quayApp.directive('signinForm', function () {
// Note: The timeout of 500ms is needed to ensure dialogs containing sign in
// forms get removed before the location changes.
$timeout(function() {
if (!$scope.redirectUrl || $scope.redirectUrl == $location.path()) {
if ($scope.redirectUrl == $location.path()) {
return;
}
$location.path($scope.redirectUrl ? $scope.redirectUrl : '/');