summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
Diffstat (limited to 'print')
-rw-r--r--print/resources/inkstitch.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/print/resources/inkstitch.js b/print/resources/inkstitch.js
index c58aed8a..32a9a207 100644
--- a/print/resources/inkstitch.js
+++ b/print/resources/inkstitch.js
@@ -1,3 +1,5 @@
+var electron = require('electron');
+
$.postJSON = function(url, data, success=null) {
return $.ajax(url, {
type: 'POST',
@@ -366,13 +368,8 @@ $(function() {
});
$('button.print').click(function() {
- // printing halts all javascript activity, so we need to tell the backend
- // not to shut down until we're done.
- $.get("/printing/start")
- .done(function() {
- window.print();
- $.get("/printing/end");
- });
+ var pageSize = $('select#printing-size').find(':selected').text();
+ electron.ipcRenderer.send('print', pageSize)
});
$('button.settings').click(function(){