142
| <![CDATA[<script type='text/javascript'>
$(document).ready(function() {
$(".voltar").click(function(event) {
history.back();
});
$(".fechar").click(function(event) {
window.close();
});
$("body").delegate("button.fdc,a.fdc","click",function(event) {
event.preventDefault();
$.inscricao = (event.target.nodeName == "A" ? $(this).text() : $(this).attr("inscricao"));
$("#modal_fdc .modal-body").load("itbi_auditor_fiscal.php",{inscricao: $.inscricao,fdc: true});
$("#modal_fdc .modal-dialog").css("width" , "80%");
$("#modal_fdc").modal("show");
});
$("body").delegate("button.guia","click",function(event) {
var link = "itbi_mostra_guia.php?hashing=" + $(this).attr("hashing");
window.open(link,'itbi','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1000,height=720');
});
$("body").delegate("button.print","click",function() {
window.print();
});
$(".modal").delegate("button.modal-print","click",function() {
PrintContent($(this).parent().parent().parent().parent().attr("id"));
});
function PrintContent(div_to_print) {
/*
* Luciano Mantovani - 26/07/2013
*
* Imprime qualquer DIV da tela separando seu conteúdo em outra janela e executando o comando para impressão.
*/
var css1 = "<link rel='stylesheet' type='text/css' href='//siapegov.pindamonhangaba.sp.gov.br/websis/../siap-lib/ace-template/assets/css/bootswatch-3.0.0/cerulean/bootstrap-print.css' media='all'>\n";
var css2 = "<link rel='stylesheet' type='text/css' href='//siapegov.pindamonhangaba.sp.gov.br/websis/../siap-lib/ace-template/assets/css/font-awesome.min.css' media='all'>\n";
var css3 = "<link rel='stylesheet' type='text/css' href='//siapegov.pindamonhangaba.sp.gov.br/websis/../siap-lib/ace-template/plugins/sb-admin-v2/font-awesome/css/font-awesome.css'>\n";
var css = css1 + css2 + css3;
var DocumentContainer = document.getElementById(div_to_print);
var UniqueName = new Date();
var WindowObject = window.open("", "PrintWindow" + UniqueName.getTime(),
"width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");
WindowObject.document.writeln("<!DOCTYPE html>\n<html>\n<head>\n" + css + "</head>\n<body>\n" + DocumentContainer.innerHTML + "\n</body>\n</html>");
WindowObject.document.close();
WindowObject.focus();
WindowObject.print();
setTimeout(function(){WindowObject.close()},2000);
}
});
</script>]]>
|