diff --git a/static/js/app.js b/static/js/app.js index 2b608dcc3..c13912532 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -1,23 +1,21 @@ quayApp = angular.module('quay', ['restangular']). - config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $routeProvider. - when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}). - when('/repository/:namespace/:name/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}). + when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}). + when('/repository/:namespace/:name/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}). - when('/repository/', {title: 'Repositories', templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}). - when('/', {title: 'Quay', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}). - otherwise({redirectTo: '/'}); - - //$locationProvider.html5Mode(true); + when('/repository/', {title: 'Repositories', templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}). + when('/', {title: 'Quay', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}). + otherwise({redirectTo: '/'}); }]). config(function(RestangularProvider) { RestangularProvider.setBaseUrl('/api/'); }); quayApp.run(['$location', '$rootScope', function($location, $rootScope) { - $rootScope.$on('$routeChangeSuccess', function (event, current, previous) { - if (current.$$route.title) { - $rootScope.title = current.$$route.title; - } - }); + $rootScope.$on('$routeChangeSuccess', function (event, current, previous) { + if (current.$$route.title) { + $rootScope.title = current.$$route.title; + } + }); }]); \ No newline at end of file diff --git a/static/js/controllers.js b/static/js/controllers.js index 9131cd2cf..a521be593 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -13,15 +13,15 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) { $rootScope.title = 'Loading...'; $scope.editDescription = function() { - if (!$scope.repo.can_write) { return; } - $('#descriptionEdit')[0].value = $scope.repo.description || ''; - $('#editModal').modal({}); + if (!$scope.repo.can_write) { return; } + $('#descriptionEdit')[0].value = $scope.repo.description || ''; + $('#editModal').modal({}); }; $scope.saveDescription = function() { - $('#editModal').modal('hide'); - $scope.repo.description = $('#descriptionEdit')[0].value; - $scope.repo.put(); + $('#editModal').modal('hide'); + $scope.repo.description = $('#descriptionEdit')[0].value; + $scope.repo.put(); }; var namespace = $routeParams.namespace; @@ -30,11 +30,11 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) { var repositoryFetch = Restangular.one('repository/' + namespace + '/' + name); repositoryFetch.get().then(function(repo) { - $rootScope.title = namespace + '/' + name; - $scope.repo = repo; - $scope.currentTag = repo.tags[tag] || repo.tags['latest']; + $rootScope.title = namespace + '/' + name; + $scope.repo = repo; + $scope.currentTag = repo.tags[tag] || repo.tags['latest']; }, function() { - $scope.repo = null; - $rootScope.title = 'Unknown Repository'; + $scope.repo = null; + $rootScope.title = 'Unknown Repository'; }); } \ No newline at end of file diff --git a/static/partials/view-repo.html b/static/partials/view-repo.html index 7bdeef571..cf2ed08e2 100644 --- a/static/partials/view-repo.html +++ b/static/partials/view-repo.html @@ -21,56 +21,55 @@
- {{ currentTag.image.comment || '' }} --
+ {{ currentTag.image.comment || '' }} ++