diff options
| author | 2013-11-28 20:27:48 +0100 | |
|---|---|---|
| committer | 2013-11-28 20:27:48 +0100 | |
| commit | ddb9650b5dde683aaa749ab1e119e48e18cb99a5 (patch) | |
| tree | 792c93040b2a4d9edf26f0298ebde9648b088e12 /public/scripts | |
| parent | d48f0d65cc7edce97566dd6375c4b8a919ebc913 (diff) | |
Ajoute un peu de CSS à la page d'impression
Voir #122 et #166
Diffstat (limited to 'public/scripts')
| -rw-r--r-- | public/scripts/main.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/public/scripts/main.js b/public/scripts/main.js index c2a3b3912..022d0091b 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -625,10 +625,16 @@ function init_confirm_action() { function init_print_action() { $('.print-article').click(function () { + var content = "<html><head><style>" + + "body { font-family: Serif; text-align: justify; }" + + "a { color: #000; text-decoration: none; }" + + "a:after { content: ' [' attr(href) ']'}" + + "</style></head><body>" + + $(".flux.current .content").html() + + "</body></html>"; - var content = $(".flux.current .content"); var tmp_window = window.open(); - tmp_window.document.writeln(content.html()); + tmp_window.document.writeln(content); tmp_window.document.close(); tmp_window.focus(); tmp_window.print(); |
