if (AJS) {
AJS.toInit(function () {
function hideElements($element) {
if ($element) {
$element.css("display", "none");
}
}
function hideSpaceBlueprints() {
const $templateElements = AJS.$('#create-dialog .templates .template[data-blueprint-module-complete-key*="projectdoc"][data-create-result="space"]');
hideElements($templateElements);
}
function hidePageBlueprints() {
const $templateElements = AJS.$('#create-dialog .templates .template[data-blueprint-module-complete-key*="projectdoc"]:not([data-create-result="space"])');
hideElements($templateElements);
}
function hideMacros() {
const $macroElements = AJS.$('#select-macro-page .dialog-page-body .macro-list-item[id*="projectdoc"]');
hideElements($macroElements);
}
function hideAutocompleteMacros() {
const $macroElements = AJS.$('li>a[class*="autocomplete-macro-projectdoc"]');
if ($macroElements) {
$macroElements.parent().css("display", "none");
}
}
hideSpaceBlueprints();
hidePageBlueprints();
hideMacros();
hideAutocompleteMacros();
});
}