Skip to content

Commit

Permalink
Widget Visibility - Save button enabled on removal of conditional (#8339
Browse files Browse the repository at this point in the history
)

* Ensure Widget state becomes dirty when a Visibility conditional is removed.

The existing logic for coniditionals only cause the Widget state to become dirty when the last conditional is removed. This change makes the state become dirty on every delete action. This allows users to remove visibility clauses and save instead of making and reverting changes to other fields.

* Standard Spacing
  • Loading branch information
mdbitz authored and dereksmart committed Dec 14, 2017
1 parent e26217c commit d5a1a25
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jQuery( function( $ ) {
$( this ).closest( 'div.widget' ).find( 'a.display-options' ).click();
$condition.find( 'select.conditions-rule-major' ).val( '' ).change();
} else {
$condition.find( 'select.conditions-rule-major' ).change();
$condition.detach();
}

Expand Down

0 comments on commit d5a1a25

Please sign in to comment.