mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Fix zebra printer switch and optimize zebra library loading [SCI-7430] (#4612)
* Fix zebra printer switch and optimize zebra library loading [SCI-7430] * Fix zebra enabled [SCI-7430]
This commit is contained in:
parent
4e77174e52
commit
42af732073
5 changed files with 7 additions and 3 deletions
|
@ -56,8 +56,6 @@
|
|||
//= require_directory ./access_permissions
|
||||
//= require sidebar
|
||||
//= require turbolinks
|
||||
//= require 'BrowserPrint-3.0.216.min'
|
||||
//= require 'BrowserPrint-Zebra-1.0.216.min'
|
||||
|
||||
// Initialize links for submitting forms. This is useful for submitting
|
||||
// forms with clicking on links outside form in cases when other than
|
||||
|
|
|
@ -20,7 +20,7 @@ class LabelPrinter < ApplicationRecord
|
|||
validates :language_type, presence: true
|
||||
|
||||
def self.zebra_print_enabled?
|
||||
RepositoryBase.stock_management_enabled?
|
||||
RepositoryBase.stock_management_enabled?.present?
|
||||
end
|
||||
|
||||
def done?
|
||||
|
|
|
@ -18,4 +18,5 @@
|
|||
></print-modal-container>
|
||||
</div>
|
||||
|
||||
<%= render partial: 'label_printers/zebra_printer_library' %>
|
||||
<%= javascript_pack_tag 'vue/repository_print_modal' %>
|
||||
|
|
4
app/views/label_printers/_zebra_printer_library.html.erb
Normal file
4
app/views/label_printers/_zebra_printer_library.html.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<% if LabelPrinter.zebra_print_enabled? %>
|
||||
<%= javascript_include_tag 'BrowserPrint-3.0.216.min' %>
|
||||
<%= javascript_include_tag 'BrowserPrint-Zebra-1.0.216.min' %>
|
||||
<% end %>
|
|
@ -77,4 +77,5 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<%= render partial: 'label_printers/zebra_printer_library' %>
|
||||
<%= javascript_include_tag "label_printers/zebra_settings" %>
|
||||
|
|
Loading…
Reference in a new issue