Retab files.

This commit is contained in:
yackob03 2013-09-26 19:07:25 -04:00
parent 2fbd016595
commit ccc6e3bd2e
4 changed files with 91 additions and 94 deletions

View file

@ -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';
});
}