PER}} td .ql-editor' => 'text-align: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_body_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} td' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_body_link_color', [ 'label' => __('Link Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} td a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_body_link_hovercolor', [ 'label' => __('Link Hover Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} td a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_body_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} tbody' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'ea_adv_data_table_body_cell_border', 'label' => __('Cell Border', 'essential-addons-for-elementor-lite'), 'fields_options' => [ 'border' => [ 'default' => 'solid', ], 'width' => [ 'default' => [ 'unit' => 'px', 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', 'isLinked' => true, ], ], 'color' => [ 'default' => '#eeeeee', ], ], 'selector' => '{{WRAPPER}} td', ] ); $this->add_control( 'ea_adv_data_table_body_highlight', [ 'label' => esc_html__('Highlight', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__('None', 'essential-addons-for-elementor-lite'), 'f-col' => esc_html__('First Column', 'essential-addons-for-elementor-lite'), 'l-col' => esc_html__('Last Column', 'essential-addons-for-elementor-lite'), 'e-col' => esc_html__('Even Column', 'essential-addons-for-elementor-lite'), 'o-col' => esc_html__('Odd Column', 'essential-addons-for-elementor-lite'), 'e-row' => esc_html__('Even Row', 'essential-addons-for-elementor-lite'), 'o-row' => esc_html__('Odd Row', 'essential-addons-for-elementor-lite'), ], 'default' => 'none', ] ); // first col $this->add_control( 'ea_adv_data_table_body_f_col_highlight_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#444444', 'selectors' => [ '{{WRAPPER}} tbody td:first-child' => 'color: {{VALUE}}', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'f-col', ], ] ); $this->add_control( 'ea_adv_data_table_body_f_col_highlight_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fbfbfb', 'selectors' => [ '{{WRAPPER}} tbody td:first-child' => 'background-color: {{VALUE}} !important', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'f-col', ], ] ); // last col $this->add_control( 'ea_adv_data_table_body_l_col_highlight_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#444444', 'selectors' => [ '{{WRAPPER}} tbody td:last-child' => 'color: {{VALUE}}', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'l-col', ], ] ); $this->add_control( 'ea_adv_data_table_body_l_col_highlight_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fbfbfb', 'selectors' => [ '{{WRAPPER}} tbody td:last-child' => 'background-color: {{VALUE}} !important', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'l-col', ], ] ); // even col $this->add_control( 'ea_adv_data_table_body_e_col_highlight_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#444444', 'selectors' => [ '{{WRAPPER}} tbody td:nth-child(even)' => 'color: {{VALUE}}', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'e-col', ], ] ); $this->add_control( 'ea_adv_data_table_body_e_col_highlight_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fbfbfb', 'selectors' => [ '{{WRAPPER}} tbody td:nth-child(even)' => 'background-color: {{VALUE}} !important', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'e-col', ], ] ); // odd col $this->add_control( 'ea_adv_data_table_body_o_col_highlight_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#444444', 'selectors' => [ '{{WRAPPER}} tbody td:nth-child(odd)' => 'color: {{VALUE}}', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'o-col', ], ] ); $this->add_control( 'ea_adv_data_table_body_o_col_highlight_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fbfbfb', 'selectors' => [ '{{WRAPPER}} tbody td:nth-child(odd)' => 'background-color: {{VALUE}} !important', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'o-col', ], ] ); // even row $this->add_control( 'ea_adv_data_table_body_e_row_highlight_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#444444', 'selectors' => [ '{{WRAPPER}} tbody tr:nth-child(even)' => 'color: {{VALUE}}', '{{WRAPPER}} tbody tr:nth-child(even) td' => 'color: {{VALUE}}', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'e-row', ], ] ); $this->add_control( 'ea_adv_data_table_body_e_row_highlight_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fbfbfb', 'selectors' => [ '{{WRAPPER}} tbody tr:nth-child(even)' => 'background-color: {{VALUE}} !important', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'e-row', ], ] ); // odd row $this->add_control( 'ea_adv_data_table_body_o_row_highlight_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#444444', 'selectors' => [ '{{WRAPPER}} tbody tr:nth-child(odd)' => 'color: {{VALUE}}', '{{WRAPPER}} tbody tr:nth-child(odd) td' => 'color: {{VALUE}}', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'o-row', ], ] ); $this->add_control( 'ea_adv_data_table_body_o_row_highlight_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fbfbfb', 'selectors' => [ '{{WRAPPER}} tbody tr:nth-child(odd)' => 'background-color: {{VALUE}} !important', ], 'condition' => [ 'ea_adv_data_table_body_highlight' => 'o-row', ], ] ); $this->add_responsive_control( 'ea_adv_data_table_body_cell_padding', [ 'label' => __('Padding', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'desktop_default' => [ 'unit' => 'px', 'top' => '10', 'right' => '10', 'bottom' => '10', 'left' => '10', 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'ea_section_adv_data_table_style_search', [ 'label' => __('Search', 'essential-addons-for-elementor-lite'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'ea_adv_data_table_search' => 'yes', ], ] ); $this->add_control( 'ea_adv_data_table_search_width', [ 'label' => __('Width', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => [ 'min' => 100, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 1, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 200, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'width: {{SIZE}}{{UNIT}}', ], ] ); $this->add_control( 'ea_adv_data_table_search_height', [ 'label' => __('Height', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 40, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'height: {{SIZE}}{{UNIT}}', ], ] ); $this->add_responsive_control( 'ea_adv_data_table_search_padding', [ 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'ea_adv_data_table_search_margin', [ 'label' => __('Margin Bottom', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'margin-bottom: {{SIZE}}{{UNIT}}', ], ] ); $this->add_control( 'ea_adv_data_table_search_alignment', [ 'label' => esc_html__('Alignment', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::CHOOSE, 'label_block' => true, 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'essential-addons-for-elementor-lite'), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__('Center', 'essential-addons-for-elementor-lite'), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__('Right', 'essential-addons-for-elementor-lite'), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'right', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'ea_adv_data_table_search_typography', 'label' => __('Typography', 'essential-addons-for-elementor-lite'), 'selector' => '{{WRAPPER}} .ea-advanced-data-table-search', ] ); $this->add_control( 'ea_adv_data_table_search_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_search_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'ea_adv_data_table_search_border', 'label' => __('Border', 'essential-addons-for-elementor-lite'), 'fields_options' => [ 'border' => [ 'default' => 'solid', ], 'width' => [ 'default' => [ 'unit' => 'px', 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', 'isLinked' => true, ], ], 'color' => [ 'default' => '#eeeeee', ], ], 'selector' => '{{WRAPPER}} .ea-advanced-data-table-search', ] ); $this->add_control( 'ea_adv_data_table_search_border_radius', [ 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-search' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'ea_section_adv_data_table_style_pagination', [ 'label' => __('Pagination', 'essential-addons-for-elementor-lite'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'ea_adv_data_table_pagination' => 'yes', ], ] ); $this->add_responsive_control( 'ea_adv_data_table_pagination_select_width', [ 'label' => __('Width', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => [ 'min' => 100, 'max' => 10000, 'step' => 1, ], '%' => [ 'min' => 10, 'max' => 100, 'step' => 1, ], ], 'desktop_default' => [ 'unit' => 'px', 'size' => 100, ], 'tablet_default' => [ 'unit' => 'px', 'size' => 100, ], 'mobile_default' => [ 'unit' => '%', 'size' => 100, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'width: {{SIZE}}{{UNIT}}', ], 'condition' => [ 'ea_adv_data_table_pagination_type' => 'select', ], ] ); $this->add_control( 'ea_adv_data_table_pagination_alignment', [ 'label' => esc_html__('Alignment', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'essential-addons-for-elementor-lite'), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__('Center', 'essential-addons-for-elementor-lite'), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__('Right', 'essential-addons-for-elementor-lite'), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'left', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination' => 'text-align: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'ea_adv_data_table_pagination_typography', 'label' => __('Typography', 'essential-addons-for-elementor-lite'), 'selector' => '{{WRAPPER}} .ea-advanced-data-table-pagination a, {{WRAPPER}} .ea-advanced-data-table-pagination select', ] ); $this->add_responsive_control( 'ea_adv_data_table_pagination_padding', [ 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'desktop_default' => [ 'unit' => 'px', 'top' => '5', 'right' => '15', 'bottom' => '5', 'left' => '15', 'isLinked' => false, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'ea_adv_data_table_pagination_margin', [ 'label' => esc_html__('Margin', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'desktop_default' => [ 'unit' => 'px', 'top' => '5', 'right' => '5', 'bottom' => '0', 'left' => '0', 'isLinked' => false, ], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->start_controls_tabs('ea_adv_data_table_pagination_tabs'); $this->start_controls_tab('normal', ['label' => esc_html__('Normal', 'essential-addons-for-elementor-lite')]); $this->add_control( 'ea_adv_data_table_pagination_color', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a' => 'color: {{VALUE}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_pagination_background', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a' => 'background-color: {{VALUE}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'ea_adv_data_table_pagination_border', 'label' => __('Border', 'essential-addons-for-elementor-lite'), 'fields_options' => [ 'border' => [ 'default' => 'solid', ], 'width' => [ 'default' => [ 'unit' => 'px', 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', 'isLinked' => true, ], ], 'color' => [ 'default' => '#eeeeee', ], ], 'selector' => '{{WRAPPER}} .ea-advanced-data-table-pagination a, {{WRAPPER}} .ea-advanced-data-table-pagination select', ] ); $this->add_control( 'ea_adv_data_table_pagination_border_radius', [ 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab('hover', ['label' => esc_html__('Hover', 'essential-addons-for-elementor-lite')]); $this->add_control( 'ea_adv_data_table_pagination_color_hover', [ 'label' => __('Text Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a:hover' => 'color: {{VALUE}};', '{{WRAPPER}} .ea-advanced-data-table-pagination a.ea-adtp-current' => 'color: {{VALUE}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_pagination_background_hover', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '#fafafa', 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}} .ea-advanced-data-table-pagination a.ea-adtp-current' => 'background-color: {{VALUE}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'ea_adv_data_table_pagination_border_hover', 'label' => __('Border', 'essential-addons-for-elementor-lite'), 'fields_options' => [ 'border' => [ 'default' => 'solid', ], 'width' => [ 'default' => [ 'unit' => 'px', 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', 'isLinked' => true, ], ], 'color' => [ 'default' => '#eeeeee', ], ], 'selector' => '{{WRAPPER}} .ea-advanced-data-table-pagination a:hover, {{WRAPPER}} .ea-advanced-data-table-pagination a.ea-adtp-current, {{WRAPPER}} .ea-advanced-data-table-pagination select:hover', ] ); $this->add_control( 'ea_adv_data_table_pagination_border_radius_hover', [ 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} .ea-advanced-data-table-pagination a:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .ea-advanced-data-table-pagination a.ea-adtp-current' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .ea-advanced-data-table-pagination select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'ea_section_adv_data_table_style_button', [ 'label' => __('Button', 'essential-addons-for-elementor-lite'), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'ea_adv_data_table_source' => 'ninja' ] ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'ea_adv_data_table_button_typography', 'label' => __('Typography', 'essential-addons-for-elementor-lite'), 'selector' => '{{WRAPPER}} td button, {{WRAPPER}} td .button', ] ); $this->start_controls_tabs('ea_adv_data_table_button_tabs'); $this->start_controls_tab('ea_adv_data_table_button_tab_normal', ['label' => esc_html__('Normal', 'essential-addons-for-elementor-lite')]); $this->add_control( 'ea_adv_data_table_button_color', [ 'label' => __('Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} td button' => 'color: {{VALUE}};', '{{WRAPPER}} td .button' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_button_background_color', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} td button' => 'background-color: {{VALUE}};', '{{WRAPPER}} td .button' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab('ea_adv_data_table_button_tab_hover', ['label' => esc_html__('Hover', 'essential-addons-for-elementor-lite')]); $this->add_control( 'ea_adv_data_table_button_color_hover', [ 'label' => __('Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} td button:hover' => 'color: {{VALUE}};', '{{WRAPPER}} td .button:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'ea_adv_data_table_button_background_color_hover', [ 'label' => __('Background Color', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} td button:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}} td .button:hover' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'ea_adv_data_table_button_border', 'label' => __('Border', 'essential-addons-for-elementor-lite'), 'fields_options' => [ 'border' => [ 'default' => '', ], 'width' => [ 'default' => [ 'unit' => 'px', 'isLinked' => true, ], ], 'color' => [ 'default' => '', ], ], 'selector' => '{{WRAPPER}} td button, {{WRAPPER}} td .button', ] ); $this->add_control( 'ea_adv_data_table_button_border_radius', [ 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} td button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} td .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'ea_adv_data_table_button_box_shadow', 'label' => __('Box Shadow', 'essential-addons-for-elementor-lite'), 'selector' => '{{WRAPPER}} td button, {{WRAPPER}} td .button', ] ); $this->add_control( 'ea_adv_data_table_button_border_padding', [ 'label' => __('Padding', 'essential-addons-for-elementor-lite'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px'], 'selectors' => [ '{{WRAPPER}} td button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} td .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); if (in_array($settings['ea_adv_data_table_source'], ['database', 'remote', 'google'])) { if (!apply_filters('eael/pro_enabled', false)) { return; } } else if ($settings['ea_adv_data_table_source'] == "tablepress") { if (!apply_filters('eael/pro_enabled', false)) { return; } if (!apply_filters('eael/is_plugin_active', 'tablepress/tablepress.php')) { return; } } else if ($settings['ea_adv_data_table_source'] == "ninja") { if (!apply_filters('eael/is_plugin_active', 'ninja-tables/ninja-tables.php')) { return; } } $this->add_render_attribute('ea-adv-data-table-wrap', [ 'class' => "ea-advanced-data-table-wrap", 'data-id' => $this->get_id(), ]); $this->add_render_attribute('ea-adv-data-table', [ 'class' => "ea-advanced-data-table ea-advanced-data-table-{$settings['ea_adv_data_table_source']} ea-advanced-data-table-{$this->get_id()}", 'data-id' => $this->get_id(), ]); if (Plugin::$instance->editor->is_edit_mode()) { $this->add_render_attribute('ea-adv-data-table', [ 'class' => "ea-advanced-data-table-editable", ]); } if ($settings['ea_adv_data_table_sort'] == 'yes') { $this->add_render_attribute('ea-adv-data-table', [ 'class' => "ea-advanced-data-table-sortable", ]); } if ($settings['ea_adv_data_table_pagination'] == 'yes') { $this->add_render_attribute('ea-adv-data-table', [ 'class' => "ea-advanced-data-table-paginated", 'data-items-per-page' => $settings['ea_adv_data_table_items_per_page'], ]); } if ($settings['ea_adv_data_table_search'] == 'yes') { $this->add_render_attribute('ea-adv-data-table', [ 'class' => "ea-advanced-data-table-searchable", ]); $this->add_render_attribute('ea-adv-data-table-search-wrap', [ 'class' => "ea-advanced-data-table-search-wrap ea-advanced-data-table-search-{$settings['ea_adv_data_table_search_alignment']}", ]); } echo '