added printing support

This commit is contained in:
SJ
2013-11-15 22:02:44 +01:00
parent 6f7d31f70a
commit 83a223e96e
10 changed files with 76 additions and 34 deletions

View File

@ -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;
}
}