From 09c46e0fb499987899a2e67819099eba2c121487 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 18 Apr 2019 10:15:13 -0400 Subject: add 'save pdf' button and print opens PDF --- print/resources/inkstitch.js | 7 ++++++- print/resources/style.css | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'print/resources') diff --git a/print/resources/inkstitch.js b/print/resources/inkstitch.js index 7c972c7a..57f62b1a 100644 --- a/print/resources/inkstitch.js +++ b/print/resources/inkstitch.js @@ -369,9 +369,14 @@ $(function() { $('button.print').click(function() { var pageSize = $('select#printing-size').find(':selected').text(); - electron.ipcRenderer.send('print', pageSize) + electron.ipcRenderer.send('open-pdf', pageSize) }); + $('button.save-pdf').click(function() { + var pageSize = $('select#printing-size').find(':selected').text(); + electron.ipcRenderer.send('save-pdf', pageSize) + }); + $('button.settings').click(function(){ $('#settings-ui').show(); }); diff --git a/print/resources/style.css b/print/resources/style.css index 9ffff07d..3e96e2ba 100644 --- a/print/resources/style.css +++ b/print/resources/style.css @@ -123,7 +123,7 @@ body { color: white; } - .ui button.print { + .ui button.print, .ui button.save-pdf { border: 1px solid rgb(50,132,50); } -- cgit v1.2.3