Skip to content

Commit

Permalink
Icon fallback to icon-document for existing document types (#11283)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarnef authored Oct 12, 2021
1 parent 359181c commit 93720c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ function DocumentTypesCreateController($scope, $location, navigationService, con
};

$scope.createComposition = function (icon) {
createDocType({ iscomposition: true, iselement: true, icon });
createDocType({ notemplate: true, iscomposition: true, iselement: true, icon });
};

$scope.createElement = function (icon) {
createDocType({ iselement: true, icon });
createDocType({ notemplate: true, iselement: true, icon });
};

$scope.close = function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,20 +413,22 @@
contentType.defaultTemplate = contentTypeHelper.insertDefaultTemplatePlaceholder(contentType.defaultTemplate);
contentType.allowedTemplates = contentTypeHelper.insertTemplatePlaceholder(contentType.allowedTemplates);
}

// set isElement checkbox by default
if (isElement) {
contentType.isElement = true;
}

// set icon if one is provided
if (icon !== null) {
if (icon !== null && icon !== undefined) {
contentType.icon = icon;
}

// set vary by culture checkbox by default
if (allowVaryByCulture) {
contentType.allowCultureVariant = true;
}

// convert icons for content type
convertLegacyIcons(contentType);

Expand Down

0 comments on commit 93720c9

Please sign in to comment.