Highlight inheritance cancelled component in livecopy | Community
Skip to main content
Level 2
March 25, 2020
Question

Highlight inheritance cancelled component in livecopy

  • March 25, 2020
  • 2 replies
  • 1547 views

Hi all,

I have a requirement to highlight the components that have cancelled inheritance in livecopy in edit mode. Can anyone help me to create an eventlistener for the same? On page, the inheritance cancelled component should be highlighted. and also whenever author has cancelled inheritance, it should be highlighted.

 

Thanks in advance. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Level 2
March 25, 2020
This is for Touch UI AEM 6.3.
Level 2
March 25, 2020

I have tried below implementation. 

 

$( window ).load(function() {
$('#EditableToolbar').bind("DOMSubtreeModified",function(){
$( "#EditableToolbar .cq-editable-action" ).click(function() {
var data_path;
var data_action = $(this).attr('data-action');
if(data_action == 'MSM_REENABLE_INHERITANCE'){
data_path = $(this).attr('data-path');
$(document).on("click", ".coral-Button--primary", function (e) {

$(".cq-Overlay--container").find(".cq-Overlay--component[data-path='" + data_path + "']").attr('data-info', '222');

});
}
});
});

});

 

But newly added attribute is getting removed.