set title during receipt/slip printing
authorJason Etheridge <jason@esilibrary.com>
Wed, 30 Jan 2013 19:10:19 +0000 (14:10 -0500)
committerBen Shum <bshum@biblio.org>
Thu, 28 Feb 2013 00:59:36 +0000 (19:59 -0500)
This is to workaround a bug in CUPS where long window titles will
cause the print job to fail.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/xul/staff_client/chrome/content/util/print.js

index f79c555..ba00a6e 100644 (file)
@@ -175,7 +175,7 @@ util.print.prototype = {
                             my_prefix = xulG.url_prefix(my_prefix);
                         }
                     }
-                    var print_url = '<html id="top"><head>'
+                    var print_url = '<html id="top"><head><title>EG</title>'
                         + '<script src="' + my_prefix + 'util/print_win.js"></script>'
                         + '<script src="' + my_prefix + 'util/print_custom.js"></script>';
                     if(this.data.hash.aous['print.custom_js_file']) {
@@ -297,7 +297,7 @@ util.print.prototype = {
 
         if (params.sample_frame) {
             var jsrc = 'data:text/javascript,' + encodeURIComponent('var params = { "data" : ' + js2JSON(params.data) + ', "list" : ' + js2JSON(params.list) + '};');
-            params.sample_frame.setAttribute('src','data:text/html;charset=utf-8,' + encodeURIComponent('<html id="top"><head><script src="' + jsrc + '"></script></head><body>' + s + '</body></html>'));
+            params.sample_frame.setAttribute('src','data:text/html;charset=utf-8,' + encodeURIComponent('<html id="top"><head><title>EG</title><script src="' + jsrc + '"></script></head><body>' + s + '</body></html>'));
         } else {
             this.simple(s,params);
         }