Merge remote-tracking branch 'origin/touchdown'
Conflicts: static/css/quay.css static/js/controllers.js test/data/test.db
This commit is contained in:
commit
c338b7d621
33 changed files with 1296 additions and 242 deletions
|
@ -1490,7 +1490,15 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
when('/organization/:orgname/application/:clientid', {templateUrl: '/static/partials/manage-application.html',
|
||||
controller: ManageApplicationCtrl, reloadOnSearch: false}).
|
||||
when('/v1/', {title: 'Activation information', templateUrl: '/static/partials/v1-page.html', controller: V1Ctrl}).
|
||||
when('/', {title: 'Hosted Private Docker Registry', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}).
|
||||
|
||||
|
||||
when('/tour/', {title: 'Quay.io Tour', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
|
||||
when('/tour/organizations', {title: 'Teams and Organizations Tour', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
|
||||
when('/tour/features', {title: 'Quay.io Features', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
|
||||
when('/tour/enterprise', {title: 'Quay.io Enterprise Edition', templateUrl: '/static/partials/tour.html', controller: TourCtrl}).
|
||||
|
||||
when('/', {title: 'Hosted Private Docker Registry', templateUrl: '/static/partials/landing.html', controller: LandingCtrl,
|
||||
pageClass: 'landing-page'}).
|
||||
otherwise({redirectTo: '/'});
|
||||
}]).
|
||||
config(function(RestangularProvider) {
|
||||
|
@ -2061,6 +2069,38 @@ quayApp.directive('signupForm', function () {
|
|||
});
|
||||
|
||||
|
||||
quayApp.directive('tourContent', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/tour-content.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'kind': '=kind'
|
||||
},
|
||||
controller: function($scope, $element, $timeout, UserService) {
|
||||
// Monitor any user changes and place the current user into the scope.
|
||||
UserService.updateUserIn($scope);
|
||||
|
||||
$scope.chromify = function() {
|
||||
browserchrome.update();
|
||||
};
|
||||
|
||||
$scope.$watch('kind', function(kind) {
|
||||
$timeout(function() {
|
||||
$scope.chromify();
|
||||
});
|
||||
});
|
||||
},
|
||||
link: function($scope, $element, $attr, ctrl) {
|
||||
$scope.chromify();
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
||||
|
||||
|
||||
quayApp.directive('plansTable', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
|
@ -4417,6 +4457,27 @@ quayApp.directive('buildProgress', function () {
|
|||
});
|
||||
|
||||
|
||||
quayApp.directive('twitterView', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/twitter-view.html',
|
||||
replace: false,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'avatarUrl': '@avatarUrl',
|
||||
'authorName': '@authorName',
|
||||
'authorUser': '@authorUser',
|
||||
'messageUrl': '@messageUrl',
|
||||
'messageDate': '@messageDate'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
||||
|
||||
|
||||
quayApp.directive('notificationView', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
|
@ -4920,6 +4981,18 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
});
|
||||
|
||||
|
||||
quayApp.directive('fallbackSrc', function () {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function postLink(scope, element, attributes) {
|
||||
element.bind('error', function() {
|
||||
angular.element(this).attr("src", attributes.fallbackSrc);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
// Note: ngBlur is not yet in Angular stable, so we add it manaully here.
|
||||
quayApp.directive('ngBlur', function() {
|
||||
return function( scope, elem, attrs ) {
|
||||
|
@ -4953,8 +5026,8 @@ quayApp.directive('ngVisible', function () {
|
|||
};
|
||||
});
|
||||
|
||||
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', 'Features',
|
||||
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService, Features) {
|
||||
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', 'Features', '$anchorScroll',
|
||||
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService, Features, $anchorScroll) {
|
||||
|
||||
// Handle session security.
|
||||
Restangular.setDefaultRequestParams(['post', 'put', 'remove', 'delete'], {'_csrf_token': window.__token || ''});
|
||||
|
@ -5046,6 +5119,7 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
|
|||
});
|
||||
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
||||
$rootScope.pageClass = '';
|
||||
$rootScope.current = current.$$route;
|
||||
|
||||
if (!current.$$route) { return; }
|
||||
|
@ -5054,6 +5128,10 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
|
|||
$rootScope.title = current.$$route.title;
|
||||
}
|
||||
|
||||
if (current.$$route.pageClass) {
|
||||
$rootScope.pageClass = current.$$route.pageClass;
|
||||
}
|
||||
|
||||
if (current.$$route.description) {
|
||||
$rootScope.description = current.$$route.description;
|
||||
} else {
|
||||
|
@ -5061,6 +5139,7 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
|
|||
}
|
||||
|
||||
$rootScope.fixFooter = !!current.$$route.fixFooter;
|
||||
$anchorScroll();
|
||||
});
|
||||
|
||||
$rootScope.$on('$viewContentLoaded', function(event, current) {
|
||||
|
|
Reference in a new issue