diff --git a/docs-parent/TODO b/docs-parent/TODO index 33d0be56..ea021c12 100644 --- a/docs-parent/TODO +++ b/docs-parent/TODO @@ -1,2 +1,3 @@ - Automatic backup system using Quartz (server) - Handle error while uploading a file +- Download all files as zip (docs & share) diff --git a/docs-web/src/main/webapp/app/docs/controller/FileView.js b/docs-web/src/main/webapp/app/docs/controller/FileView.js index b16073a8..8829c1d7 100644 --- a/docs-web/src/main/webapp/app/docs/controller/FileView.js +++ b/docs-web/src/main/webapp/app/docs/controller/FileView.js @@ -55,6 +55,17 @@ App.controller('FileView', function($modal, $state, $stateParams) { window.open('api/file/' + $stateParams.fileId + '/data'); }; + /** + * Print the file. + */ + $scope.printFile = function() { + var popup = window.open('api/file/' + $stateParams.fileId + '/data', '_blank'); + popup.onload = function () { + popup.print(); + popup.close(); + } + }; + /** * Close the file preview. */ diff --git a/docs-web/src/main/webapp/app/share/controller/FileView.js b/docs-web/src/main/webapp/app/share/controller/FileView.js index 542f7897..834e8d60 100644 --- a/docs-web/src/main/webapp/app/share/controller/FileView.js +++ b/docs-web/src/main/webapp/app/share/controller/FileView.js @@ -55,6 +55,17 @@ App.controller('FileView', function($modal, $state, $stateParams) { window.open('api/file/' + $stateParams.fileId + '/data?share=' + $stateParams.shareId); }; + /** + * Print the file. + */ + $scope.printFile = function() { + var popup = window.open('api/file/' + $stateParams.fileId + '/data', '_blank'); + popup.onload = function () { + popup.print(); + popup.close(); + } + }; + /** * Close the file preview. */ diff --git a/docs-web/src/main/webapp/partial/docs/file.view.html b/docs-web/src/main/webapp/partial/docs/file.view.html index c820a909..e7dd1d36 100644 --- a/docs-web/src/main/webapp/partial/docs/file.view.html +++ b/docs-web/src/main/webapp/partial/docs/file.view.html @@ -11,6 +11,9 @@
+ diff --git a/docs-web/src/main/webapp/partial/share/file.view.html b/docs-web/src/main/webapp/partial/share/file.view.html index 009df8cb..761f5541 100644 --- a/docs-web/src/main/webapp/partial/share/file.view.html +++ b/docs-web/src/main/webapp/partial/share/file.view.html @@ -11,6 +11,9 @@
+