Revert addDefaultProperties to master and adjust addCustomProperties accordingly

This commit is contained in:
kjac
2016-03-23 08:38:07 +01:00
parent 75fa2bb1bb
commit a424a7e4f3
+6 -6
View File
@@ -304,20 +304,20 @@ angular.module("umbraco").controller("Imulus.ArchetypeController", function ($sc
//helper, ini the render model from the server (model.value)
function init() {
$scope.model.value = removeNulls($scope.model.value);
addDefaultProperties();
addDefaultProperties($scope.model.value.fieldsets);
}
function addDefaultProperties()
function addDefaultProperties(fieldsets)
{
_.each($scope.model.value.fieldsets, function (fieldset)
_.each(fieldsets, function (fieldset)
{
fieldset.collapse = false;
fieldset.isValid = true;
});
}
function addCustomProperties() {
_.each($scope.model.value.fieldsets, function (fieldset) {
function addCustomProperties(fieldsets) {
_.each(fieldsets, function (fieldset) {
addCustomPropertiesToFieldset(fieldset);
});
}
@@ -447,7 +447,7 @@ angular.module("umbraco").controller("Imulus.ArchetypeController", function ($sc
$scope.activeSubmitWatcher = 0;
// create properties needed for the backoffice to work (data that is not serialized to DB)
addCustomProperties();
addCustomProperties($scope.model.value.fieldsets);
});
//helper to count what is visible