fix(raw printing): codacy issues
This commit is contained in:
parent
043c413571
commit
92b8d82f94
3 changed files with 21 additions and 21 deletions
|
|
@ -141,6 +141,7 @@
|
|||
"context": true,
|
||||
"before": true,
|
||||
"beforeEach": true,
|
||||
"qz": true
|
||||
"qz": true,
|
||||
"sha256": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ frappe.ui.form.PrintPreview = Class.extend({
|
|||
});
|
||||
|
||||
this.wrapper.find(".btn-qz-settings").click(function () {
|
||||
me.qz_setting_dialog()
|
||||
me.qz_setting_dialog();
|
||||
});
|
||||
|
||||
this.wrapper.find(".btn-print-print").click(function () {
|
||||
|
|
@ -222,8 +222,8 @@ frappe.ui.form.PrintPreview = Class.extend({
|
|||
return qz.print(config,data);
|
||||
}).then(frappe.ui.form.qz_success).catch((err)=>{
|
||||
frappe.ui.form.qz_fail(err);
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
frappe.show_alert({message:__('PDF Printing via QZ is not yet supported. Please remove QZ printer mapping for this Print format and try again.'),indicator:'blue'},14);
|
||||
|
|
@ -513,9 +513,9 @@ frappe.ui.form.qz_connect = function() {
|
|||
qz.websocket.connect({ retries: 3, delay: 1 }).then(()=>{
|
||||
frappe.show_alert({message: __('Connected to QZ Tray!'), indicator: 'green'});
|
||||
resolve();
|
||||
}, (err)=>{
|
||||
},
|
||||
()=> {
|
||||
frappe.show_alert({message: __('Error connecting to QZ Tray! <a href="https://qz.io/download/">Click here to Download QZ Tray</a>'), indicator: 'red'},14);
|
||||
console.error("qz error:",err)
|
||||
reject();
|
||||
});
|
||||
}
|
||||
|
|
@ -530,9 +530,9 @@ frappe.ui.form.qz_connect = function() {
|
|||
|
||||
frappe.ui.form.qz_get_printer_list = function(){
|
||||
return frappe.ui.form.qz_connect().then(function(){
|
||||
return qz.printers.find()
|
||||
return qz.printers.find();
|
||||
}).then((data)=>{
|
||||
return data
|
||||
return data;
|
||||
}).catch((err)=>{
|
||||
frappe.ui.form.qz_fail(err);
|
||||
});
|
||||
|
|
@ -545,7 +545,6 @@ frappe.ui.form.qz_success = function() {
|
|||
|
||||
// notify qz errors
|
||||
frappe.ui.form.qz_fail = function(e) {
|
||||
console.error("qz error:",e)
|
||||
frappe.show_alert({message:__("QZ Tray Failed") + e.toString(), indicator:'red'},20);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue