Add button "Bold" text option, fix unit tests

This commit is contained in:
Tautvidas Sipavičius
2016-02-15 18:13:18 +02:00
parent 9874e1c371
commit aac2cd6eb8
10 changed files with 52 additions and 7 deletions

View File

@@ -947,6 +947,7 @@
fontColor: '#00ddff',
fontFamily: 'Arial',
fontSize: '20px',
fontWeight: 'normal',
textAlign: 'center',
}
}
@@ -982,6 +983,7 @@
fontColor: '#ffffff',
fontFamily: 'Verdana',
fontSize: '18px',
fontWeight: 'normal',
textAlign: 'center',
},
},
@@ -1069,6 +1071,7 @@
fontColor: '#000000',
fontFamily: 'Arial',
fontSize: '20px',
fontWeight: 'normal',
textAlign: 'center',
},
},

View File

@@ -1,5 +1,5 @@
<div class="mailpoet_tools"></div>
<div class="mailpoet_content">
<a href="{{ model.url }}" class="mailpoet_editor_button" style="{{#ifCond model.styles.block.textAlign '==' 'left'}}margin: 0 auto 0 0; {{/ifCond}}{{#ifCond model.styles.block.textAlign '==' 'center'}}margin: auto; {{/ifCond}}{{#ifCond model.styles.block.textAlign '==' 'right'}}margin: 0 0 0 auto; {{/ifCond}}line-height: {{ model.styles.block.lineHeight }}; width: {{ model.styles.block.width }}; background-color: {{ model.styles.block.backgroundColor }}; color: {{ model.styles.block.fontColor }}; font-family: {{ model.styles.block.fontFamily }}; font-size: {{ model.styles.block.fontSize }}; border: {{ model.styles.block.borderWidth }} {{ model.styles.block.borderStyle }} {{ model.styles.block.borderColor }}; border-radius: {{ model.styles.block.borderRadius }};" onClick="return false;">{{ model.text }}</a>
<a href="{{ model.url }}" class="mailpoet_editor_button" style="{{#ifCond model.styles.block.textAlign '==' 'left'}}margin: 0 auto 0 0; {{/ifCond}}{{#ifCond model.styles.block.textAlign '==' 'center'}}margin: auto; {{/ifCond}}{{#ifCond model.styles.block.textAlign '==' 'right'}}margin: 0 0 0 auto; {{/ifCond}}line-height: {{ model.styles.block.lineHeight }}; width: {{ model.styles.block.width }}; background-color: {{ model.styles.block.backgroundColor }}; color: {{ model.styles.block.fontColor }}; font-family: {{ model.styles.block.fontFamily }}; font-size: {{ model.styles.block.fontSize }}; font-weight: {{ model.styles.block.fontWeight }}; border: {{ model.styles.block.borderWidth }} {{ model.styles.block.borderStyle }} {{ model.styles.block.borderColor }}; border-radius: {{ model.styles.block.borderRadius }};" onClick="return false;">{{ model.text }}</a>
</div>
<div class="mailpoet_block_highlight"></div>

View File

@@ -56,6 +56,14 @@
</div>
<div class="mailpoet_form_field_title mailpoet_form_field_title_inline"><%= __('Text') %></div>
</div>
<div class="mailpoet_form_field">
<div class="mailpoet_form_field_checkbox_option">
<label>
<input type="checkbox" name="fontWeight" class="mailpoet_field_button_font_weight" value="bold" {{#ifCond styles.block.fontWeight '===' 'bold'}}CHECKED{{/ifCond}}/>
<%= __('Bold') %>
</label>
</div>
</div>
<div class="mailpoet_form_field">
<div class="mailpoet_form_field_input_option">
<input type="text" name="background-color" class="mailpoet_field_button_background_color mailpoet_color" value="{{ model.styles.block.backgroundColor }}" />