diff --git a/Gemfile b/Gemfile index 5dd03e203..08e6892e8 100644 --- a/Gemfile +++ b/Gemfile @@ -73,7 +73,7 @@ gem 'i18n-js', '~> 3.6' # Localization in javascript files gem 'jbuilder' # JSON structures via a Builder-style DSL gem 'logging', '~> 2.0.0' gem 'nested_form_fields' -gem 'nokogiri', '~> 1.13.6' # HTML/XML parser +gem 'nokogiri', '~> 1.13.9' # HTML/XML parser gem 'rails_autolink', '~> 1.1', '>= 1.1.6' gem 'rgl' # Graph framework for project diagram calculations gem 'roo', '~> 2.8.2' # Spreadsheet parser diff --git a/Gemfile.lock b/Gemfile.lock index 545590dca..b765363c2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -384,7 +384,7 @@ GEM rails (>= 3.2.0) newrelic_rpm (6.15.0) nio4r (2.5.8) - nokogiri (1.13.7) + nokogiri (1.13.9) mini_portile2 (~> 2.8.0) racc (~> 1.4) oauth2 (1.4.4) @@ -689,7 +689,7 @@ DEPENDENCIES momentjs-rails (~> 2.17.1) nested_form_fields newrelic_rpm - nokogiri (~> 1.13.6) + nokogiri (~> 1.13.9) omniauth omniauth-azure-activedirectory omniauth-linkedin-oauth2 diff --git a/VERSION b/VERSION index ac6015b64..dd43a143f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.26.0.5 +1.26.1 diff --git a/app/assets/stylesheets/settings/label_printers.scss b/app/assets/stylesheets/settings/label_printers.scss index 3cdfaf0fb..733c55ae6 100644 --- a/app/assets/stylesheets/settings/label_printers.scss +++ b/app/assets/stylesheets/settings/label_printers.scss @@ -34,6 +34,18 @@ } } + ol { + padding-left: 0; + + li { + padding: .5em 0; + } + + .indented_row { + padding-left: 4px; + } + } + .zebra-settings-collapse { border-left: 3px solid $color-concrete; margin-top: 14px; @@ -42,6 +54,10 @@ .collapse { padding-left: 2.5em; + + ol { + padding-left: 1.5em; + } } .collapse-row { @@ -99,6 +115,7 @@ .row-title { @include font-h2; margin-left: .5em; + margin-top: .25em; } .api-key-container { diff --git a/app/controllers/label_templates_controller.rb b/app/controllers/label_templates_controller.rb index 547691d1e..a1d235a94 100644 --- a/app/controllers/label_templates_controller.rb +++ b/app/controllers/label_templates_controller.rb @@ -130,7 +130,9 @@ class LabelTemplatesController < ApplicationController def zpl_preview service = LabelTemplatesPreviewService.new(params, current_user) - payload = service.generate_zpl_preview! + + # only render last generated label image + payload = service.generate_zpl_preview!.split.last if service.error.blank? render json: { base64_preview: payload } diff --git a/app/javascript/vue/label_template/components/label_preview.vue b/app/javascript/vue/label_template/components/label_preview.vue index 4d6112380..4e51c41d3 100644 --- a/app/javascript/vue/label_template/components/label_preview.vue +++ b/app/javascript/vue/label_template/components/label_preview.vue @@ -101,7 +101,7 @@ DPMM_RESOLUTION_OPTIONS, DPI_RESOLUTION_OPTIONS, optionsOpen: false, - width: this.template.attributes.unit == 'in' ? this.template.attributes.width_mm / 25.4 : this.template.attributes.width_mm , + width: this.template.attributes.unit == 'in' ? this.template.attributes.width_mm / 25.4 : this.template.attributes.width_mm, height: this.template.attributes.unit == 'in' ? this.template.attributes.height_mm / 25.4 : this.template.attributes.height_mm, unit: this.template.attributes.unit, density: this.template.attributes.density, @@ -125,19 +125,16 @@ }, watch: { unit() { - this.recalculateUnits(); this.setDefaults(); }, zpl() { this.refreshPreview(); }, template() { + this.unit = this.template.attributes.unit this.width = this.template.attributes.unit == 'in' ? this.template.attributes.width_mm / 25.4 : this.template.attributes.width_mm this.height = this.template.attributes.unit == 'in' ? this.template.attributes.height_mm / 25.4 : this.template.attributes.height_mm - this.unit = this.template.attributes.unit this.density = this.template.attributes.density - - this.refreshPreview() } }, methods: { @@ -159,6 +156,8 @@ refreshPreview() { if (this.zpl.length === 0) return; + this.base64Image = null; + $.ajax({ url: this.previewUrl, type: 'GET', @@ -184,7 +183,9 @@ }); }, updateUnit(unit) { + if (this.unit === unit) return; this.unit = unit; + this.recalculateUnits(); this.$emit('unit:update', this.unit); }, updateDensity(density) { diff --git a/app/javascript/vue/repository_print_modal/container.vue b/app/javascript/vue/repository_print_modal/container.vue index 47d273b85..57dfb279d 100644 --- a/app/javascript/vue/repository_print_modal/container.vue +++ b/app/javascript/vue/repository_print_modal/container.vue @@ -2,7 +2,7 @@