mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
added printing support
This commit is contained in:
@ -1077,8 +1077,21 @@ var Piler =
|
||||
<?php if(OUTLOOK == 1) { ?>
|
||||
$('#mainscreen').css('top', '60px');
|
||||
<?php } ?>
|
||||
},
|
||||
|
||||
|
||||
print_div: function(divID) {
|
||||
var divElements = document.getElementById(divID).innerHTML;
|
||||
var oldPage = document.body.innerHTML;
|
||||
|
||||
document.body.innerHTML = "<html><head><title></title></head><body>" + divElements + "</body></html>";
|
||||
|
||||
window.print();
|
||||
|
||||
document.body.innerHTML = oldPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user