From ab945ae0443ddaf0f6735a6d69a141430ad8dd5c Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Wed, 25 Aug 2021 11:28:08 -0400 Subject: [PATCH] Add quick search for SATO printers Select correct raw language if found --- sample.html | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sample.html b/sample.html index 786c859a3..e088deea6 100755 --- a/sample.html +++ b/sample.html @@ -142,11 +142,12 @@

Raw Printing

What is Raw Printing? - Zebra | - ZDesigner | - Epson | - Citizen | - Star + Zebra | + ZDesigner | + SATO | + Epson | + Citizen | + Star @@ -1479,11 +1480,18 @@

Options

} /// Detection /// - function findPrinter(query, set) { + function findPrinter(query, set, radio) { $("#printerSearch").val(query); qz.printers.find(query).then(function(data) { displayMessage("Found: " + data); if (set) { setPrinter(data); } + if(radio) { + var input = document.querySelector("input[value='" + radio + "']"); + if(input) { + input.checked = true; + $(input.parentElement).fadeOut(300).fadeIn(500); + } + } }).catch(displayError); }