Update products display options - image properties

[MAILPOET-1843]
This commit is contained in:
Ján Mikláš
2019-04-01 15:43:46 +02:00
committed by Rostislav Wolný
parent 83ffbcad8e
commit b51e6c0c9c
2 changed files with 12 additions and 18 deletions

View File

@ -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) {

View File

@ -102,51 +102,51 @@
<hr class="mailpoet_separator mailpoet_products_title_position_separator {{#ifCond model.displayType '===' 'titleOnly'}}mailpoet_hidden{{/ifCond}}" />
<div> <!-- empty div for better git diff -->
<div class="mailpoet_form_field mailpoet_posts_featured_image_position_container">
<div class="mailpoet_form_field_title"><%= __('Featured image position') %></div>
<div class="mailpoet_form_field mailpoet_products_featured_image_position_container">
<div class="mailpoet_form_field_title"><%= __('Product image position') %></div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="mailpoet_posts_featured_image_position" class="mailpoet_posts_featured_image_position" value="centered" {{#ifCond model.featuredImagePosition '==' 'centered' }}CHECKED{{/ifCond}}/>
<input type="radio" name="mailpoet_products_featured_image_position" class="mailpoet_products_featured_image_position" value="centered" {{#ifCond model.featuredImagePosition '==' 'centered' }}CHECKED{{/ifCond}}/>
<%= __('Centered') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="mailpoet_posts_featured_image_position" class="mailpoet_posts_featured_image_position" value="left" {{#ifCond model.featuredImagePosition '==' 'left' }}CHECKED{{/ifCond}}/>
<input type="radio" name="mailpoet_products_featured_image_position" class="mailpoet_products_featured_image_position" value="left" {{#ifCond model.featuredImagePosition '==' 'left' }}CHECKED{{/ifCond}}/>
<%= __('Left') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="mailpoet_posts_featured_image_position" class="mailpoet_posts_featured_image_position" value="right" {{#ifCond model.featuredImagePosition '==' 'right' }}CHECKED{{/ifCond}}/>
<input type="radio" name="mailpoet_products_featured_image_position" class="mailpoet_products_featured_image_position" value="right" {{#ifCond model.featuredImagePosition '==' 'right' }}CHECKED{{/ifCond}}/>
<%= __('Right') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="mailpoet_posts_featured_image_position" class="mailpoet_posts_featured_image_position" value="alternate" {{#ifCond model.featuredImagePosition '==' 'alternate' }}CHECKED{{/ifCond}}/>
<input type="radio" name="mailpoet_products_featured_image_position" class="mailpoet_products_featured_image_position" value="alternate" {{#ifCond model.featuredImagePosition '==' 'alternate' }}CHECKED{{/ifCond}}/>
<%= __('Alternate') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="mailpoet_posts_featured_image_position" class="mailpoet_posts_featured_image_position" value="none" {{#ifCond model.featuredImagePosition '==' 'none' }}CHECKED{{/ifCond}}/>
<input type="radio" name="mailpoet_products_featured_image_position" class="mailpoet_products_featured_image_position" value="none" {{#ifCond model.featuredImagePosition '==' 'none' }}CHECKED{{/ifCond}}/>
<%= __('None') %>
</label>
</div>
</div>
<div class="mailpoet_form_field mailpoet_posts_image_full_width_option {{#ifCond model.displayType '==' 'titleOnly'}}mailpoet_hidden{{/ifCond}}">
<div class="mailpoet_form_field mailpoet_products_image_full_width_option {{#ifCond model.displayType '==' 'titleOnly'}}mailpoet_hidden{{/ifCond}}">
<div class="mailpoet_form_field_title"><%= __('Image width') %></div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="imageFullWidth" class="mailpoet_posts_image_full_width" value="true" {{#if model.imageFullWidth}}CHECKED{{/if}}/>
<input type="radio" name="imageFullWidth" class="mailpoet_products_image_full_width" value="true" {{#if model.imageFullWidth}}CHECKED{{/if}}/>
<%= __('Full width') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="imageFullWidth" class="mailpoet_posts_image_full_width" value="false" {{#unless model.imageFullWidth}}CHECKED{{/unless}}/>
<input type="radio" name="imageFullWidth" class="mailpoet_products_image_full_width" value="false" {{#unless model.imageFullWidth}}CHECKED{{/unless}}/>
<%= __('Padded') %>
</label>
</div>