cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the icon of new folder type in Share?

barryma
Champ in-the-making
Champ in-the-making
Hi,

It is quite easy to define new folder icon image for new folder type (with parent cm:folder) in Alfresco Explorer. But I don't know how to do the same in the document library of Alfresco Share. Could you give a hand?

This file
C:\Alfresco\tomcat\webapps\share\components\documentlibrary\documentlist.js
is used to render the document list in Share. Do you have any hint for me to add new icon image to the custom folder type?

Thank you

Barry
8 REPLIES 8

efestione
Champ in-the-making
Champ in-the-making
Same question for me…
Anyone can help?

thank you

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you can replace the image, this is fastest solution and if you find some better you can act smart Smiley Happy

mikeh
Star Contributor
Star Contributor
Take a look at how we did it for the DoD 5015.2 module. It's in modules/dod-5015-share in SVN.

Thanks,
Mike

thestorm
Champ in-the-making
Champ in-the-making
Hey Mike, could you please explain what u guys did there since I dont get it actually. I just wanna change the folder icons in the treeview (tree.js / tree.css) but it seems like I miss sth

mikeh
Star Contributor
Star Contributor
You might have noticed I didn't change the tree icons, even for RM. They're currently a YUI sprite, around 8000 pixels high - not individual images.

Whilst it's possible to override the CSS classes assigned to each treenode and hence override to new sprites, this isn't something I investigated in any great depth.

Thanks,
Mike

efestione
Champ in-the-making
Champ in-the-making
Hi all,
has anyone achieved this in Share?
I need to change the icon only for a particular new folder type…

thanks
Alex

kamielvdz
Champ in-the-making
Champ in-the-making
A way to achieve this by updating the function DL_renderCellThumbnail in documentlist.js (and -min.js)

Replace
if(type == "folder"){
    elCell.innerHTML = '…..documentlibrary/images/folder-32.png…
}
With
if (record.nodeType == "cg:book") {
    elCell.innerHTML = '…..documentlibrary/images/mybook-32.png…
}else if(type == "folder"){
    elCell.innerHTML = '…..documentlibrary/images/folder-32.png…
}

Where cg:book is a new  type of folder and mybook-32.png is a new image

efestione
Champ in-the-making
Champ in-the-making
A way to achieve this by updating the function DL_renderCellThumbnail in documentlist.js (and -min.js)

Thank you very much for this!