cancel
Showing results for 
Search instead for 
Did you mean: 

Dashlet Resizer is not working on the custom page.

nikhilesh_s1vak
Confirmed Champ
Confirmed Champ
Hi,

I created a custom page in alfresco share and trying to add a custom dashlet on that. I done by creating a page and corresponding template instance. In the template instance document i mentioned the Dashlet URLs whichever is to be displayed in the components tag. I got the dashelts and everything is fine but i lost the resizing effect of the dashlets even i mentioned the Alfresco.widget.DashletResizer in the html file. In the user-dashboard and site dashboard the dashboard is working fine with resizing effect but not working in the custom page. I was working on it since quite a long time. Can anyone please help me in this regard?

Thanks,
Nikhilesh
3 REPLIES 3

ddraper
World-Class Innovator
World-Class Innovator
Are you including the "share.js" resource on your page (as this defines the JavaScript for the dashlet resizer) and are you instantiating a new instance of the Alfresco.widget.DashletResizer on the DOM element for the dashlet. Finally, does your page satisfy the requirements to enable resizing. This is controlled through the Alfresco.constants.DASHLET_RESIZE constant which is set to true when the current user owns the dashboard that the dashlet is displayed on (this is what prevents a consumer from resizing dashlets on a site dashboard for example)

Hi draper,
Thanks for your quick response. I am instantiating the Alfresco.widget.DashletResizer in Dashlet HTML file as mentioned below.
new Alfresco.widget.DashletResizer("${args.htmlid}", "${instance.object.id}");
How does my page satisfy the requirements to enable resizing? and How to include share.js in page? Do i need to include in the component html file or somewhere in page configuration?

ddraper
World-Class Innovator
World-Class Innovator
"share.js" is just a JavaScript file in Share that you need to make sure you have loaded onto the page (as you would any other JavaScript dependency file). To enable sizing you just need to ensure that the global Aconstant: lfresco.constants.DASHLET_RESIZE is set to true (declare it anywhere in the page)… however, you need to bear in mind that resizing will attempt to persist the new size and if the current user doesn't have permission and there is no where to save the new size to you may get errors (if not on the page then at least in the logs) and the updated size will not be retained on page reload.