Bugfix, TODO

This commit is contained in:
jendib 2013-08-01 00:06:21 +02:00
parent 3345f3def6
commit e0bccf7121
5 changed files with 6 additions and 2 deletions

View File

@ -1 +1,2 @@
- Server side reordering files
- Server side reordering files
- GET /app/stats to display general data (server/client)

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -44,7 +44,7 @@ App.controller('Document', function($scope, $state, Restangular) {
})
.then(function(data) {
$scope.documents = data.documents;
$scope.totalDocuments = data.total;
$scope.totalDocuments = data.total; // TODO This is not really the total number of documents
$scope.numPages = Math.ceil(data.total / $scope.limit);
});
};

View File

@ -59,6 +59,7 @@ App.controller('DocumentEdit', function($scope, $q, $http, $state, $stateParams,
$state.transitionTo('document.view', { id: $stateParams.id });
} else {
$scope.document = {};
$scope.newFiles = [];
$scope.loadDocuments();
}
}
@ -100,6 +101,7 @@ App.controller('DocumentEdit', function($scope, $q, $http, $state, $stateParams,
sendFile(key).then(then);
} else {
$scope.fileIsUploading = false;
$scope.fileProgress = 0;
navigateNext();
}
};

View File

@ -15,6 +15,7 @@ App.controller('Tag', function($scope, $dialog, $state, Tag, Restangular) {
$scope.addTag = function() {
var name = $scope.tag.name;
$scope.tag.name = '';
// TODO Check if the tag don't already exists
Restangular.one('tag').put({ name: name }).then(function(data) {
$scope.tags.push({ id: data.id, name: name });
});