mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-23 15:24:57 +08:00
Fix zebra printer library load [SCI-7310] (#4502)
This commit is contained in:
parent
f87b42d042
commit
88d9ece237
2 changed files with 3 additions and 6 deletions
|
@ -56,11 +56,8 @@
|
||||||
//= require_directory ./access_permissions
|
//= require_directory ./access_permissions
|
||||||
//= require sidebar
|
//= require sidebar
|
||||||
//= require turbolinks
|
//= require turbolinks
|
||||||
|
//= require 'BrowserPrint-3.0.216.min'
|
||||||
<% if Rails.configuration.x.zebra_print_enabled %>
|
//= require 'BrowserPrint-Zebra-1.0.216.min'
|
||||||
//= require 'BrowserPrint-3.0.216.min'
|
|
||||||
//= require 'BrowserPrint-Zebra-1.0.216.min'
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
// Initialize links for submitting forms. This is useful for submitting
|
// Initialize links for submitting forms. This is useful for submitting
|
||||||
// forms with clicking on links outside form in cases when other than
|
// forms with clicking on links outside form in cases when other than
|
||||||
|
|
|
@ -96,7 +96,7 @@ var zebraPrint = (function() {
|
||||||
try {
|
try {
|
||||||
beforeRefresh();
|
beforeRefresh();
|
||||||
BrowserPrint.getLocalDevices(function(deviceList) {
|
BrowserPrint.getLocalDevices(function(deviceList) {
|
||||||
if (deviceList.printer && deviceList.printer.length !== 0) {
|
if (deviceList && deviceList.printer && deviceList.printer.length !== 0) {
|
||||||
for (i = 0; i < deviceList.printer.length; i += 1) {
|
for (i = 0; i < deviceList.printer.length; i += 1) {
|
||||||
getPrinterStatus(deviceList.printer[i]).then((device) => {
|
getPrinterStatus(deviceList.printer[i]).then((device) => {
|
||||||
addNewDevice(device, clearSelectorOnFirstDevice);
|
addNewDevice(device, clearSelectorOnFirstDevice);
|
||||||
|
|
Loading…
Reference in a new issue