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) {
|
||||
|
|
|
@ -29,12 +29,7 @@ function SecurityCtrl($scope) {
|
|||
function ContactCtrl($scope) {
|
||||
}
|
||||
|
||||
function PlansCtrl($scope, $location, UserService, PlanService) {
|
||||
// Load the list of plans.
|
||||
PlanService.getPlans(function(plans) {
|
||||
$scope.plans = plans;
|
||||
}, /* include the personal plan */ true);
|
||||
|
||||
function PlansCtrl($scope, $location, UserService, PlanService, $routeParams) {
|
||||
// Monitor any user changes and place the current user into the scope.
|
||||
UserService.updateUserIn($scope);
|
||||
|
||||
|
@ -51,6 +46,15 @@ function PlansCtrl($scope, $location, UserService, PlanService) {
|
|||
$('#signinModal').modal({});
|
||||
}
|
||||
};
|
||||
|
||||
// Load the list of plans.
|
||||
PlanService.getPlans(function(plans) {
|
||||
$scope.plans = plans;
|
||||
|
||||
if ($scope && $routeParams['trial-plan']) {
|
||||
$scope.buyNow($routeParams['trial-plan']);
|
||||
}
|
||||
}, /* include the personal plan */ true);
|
||||
}
|
||||
|
||||
function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService, Config) {
|
||||
|
@ -270,6 +274,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
|
|||
|
||||
function LandingCtrl($scope, UserService, ApiService, Features, Config) {
|
||||
$scope.namespace = null;
|
||||
$scope.currentScreenshot = 'repo-view';
|
||||
|
||||
$scope.$watch('namespace', function(namespace) {
|
||||
loadMyRepos(namespace);
|
||||
|
@ -279,6 +284,10 @@ function LandingCtrl($scope, UserService, ApiService, Features, Config) {
|
|||
loadMyRepos($scope.namespace);
|
||||
});
|
||||
|
||||
$scope.changeScreenshot = function(screenshot) {
|
||||
$scope.currentScreenshot = screenshot;
|
||||
};
|
||||
|
||||
$scope.canCreateRepo = function(namespace) {
|
||||
if (!$scope.user) { return false; }
|
||||
|
||||
|
@ -311,6 +320,52 @@ function LandingCtrl($scope, UserService, ApiService, Features, Config) {
|
|||
|
||||
$scope.chromify = function() {
|
||||
browserchrome.update();
|
||||
|
||||
var jcarousel = $('.jcarousel');
|
||||
|
||||
jcarousel
|
||||
.on('jcarousel:reload jcarousel:create', function () {
|
||||
var width = jcarousel.innerWidth();
|
||||
jcarousel.jcarousel('items').css('width', width + 'px');
|
||||
})
|
||||
.jcarousel({
|
||||
wrap: 'circular'
|
||||
});
|
||||
|
||||
$('.jcarousel-control-prev')
|
||||
.on('jcarouselcontrol:active', function() {
|
||||
$(this).removeClass('inactive');
|
||||
})
|
||||
.on('jcarouselcontrol:inactive', function() {
|
||||
$(this).addClass('inactive');
|
||||
})
|
||||
.jcarouselControl({
|
||||
target: '-=1'
|
||||
});
|
||||
|
||||
$('.jcarousel-control-next')
|
||||
.on('jcarouselcontrol:active', function() {
|
||||
$(this).removeClass('inactive');
|
||||
})
|
||||
.on('jcarouselcontrol:inactive', function() {
|
||||
$(this).addClass('inactive');
|
||||
})
|
||||
.jcarouselControl({
|
||||
target: '+=1'
|
||||
});
|
||||
|
||||
$('.jcarousel-pagination')
|
||||
.on('jcarouselpagination:active', 'a', function() {
|
||||
$(this).addClass('active');
|
||||
})
|
||||
.on('jcarouselpagination:inactive', 'a', function() {
|
||||
$(this).removeClass('active');
|
||||
})
|
||||
.jcarouselPagination({
|
||||
'item': function(page, carouselItems) {
|
||||
return '<a href="javascript:void(0)" class="jcarousel-page"></a>';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getEnterpriseLogo = function() {
|
||||
|
@ -2738,3 +2793,7 @@ function SuperUserAdminCtrl($scope, ApiService, Features, UserService) {
|
|||
|
||||
loadSeatUsage();
|
||||
}
|
||||
|
||||
function TourCtrl($scope, $location) {
|
||||
$scope.kind = $location.path().substring('/tour/'.length);
|
||||
}
|
||||
|
|
Reference in a new issue