cancel
Showing results for 
Search instead for 
Did you mean: 

Customize share document list to display custom file name

chandra_shekhar
Champ in-the-making
Champ in-the-making
Hi,

Alfresco Version - 4.0.e Community

I am new to Alfresco development. I want to display custom filename in the share browse view for Working Copies. For example, if the file name is sample.txt, I want to add sample_myname.txt only for Working Copies, i.e the files checked out for offline editing. While exploring customization options, I found that '/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/data' has surf-doclist.lib.js which processes the JSON data retrieved from repository.

I modified the function processItem(item) in the surf-doclist.lib.js where it is looking for working copy using below condition -
if (item.workingCopy){}

After making the changes, I created the folder structure 'shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/documentlibrary/data' and placed the following files along with the modified js file

surf-doclist.get.desc.xml (no change)
surf-doclist.get.js (no change)
surf-doclist.get.json.ftl (no change)
surf-doclist.lib.js (modified)

And then refreshed the web scripts. There was no change in the filenames of Working Copies displayed in share. I restarted the server also but no changes.

I get a feel this deployment method is flawed. Can someone guide on how can I correctly deploy these changes or if I am working on wrong set of files?

Thanks
Chandra
10 REPLIES 10

chandra_shekhar
Champ in-the-making
Champ in-the-making
Hi Murali,
Your suggestion works! I am able to extend the javascript custom behavior to web-extension folder. I was expecting to pull it to tomcat/shared/ but it did not work. SO pulled it under share/web-inf/classes/alfresco/web-extension and it works fine.
Thanks again
Chandra