-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
table widget #2
base: main
Are you sure you want to change the base?
table widget #2
Conversation
includes/widgets/table.php
Outdated
* | ||
* @since 1.0.0 | ||
* @access public | ||
* | ||
* @return string Widget title. | ||
*/ | ||
public function get_title() { | ||
return esc_html__( 'testOne', 'elementor' ); | ||
return esc_html__( 'table', 'elementor' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we always use capital letters here:
return esc_html__( 'Table', 'elementor' );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
includes/widgets/table.php
Outdated
@@ -86,7 +85,7 @@ public function get_categories() { | |||
* @return array Widget keywords. | |||
*/ | |||
public function get_keywords() { | |||
return [ 'testOne', 'title', 'text' ]; | |||
return [ 'table', 'title', 'text' ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return [ 'table' ];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the 'title' and the 'text'
includes/widgets/table.php
Outdated
@@ -104,14 +103,14 @@ protected function get_upsale_data() { | |||
'condition' => ! Utils::has_pro(), | |||
'image' => esc_url( ELEMENTOR_ASSETS_URL . 'images/go-pro.svg' ), | |||
'image_alt' => esc_attr__( 'Upgrade', 'elementor' ), | |||
'description' => esc_html__( 'Create captivating testOnes that rotate with the Animated Headline Widget.', 'elementor' ), | |||
'upgrade_url' => esc_url( 'https://go.elementor.com/go-pro-testOne-widget/' ), | |||
'description' => esc_html__( 'Create captivating tables that rotate with the Animated Headline Widget.', 'elementor' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'description' => esc_html__( 'Create captivating tables.', 'elementor' ),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the description
package.json
Outdated
@@ -75,7 +75,7 @@ | |||
"eslint-plugin-no-jquery": "^2.7.0", | |||
"eslint-plugin-react": "^7.33.2", | |||
"eslint-webpack-plugin": "^4.0.1", | |||
"grunt": "^1.5.3", | |||
"grunt": "^1.6.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert to the orginal value. We can't update packages on the whole repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted
package-lock.json
Outdated
@@ -85,7 +85,7 @@ | |||
"eslint-plugin-no-jquery": "^2.7.0", | |||
"eslint-plugin-react": "^7.33.2", | |||
"eslint-webpack-plugin": "^4.0.1", | |||
"grunt": "^1.5.3", | |||
"grunt": "^1.6.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert changes. We can't make updates here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
package.json
Outdated
@@ -75,7 +75,7 @@ | |||
"eslint-plugin-no-jquery": "^2.7.0", | |||
"eslint-plugin-react": "^7.33.2", | |||
"eslint-webpack-plugin": "^4.0.1", | |||
"grunt": "^1.5.3", | |||
"grunt": "^1.6.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert changes. We can't make updates here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed it
includes/widgets/table.php
Outdated
|
||
<# if ( settings.list.length ) { #> | ||
<tbody> | ||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<tr> |
includes/widgets/table.php
Outdated
<# if ( settings.list.length ) { #> | ||
<tbody> | ||
<tr> | ||
<# _.each( settings.list, function( item ) { #> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<# _.each( settings.list, function( item ) { #> | |
<# _.each( settings.list, function( item ) { #> | |
<tr> |
includes/widgets/table.php
Outdated
<tr> | ||
<# _.each( settings.list, function( item ) { #> | ||
<td class="elementor-repeater-item-{{ item._id }}">{{{item.list_title}}}</td> | ||
<# }); #> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<# }); #> | |
includes/widgets/table.php
Outdated
<# _.each( settings.list, function( item ) { #> | ||
<td class="elementor-repeater-item-{{ item._id }}">{{{item.list_title}}}</td> | ||
<# }); #> | ||
</tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</tr> | |
</tr> | |
<# }); #> |
includes/widgets/table.php
Outdated
$this->add_control( | ||
'rows', | ||
[ | ||
'label' => esc_html__( "Rows' contents", 'elementor' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'label' => esc_html__( "Rows' contents", 'elementor' ), | |
'label' => esc_html__( 'Content rows', 'elementor' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
includes/widgets/table.php
Outdated
'rows', | ||
[ | ||
'label' => esc_html__( "Rows' contents", 'elementor' ), | ||
'show_label' => esc_html__( true, 'elementor' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'show_label' => esc_html__( true, 'elementor' ), | |
'show_label' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
includes/widgets/table.php
Outdated
'name' => 'column_content_one', | ||
'label' => esc_html__( 'Content column 1', 'elementor' ), | ||
'type' => \Elementor\Controls_Manager::TEXT, | ||
'default' => esc_html__( 'Content column 1' , 'elementor' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove default values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
includes/widgets/table.php
Outdated
if ( $settings['rows'] ) { | ||
echo '<tbody>'; | ||
$rows = $settings['rows']; | ||
for ($i=0; $i < count($rows) - 1; $i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the rows minus 1 is causing a problem.
Elementor used always spaces in between, check the other files in the repository.
for ($i=0; $i < count($rows) - 1; $i++) { | |
for ( $i=0; $i < count( $rows ); $i++ ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I should have put <= like in the JS side
includes/widgets/table.php
Outdated
<# if ( settings.rows.length ) { #> | ||
<tbody> | ||
<# let rows = settings.rows #> | ||
<# for(let i = 0; i <= rows.length - 1; i++){ #> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<# for(let i = 0; i <= rows.length - 1; i++){ #> | |
<# for( let i = 0; i <= rows.length - 1; i++ ){ #> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed it
includes/widgets/table.php
Outdated
<# let rows = settings.rows #> | ||
<# for(let i = 0; i <= rows.length - 1; i++){ #> | ||
<tr> | ||
<td class="elementor-repeater-item-{{ rows[i]._id }}">{{{rows[i].column_content_one}}}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<td class="elementor-repeater-item-{{ rows[i]._id }}">{{{rows[i].column_content_one}}}</td> | |
<td class="elementor-repeater-item-{{ rows[i]._id }}">{{{ rows[i].column_content_one }}}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
includes/widgets/table.php
Outdated
* | ||
* @return array Widget promotion data. | ||
*/ | ||
protected function get_upsale_data() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i deleted it
@@ -7447,9 +7447,9 @@ | |||
} | |||
}, | |||
"node_modules/caniuse-lite": { | |||
"version": "1.0.30001532", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert changes.
$this->add_control( | ||
'table_head_color', | ||
[ | ||
'label' => esc_html__( 'Table head Color', 'elementor' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use labels from Trello.
Using the correct lowercase vs uppercase is important. You can't mix it randomly.
PR Checklist
PR Type
What kind of change does this PR introduce?
Summary
This PR can be summarized in the following changelog entry:
Description
An explanation of what is done in this PR
Test instructions
This PR can be tested by following these steps:
Quality assurance
Fixes #