Merge branch 'temp-editing-all-variants' into temp-variants-with-file-uploads

This commit is contained in:
Shannon
2018-08-07 09:18:48 +10:00
3 changed files with 10 additions and 10 deletions

View File

@@ -140,15 +140,15 @@
return _.pick(v, "active", "language", "isEdited", "state");
}));
}
}
//ensure the current culture is set as the active one
for (var i = 0; i < variant.variants.length; i++) {
if (variant.variants[i].language.culture === variant.language.culture) {
variant.variants[i].active = true;
}
else {
variant.variants[i].active = false;
//ensure the current culture is set as the active one
for (var i = 0; i < variant.variants.length; i++) {
if (variant.variants[i].language.culture === variant.language.culture) {
variant.variants[i].active = true;
}
else {
variant.variants[i].active = false;
}
}
}

View File

@@ -367,7 +367,7 @@
return {
name: v.name,
properties: getContentProperties(v.tabs),
culture: v.language.culture,
culture: v.language ? v.language.culture : null,
publish: v.publish,
save: v.save
};

View File

@@ -91,7 +91,7 @@ namespace Umbraco.Web.Editors.Binders
throw new InvalidOperationException("No content type found with alias " + model.ContentTypeAlias);
}
return new Content(
model.PersistedContent.ContentType.VariesByCulture() ? null : model.Variants.First().Name,
contentType.VariesByCulture() ? null : model.Variants.First().Name,
model.ParentId,
contentType);
}