To refresh/ re - compile the angular code on dialog save button pressed, You should add "cq:editConfig" node under the component. Under this node create a node with name "cq:listeners" with primary type as "cq:EditListenersConfig".
On this listener node add a property "afteredit" with following value :
function(path, definition) {
var s=window;var frameObj = document.getElementById('ContentFrame');
if(typeof frameObj !== "undefined" && frameObj !== null){
s = frameObj.contentWindow;
}else{path.refreshSelf();};
var el = this.dom;
if(typeof el === "undefined" || el === null){el = this.el.dom}; s.angular.element(s.document.body).injector().invoke(function($compile) { var scope = s.angular.element(el).scope(); $compile(el)(scope);});
}
On this listener node add a property "afteredit" with following value :
function(path, definition) {
var s=window;var frameObj = document.getElementById('ContentFrame');
if(typeof frameObj !== "undefined" && frameObj !== null){
s = frameObj.contentWindow;
}else{path.refreshSelf();};
var el = this.dom;
if(typeof el === "undefined" || el === null){el = this.el.dom}; s.angular.element(s.document.body).injector().invoke(function($compile) { var scope = s.angular.element(el).scope(); $compile(el)(scope);});
}
0 comments:
Post a Comment