ENH Set Published button dirty state when Link is an unpublished state #193
+51
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #152
I've tested this for:
It will set the "Publish" button to a dirty state when the LinkPickerTitle has either a 'Draft' or a 'Modified' versionedState. It won't change the state of "Save" button as LinkField constantly saves everything via AJAX.
Note that for Elemental this is only true if the Link if modifed via the link modal. The "Save" button will still get a dirty state when new links are added or deleted. This is due to existing logic in Elemental to that will trigger the jQuery changetracker which will alter both the Save and the Publish buttons. There's nothing we can really do about this without a lot of hacking around it, and I don't think this is worth it since a dirty Save button is far from the worse thing ever.
I've also created a new issue for the all the CMS inconsistency I discovered about the changetracker while doing this work