mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-10 22:06:46 +08:00
Fix loading of zebra printers to modal and some other small fixes [SCI-7244] (#4463)
* Fix loading of zebra printers to modal and some other small fixes [SCI-7244] * Fix zebra printing [SCI-7244]
This commit is contained in:
parent
936814b054
commit
aa10259d40
4 changed files with 5 additions and 4 deletions
|
@ -154,7 +154,7 @@
|
||||||
},
|
},
|
||||||
submitPrint() {
|
submitPrint() {
|
||||||
if (this.selectedPrinter.attributes.type_of === 'zebra') {
|
if (this.selectedPrinter.attributes.type_of === 'zebra') {
|
||||||
zebraPrinters.print(
|
this.zebraPrinters.print(
|
||||||
this.urls.zebraProgress,
|
this.urls.zebraProgress,
|
||||||
'.label-printing-progress-modal',
|
'.label-printing-progress-modal',
|
||||||
'#modal-print-repository-row-label',
|
'#modal-print-repository-row-label',
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
initZebraPrinter() {
|
initZebraPrinter() {
|
||||||
this.zebraPrinters = zebraPrint.init($('#LabelPrinterSelector'), {
|
this.zebraPrinters = zebraPrint.init($('#LabelPrinterSelector'), {
|
||||||
clearSelectorOnFirstDevice: false,
|
clearSelectorOnFirstDevice: false,
|
||||||
appendDevice: function(device) {
|
appendDevice: (device) => {
|
||||||
this.printers.push({
|
this.printers.push({
|
||||||
id: `zebra${this.printers.length}`,
|
id: `zebra${this.printers.length}`,
|
||||||
attributes: {
|
attributes: {
|
||||||
|
|
|
@ -39,6 +39,6 @@ class LabelTemplatesPreviewService
|
||||||
private
|
private
|
||||||
|
|
||||||
def sanitize_zpl_code(zpl_code)
|
def sanitize_zpl_code(zpl_code)
|
||||||
zpl_code.gsub!('_', '_5F')
|
zpl_code.gsub('_', '_5F')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<%= t('users.settings.account.addons.zebra_printer.description') %>
|
<%= t('users.settings.account.addons.zebra_printer.description') %>
|
||||||
</div>
|
</div>
|
||||||
<%= link_to t('users.settings.account.addons.printers.printer_details'), zebra_settings_path(), class: 'printer-details' %>
|
<%= link_to t('users.settings.account.addons.printers.details'), zebra_settings_path(), class: 'printer-details' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -2252,6 +2252,7 @@ en:
|
||||||
ready: "Ready"
|
ready: "Ready"
|
||||||
not_ready: "Not ready"
|
not_ready: "Not ready"
|
||||||
printer_details: "Printer details"
|
printer_details: "Printer details"
|
||||||
|
details: "Details"
|
||||||
enter_api_key: "Enter API key"
|
enter_api_key: "Enter API key"
|
||||||
enabled: "Enabled"
|
enabled: "Enabled"
|
||||||
fluics_printer:
|
fluics_printer:
|
||||||
|
|
Loading…
Add table
Reference in a new issue