Preserve image width for smaller than column width images
This commit is contained in:
@ -1,15 +1,19 @@
|
||||
.mailpoet_image_block
|
||||
|
||||
img
|
||||
vertical-align: bottom
|
||||
max-width: 100%
|
||||
width: auto
|
||||
height: auto
|
||||
|
||||
&.mailpoet_full_image
|
||||
padding-left: 0
|
||||
padding-right: 0
|
||||
margin-bottom: 0
|
||||
|
||||
img
|
||||
width: 100%
|
||||
|
||||
.mailpoet_content a:hover
|
||||
cursor: all-scroll
|
||||
|
||||
img
|
||||
vertical-align: bottom
|
||||
max-width: $newsletter-width
|
||||
width: 100%
|
||||
height: auto
|
||||
|
@ -203,6 +203,9 @@ define([
|
||||
changeBoolField: function(field, event) {
|
||||
this.model.set(field, (jQuery(event.target).val() === 'true') ? true : false);
|
||||
},
|
||||
changeBoolCheckboxField: function(field, event) {
|
||||
this.model.set(field, (!!jQuery(event.target).prop('checked')));
|
||||
},
|
||||
changeColorField: function(field, event) {
|
||||
var value = jQuery(event.target).val();
|
||||
if (value === '') {
|
||||
|
@ -66,7 +66,7 @@ define([
|
||||
"keyup .mailpoet_field_image_link": _.partial(this.changeField, "link"),
|
||||
"keyup .mailpoet_field_image_address": _.partial(this.changeField, "src"),
|
||||
"keyup .mailpoet_field_image_alt_text": _.partial(this.changeField, "alt"),
|
||||
"change .mailpoet_field_image_padded": _.partial(this.changeBoolField, "padded"),
|
||||
"change .mailpoet_field_image_padded": _.partial(this.changeBoolCheckboxField, "padded"),
|
||||
"change .mailpoet_field_image_alignment": _.partial(this.changeField, "styles.block.textAlign"),
|
||||
"click .mailpoet_field_image_select_another_image": "showMediaManager",
|
||||
"click .mailpoet_done_editing": "close",
|
||||
|
@ -182,7 +182,7 @@ define([
|
||||
|
||||
it('updates the model when padding changes', function () {
|
||||
var newValue = 'false';
|
||||
view.$('.mailpoet_field_image_padded').val(newValue).change();
|
||||
view.$('.mailpoet_field_image_padded').prop('checked', false).change();
|
||||
expect(model.get('padded')).to.equal(false);
|
||||
});
|
||||
|
||||
|
@ -24,15 +24,9 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="mailpoet_form_field">
|
||||
<div class="mailpoet_form_field_radio_option">
|
||||
<div class="mailpoet_form_field_checkbox_option">
|
||||
<label>
|
||||
<input type="radio" name="padded" class="mailpoet_field_image_padded" value="false" {{#unless padded}}CHECKED{{/unless}}/>
|
||||
<%= __('Full width') %>
|
||||
</label>
|
||||
</div>
|
||||
<div class="mailpoet_form_field_radio_option">
|
||||
<label>
|
||||
<input type="radio" name="padded" class="mailpoet_field_image_padded" value="true" {{#if padded}}CHECKED{{/if}}/>
|
||||
<input type="checkbox" name="padded" class="mailpoet_field_image_padded" value="true" {{#if padded}}CHECKED{{/if}}/>
|
||||
<%= __('With padding') %>
|
||||
</label>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user