In case single page apps with aem on touch ui , When we insert partials (aem page) in paren aem page, page does not become editable, So we have to intiate the edit layers mannualy.
if (typeof parent.window.Granite != "undefined" && typeof parent.window.Granite.author != "undefined" && typeof parent.window.Granite.author.overlayManager != "undefined") {
parent.window.Granite.author.overlayManager.destroy(parent.window.Granite.author.ContentFrame.loadEditables());
if (!parent.$(".js-editor-GlobalBar-previewTrigger").hasClass("is-selected")) {
parent.$(".js-editor-GlobalBar-previewTrigger").trigger("click");
parent.$(".js-editor-GlobalBar-layerCurrent").trigger("click");
}
}
parent.window.Granite.author.overlayManager.destroy(parent.window.Granite.author.ContentFrame.loadEditables());
if (!parent.$(".js-editor-GlobalBar-previewTrigger").hasClass("is-selected")) {
parent.$(".js-editor-GlobalBar-previewTrigger").trigger("click");
parent.$(".js-editor-GlobalBar-layerCurrent").trigger("click");
}
}
0 comments:
Post a Comment