Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions classes/controllers/FrmEmailStylesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ public static function get_table_generator( $email_style = false ) {
$atts['bg_color'] = $style_settings['container_bg_color'];
$atts['alt_bg_color'] = $style_settings['container_bg_color'];
$atts['text_color'] = $style_settings['text_color'];
if ( ! empty( $style_settings['font_size'] ) ) {
$atts['font_size'] = $style_settings['font_size'];
}
}

return new FrmTableHTMLGenerator( 'entry', $atts );
Expand Down
3 changes: 3 additions & 0 deletions classes/models/FrmTableHTMLGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ private function init_td_style() {
$td_style_attributes = 'text-align:' . ( $this->direction === 'rtl' ? 'right' : 'left' ) . ';';
$td_style_attributes .= 'color:' . $this->style_settings['text_color'] . ';padding:' . $this->cell_padding . ';vertical-align:top;';
$td_style_attributes .= 'border-top:' . $this->style_settings['border_width'] . ' solid ' . $this->style_settings['border_color'] . ';';
if ( ! empty( $this->style_settings['font_size'] ) ) {
$td_style_attributes .= 'font-size:' . $this->style_settings['font_size'] . ';';
}

$this->td_style = ' style="' . esc_attr( $td_style_attributes ) . '"';
}
Expand Down
12 changes: 10 additions & 2 deletions classes/views/styles/components/FrmSliderStyleComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,24 @@ public function __construct( $field_name, $field_value, $data ) {
*
* If the units array is empty in the provided data, it returns an array containing the default units: 'px', 'em', and '%'.
* Otherwise, it merges the units array from the provided data with the default units array and returns the result.
* Pass `include_empty_unit => false` in $data to skip the empty option.
*
* @param array $data The data containing the units array.
*
* @return array The list of units for the slider style component.
*/
private function get_units_list( $data ) {
$include_empty = ! isset( $data['include_empty_unit'] ) || (bool) $data['include_empty_unit'];

if ( empty( $data['units'] ) ) {
return array( '', 'px', 'em', '%' );
$units = array( 'px', 'em', '%' );
return $include_empty ? array_merge( array( '' ), $units ) : $units;
}

if ( $include_empty ) {
array_unshift( $data['units'], '' );
}
array_unshift( $data['units'], '' );

return $data['units'];
}

Expand Down
2 changes: 1 addition & 1 deletion js/formidable-settings-components.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/formidable-web-components.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions js/src/settings-components/components/slider-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ export default class frmSliderComponent {
* Initializes the position of sliders when a accordion section is opened.
*/
initSlidersPosition() {
const emailSettings = document.querySelector( '.email_settings' );
if ( emailSettings ) {
this.initSlidersWidth( emailSettings );
return;
}

const accordionitems = document.querySelectorAll( '#frm_style_sidebar .accordion-section h3' );
const quickSettings = document.querySelector( '.frm-quick-settings' );
const openedAccordion = document.querySelector( '.accordion-section.open' );
Expand Down
Loading