Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon fallback to icon-document for existing document types #11283

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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