From b51e6c0c9c5705bb9237ba939ba211dfe2d2a221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=81n=20Mikla=CC=81s=CC=8C?= Date: Mon, 1 Apr 2019 15:43:46 +0200 Subject: [PATCH] Update products display options - image properties [MAILPOET-1843] --- .../src/newsletter_editor/blocks/products.js | 10 ++-------- .../products/settingsDisplayOptions.hbs | 20 +++++++++---------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/assets/js/src/newsletter_editor/blocks/products.js b/assets/js/src/newsletter_editor/blocks/products.js index dc0a96b4aa..c76ff791b3 100644 --- a/assets/js/src/newsletter_editor/blocks/products.js +++ b/assets/js/src/newsletter_editor/blocks/products.js @@ -474,8 +474,8 @@ ProductsDisplayOptionsSettingsView = base.BlockSettingsView.extend({ 'input .mailpoet_posts_show_amount': _.partial(this.changeField, 'amount'), 'change .mailpoet_posts_include_or_exclude': _.partial(this.changeField, 'inclusionType'), 'change .mailpoet_products_title_alignment': _.partial(this.changeField, 'titleAlignment'), - 'change .mailpoet_posts_image_full_width': _.partial(this.changeBoolField, 'imageFullWidth'), - 'change .mailpoet_posts_featured_image_position': _.partial(this.changeField, 'featuredImagePosition'), + 'change .mailpoet_products_image_full_width': _.partial(this.changeBoolField, 'imageFullWidth'), + 'change .mailpoet_products_featured_image_position': _.partial(this.changeField, 'featuredImagePosition'), 'change .mailpoet_posts_show_author': _.partial(this.changeField, 'showAuthor'), 'input .mailpoet_posts_author_preceded_by': _.partial(this.changeField, 'authorPrecededBy'), 'change .mailpoet_posts_show_categories': _.partial(this.changeField, 'showCategories'), @@ -532,12 +532,6 @@ ProductsDisplayOptionsSettingsView = base.BlockSettingsView.extend({ this.$('.mailpoet_products_title_position_separator').addClass('mailpoet_hidden'); } - if (value === 'excerpt') { - this.$('.mailpoet_posts_featured_image_position_container').removeClass('mailpoet_hidden'); - } else { - this.$('.mailpoet_posts_featured_image_position_container').addClass('mailpoet_hidden'); - } - this.changeField('displayType', event); }, changeTitleFormat: function changeTitleFormat(event) { diff --git a/views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs b/views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs index 4c7c19d75f..a79742ef28 100644 --- a/views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs +++ b/views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs @@ -102,51 +102,51 @@
-