I have a component that has sub-components that the author can add as needed. To do this in classic UI we setup following in the authorclientlib:
CompanyName.Components.Parent = function (jQuery) { 'use strict'; return { addChild: function(component) { jQuery.post(); } }; }(jQuery);
and in the cq:editConfig:cq:actionConfigs:
handler=function(){CompanyName.Components.Parent.addChild(this)}
This works great for classic UI, but every time I click on the add button in Touch UI I receive a message saying: "Some code could not be run". I assume that I need to add the CompanyName.Components.Parent.addChild to the edit layer, but from the references I am finding I am not very sure how to do this. Would someone be able to help (if it matters we are on 6.0, SP1)?
Thanks in advance!
Views
Replies
Total Likes
Have you set a property "categories" of String type to "cq.authoring.dialog" on client library node (cq:ClientLibraryFolder) ?
Views
Replies
Total Likes
I had not, but I have added it now (see attachment). It has not helped. Do I need to add a separate clientlib that roles up the cq.authoring.dialog or should it do it automatically? Thanks.
Views
Replies
Total Likes
Also, add dependencies property to the clientlib node and set it's value to - "granite.jquery". And change your code to use jQuery from Granite as below-
(function (document, $) {
Views
Replies
Total Likes