Add JS files
This commit is contained in:
62
include/jQuery/printerScripts.js
Executable file
62
include/jQuery/printerScripts.js
Executable file
@@ -0,0 +1,62 @@
|
||||
function checkPrint(module,id, pdf_opt){
|
||||
$('#sendreturn').html('Sprawdzam drukarkę...<img src="include/SugarFields/Fields/File/gif-load.gif">');
|
||||
$('#PrinterDivList').hide();
|
||||
$('#sendreturn').show();
|
||||
|
||||
var params = {
|
||||
job : 'justPrinterCheck',
|
||||
recid : id,
|
||||
printer : $('#PrinterSelectList').val(),
|
||||
check : '1',
|
||||
type: $('#pdfPrintType').val(),
|
||||
};
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : 'index.php?entryPoint=uploadAjaxFile',
|
||||
dataType : "html",
|
||||
async : false,
|
||||
success : function(data) {
|
||||
if (data == 'false') {
|
||||
$('#sendreturn').html('Sprawdz czy drukarka jest włączona lub konfigurację!');
|
||||
|
||||
} else {
|
||||
$('#sendreturn').html('Trwa drukowanie dokumentu...<img src="include/SugarFields/Fields/File/gif-load.gif">');
|
||||
justPrint(module,id, pdf_opt);
|
||||
|
||||
}
|
||||
//$(".loading_panel").css("display", "none");
|
||||
},
|
||||
data : params
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function justPrint(module,id, pdf_opt){
|
||||
|
||||
var params = {
|
||||
job : 'justPrinterCheck',
|
||||
recid : id,
|
||||
printer : $('#PrinterSelectList').val(),
|
||||
check : '0',
|
||||
type: $('#pdfPrintType').val(),
|
||||
module: module,
|
||||
pdf_opt: pdf_opt,
|
||||
};
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : 'index.php?entryPoint=uploadAjaxFile',
|
||||
dataType : "html",
|
||||
async : false,
|
||||
success : function(data) {
|
||||
if (data == 'false') {
|
||||
$('#sendreturn').html('Nie można wydrukować dokumentu!');
|
||||
|
||||
} else {
|
||||
$('#sendreturn').html('Polecenie drukowania zlecone!');
|
||||
|
||||
}
|
||||
},
|
||||
data : params
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user