Created
April 25, 2011 14:44
-
-
Save stephaneerard/940607 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| (function($){ | |
| var printProcess = function(){ | |
| var imgSrc = '<?php echo $product->getTicketGeneration()->get('Image')->getFullWebPath()?>'; | |
| var subWnd = window.open('', 'stayTicketPrinterWindow', 'width=1024,height=800,resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no'); | |
| if($('img', subWnd.document.body).size() === 0) | |
| { | |
| var imgTag = $('<img/>').attr('src', imgSrc); | |
| $(subWnd.document.body).append(imgTag); | |
| } | |
| subWnd.print(); | |
| } | |
| $('a.print').click(printProcess); | |
| printProcess(); | |
| })(jQuery); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment