diff --git a/docs-parent/TODO b/docs-parent/TODO index ede7892f..3c84585a 100644 --- a/docs-parent/TODO +++ b/docs-parent/TODO @@ -1 +1,2 @@ -- Server side reordering files \ No newline at end of file +- Server side reordering files +- GET /app/stats to display general data (server/client) \ No newline at end of file diff --git a/docs-core/src/main/resources/image/file.png b/docs-web/src/main/resources/image/file.png similarity index 100% rename from docs-core/src/main/resources/image/file.png rename to docs-web/src/main/resources/image/file.png diff --git a/docs-web/src/main/webapp/js/controller/Document.js b/docs-web/src/main/webapp/js/controller/Document.js index d3158bac..972ff12c 100644 --- a/docs-web/src/main/webapp/js/controller/Document.js +++ b/docs-web/src/main/webapp/js/controller/Document.js @@ -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); }); }; diff --git a/docs-web/src/main/webapp/js/controller/DocumentEdit.js b/docs-web/src/main/webapp/js/controller/DocumentEdit.js index a201117a..3c7c96e8 100644 --- a/docs-web/src/main/webapp/js/controller/DocumentEdit.js +++ b/docs-web/src/main/webapp/js/controller/DocumentEdit.js @@ -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(); } }; diff --git a/docs-web/src/main/webapp/js/controller/Tag.js b/docs-web/src/main/webapp/js/controller/Tag.js index fd67a636..81af4391 100644 --- a/docs-web/src/main/webapp/js/controller/Tag.js +++ b/docs-web/src/main/webapp/js/controller/Tag.js @@ -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 }); });