Fix behavior of update button#83
Conversation
Also use text() instead of html()
| save.text( component.data.i18n.updateButton ); | ||
| } else { | ||
| save.html( component.data.i18n.updateButton ); | ||
| save.text( component.data.i18n.saveButton ); |
There was a problem hiding this comment.
I think all of this logic related to the buttons should be moved to addButton.
There was a problem hiding this comment.
We could move this logic to addButton but we also want to tie this logic on date input change so I kept it separate. But yes I see the advantage of keeping all button logic in addButton.
Maybe we should create a event for schedule and bind this button logic in addButton with that event? (using wp.customize.state.create)
There was a problem hiding this comment.
Yes, creating more states would be good and then listening for changes to those states in a centralized location I think is the best architecture.
|
@westonruter I've refactored code as you suggested in #83 (comment) as part of PR #76 - e27ed55 |
@PatelUtkarsh I need your help to fix some apparent regressions that were introduced with scheduling. Namely there is logic currently in
populateSettingthat seems like it should be refactored and moved toaddButtons.See #81 for details on the bug needing to be fixed.
Fixes #81