03-26-2018 02:21 AM
Hi all,
I am trying to hide the description from my sites dashlet in alfresco.
For that,I have made commented some part in my tomcat/webapps/share/components/dashlet/my-sites.js file as fol
renderCellDetail: function MySites_renderCellDetail(elCell, oRecord, oColumn, oData)
{
var site = oRecord.getData(),
/**description = '<span class="faded">' + this.msg("details.description.none") + '</span>',*/
desc = "";
if (site.isInfo)
{
desc += '<div class="empty"><h3>' + site.title + '</h3>';
/** desc += '<span>' + site.description + '</span>*/</div>';
}
else
{
// Description non-blank?
/** if (site.description && site.description !== "")
{
description = $links($html(site.description));
}*/
desc += '<h3 class="site-title"><a href="' + Alfresco.constants.URL_PAGECONTEXT + 'site/' + site.shortName + '" class="theme-color-1">' + $html(site.title) + '</a></h3>';
/** desc += '<div class="detail"><span>' + description + '</span></div>';*/
but it is not working and description is not hidden in the share page.
Any help would be greatly appreciated.
03-26-2018 09:22 AM
Hi krutik,
I have override the file my-sites.js in share/src/main/assembly/web/components/dashlets/my-sites.js and made the required changes and it is working fine now
thanku so much for ur help
03-26-2018 02:44 AM
It seems that you are directly making changes inside the installation.You should not do this.Ideally you should create a maven project and should make the changes.
Below can be issues if you still want to make the changes in installation.
In side the share-config-custom.xml file, there is configuration for loading the minified javascript file.If that is marked as true, in that case file with my-sites-min.js will get loaded.Below is configuration for loading the non minified file.This configuration must be marked as false in production env.
<config replace="true">
<flags>
<!-- Developer debugging setting to turn on DEBUG mode for client scripts
in the browser -->
<client-debug>true</client-debug>
<!-- LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl,
Ctrl, Shift, Shift). This flag automatically activates logging on page load. -->
<client-debug-autologging>true</client-debug-autologging>
</flags>
</config>
03-26-2018 03:00 AM
Hi Krutik,
I have made the foolowing change in share-config-custom.xml file
<config replace="false">
<!-- Developer debugging setting to turn on DEBUG mode for client scripts
in the browser -->
but still its not working.
03-26-2018 03:04 AM
<config replace="false"> will just override the configuration.If you would like to load non minified javascript file, in that case you need to mark client-debug as true.
<client-debug>true</client-debug>
03-26-2018 03:43 AM
Hi Krutik,
where should I put the tomcat/webapps/share/components/dashlets/my-sites.js file in the project for overriding the file
03-26-2018 09:22 AM
03-26-2018 11:49 AM
Welcome
Explore our Alfresco products with the links below. Use labels to filter content by product module.