Reputation: 1323
My need is to refresh the page when author drags component from side panel onto parsys. The component displays the edit tool bar only after page refresh. This is problem only in touch ui since classic editConfig displays edit bar always on the page. How do I sneak a page refresh action when author drags component from side panel?
Upvotes: 2
Views: 2640
Reputation: 1323
After some investigation here is what I found and it works.
The java script that is executed when drag&drop action happens in touch ui is:
/libs/cq/gui/components/authoring/clientlibs/editor/js/edit/edit.actions.js
So I created an overlay, basically copied the js into my application client libraries and added below condition in self.doInsert() function:
self.doInsert = function (component, insertBehavior, editableNeighbor, historyConfig, additionalData) {
if(component.componentConfig.path == '/apps/sample/components/media/rich-media' || component.componentConfig.path == '/apps/sample/components/media/tiled-display')
{ window.location.reload(); }
Now page is refreshing after author drags the component.
Please let me know if this is advisable way and why cq:EditListenersConfig is not working in touch ui.
Upvotes: 2