mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 22:07:56 +01:00
Print a file
This commit is contained in:
parent
42f23ed0d7
commit
12c3c4750f
@ -1,2 +1,3 @@
|
|||||||
- Automatic backup system using Quartz (server)
|
- Automatic backup system using Quartz (server)
|
||||||
- Handle error while uploading a file
|
- Handle error while uploading a file
|
||||||
|
- Download all files as zip (docs & share)
|
||||||
|
@ -55,6 +55,17 @@ App.controller('FileView', function($modal, $state, $stateParams) {
|
|||||||
window.open('api/file/' + $stateParams.fileId + '/data');
|
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.
|
* Close the file preview.
|
||||||
*/
|
*/
|
||||||
|
@ -55,6 +55,17 @@ App.controller('FileView', function($modal, $state, $stateParams) {
|
|||||||
window.open('api/file/' + $stateParams.fileId + '/data?share=' + $stateParams.shareId);
|
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.
|
* Close the file preview.
|
||||||
*/
|
*/
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
|
<button type="button" class="btn btn-default" ng-click="printFile()">
|
||||||
|
<span class="glyphicon glyphicon-print"></span>
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-default" ng-click="openFile()">
|
<button type="button" class="btn btn-default" ng-click="openFile()">
|
||||||
<span class="glyphicon glyphicon-download-alt"></span>
|
<span class="glyphicon glyphicon-download-alt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
|
<button type="button" class="btn btn-default" ng-click="printFile()">
|
||||||
|
<span class="glyphicon glyphicon-print"></span>
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-default" ng-click="openFile()">
|
<button type="button" class="btn btn-default" ng-click="openFile()">
|
||||||
<span class="glyphicon glyphicon-download-alt"></span>
|
<span class="glyphicon glyphicon-download-alt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user