Make sure to check the dirty state of the umbContent app viewModel when saving/publishing

This commit is contained in:
Kenn Jacobsen
2018-10-23 15:45:42 +02:00
committed by Sebastiaan Janssen
parent aa4acb33e8
commit 024338790f

View File

@@ -22,8 +22,12 @@
//determine a variant is 'dirty' (meaning it will show up as save-able) if it's
// * the active one
// * it's editor is in a $dirty state
// * it's umbContent app viewModel (if any) is in a $dirty state
// * it is in NotCreated state
return (variant.active || variant.isDirty);
var contentApp = _.find(variant.apps, function(app) {
return app.alias === "umbContent";
});
return (variant.active || variant.isDirty || (contentApp && contentApp.viewModel && contentApp.viewModel.isDirty));
}
function pristineVariantFilter(variant) {