Skip to content

Commit

Permalink
Merge branch 'release/2.15.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Dec 1, 2021
2 parents 9d70c35 + 742a880 commit abd2570
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
28 changes: 4 additions & 24 deletions js/siteorigin-panels/dialog/row.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,14 @@ module.exports = panels.view.dialog.extend({
}

// Update the row styles if they've loaded
if (!_.isUndefined(this.styles) && this.styles.stylesLoaded) {
if ( ! _.isUndefined( this.styles ) && this.styles.stylesLoaded ) {
// This is an edit dialog, so there are styles
var newStyles = {};
try {
newStyles = this.getFormValues( '.so-sidebar .so-visual-styles.so-row-styles' ).style;
}
catch (err) {
console.log('Error retrieving row styles - ' + err.message);
console.log( 'Error retrieving row styles - ' + err.message );
}

// Have there been any Style changes?
Expand All @@ -719,27 +719,8 @@ module.exports = panels.view.dialog.extend({
}
}


if ( this.styles.stylesLoaded ) {
// If the styles view has loaded.
var newStyles = {};
try {
newStyles = this.getFormValues( '.so-sidebar .so-visual-styles' ).style;
}
catch ( e ) {
}

// Have there been any Style changes?
if ( JSON.stringify( this.model.attributes.style ) !== JSON.stringify( newStyles ) ) {
this.model.set( 'style', newStyles );
this.model.trigger( 'change:styles' );
this.model.trigger( 'change:styles-row' );
}
}


// Update the cell styles if any are showing.
if (!_.isUndefined(this.cellStyles) && this.cellStyles.stylesLoaded) {
if ( !_.isUndefined( this.cellStyles ) && this.cellStyles.stylesLoaded ) {

var newStyles = {};
try {
Expand All @@ -749,10 +730,9 @@ module.exports = panels.view.dialog.extend({
console.log('Error retrieving cell styles - ' + err.message);
}

this.cellStyles.model.set( 'style', newStyles );
// Has there been any Style changes?
if ( JSON.stringify( this.model.attributes.style ) !== JSON.stringify( newStyles ) ) {
this.model.set( 'style', newStyles );
this.cellStyles.model.set( 'style', newStyles );
this.model.trigger( 'change:styles' );
this.model.trigger( 'change:styles-cell' );
}
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ SiteOrigin Premium includes access to our professional email support service, pe

== Changelog ==

= 2.15.3 - 01 December 2021 =
* Rows/Cells: Prevented possible data mismatch.

= 2.15.2 - 29 November 2021 =
* Cells: Resolved undefined `style` error.

Expand Down

0 comments on commit abd2570

Please sign in to comment.