cancel
Showing results for 
Search instead for 
Did you mean: 

'My Documents'-Dashlet not showing folders

michaelp
Confirmed Champ
Confirmed Champ
Hi,

On Alfresco 4.2.2 the "My Documents"-Dashlet is not showing any favorite folders.

Can someone give me clear instructions or code to "fix" this?

Please DO NOT refer to issue MNT-1972 or ALF-19451 because the bug is still not fixed (on 5 environments: 2 local, 1 dev, 1 test, 1 prod).

I have looked in every javascript file but I have not found where the filter "documents" is applied.

I found:

filter.libs.js
TYPE_MAP:
   {
      "documents": '+(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")', // changing this line has no effect
      "folders": '+(TYPE:"folder" OR TYPE:"app:folderlink")',
      "images": '+@cm\\:content.mimetype:image/*'
   },


doclist.lib.js
   if (parsedArgs.type === "documents") // from where in god's sake comes this arguement? where is the url specified to change the call?
                                       //I dont want to change the if statement maybe it is used by other calls as well
   {
      nodes = documentNodes;
      totalRecords -= folderNodesCount;
   }


In the doclist.lib.js I would add another else-if-statement to handle the arguement "documentsandfolders" but then WHERE can I change the call from the dashlet?

Every js imports many other js and so on … I lost the overview.

Thanks,
Michael
2 REPLIES 2

aaditvmajmudar
Confirmed Champ
Confirmed Champ
Hi,

In doclist.get.js file, you will find below code.

if (parsedArgs.type === "documents")
   {
      nodes = documentNodes;
   }
   else
   {
      nodes = folderNodes.concat(documentNodes);
   }

Just add one if condition at first like,

   if(filter == "favourites")
   {
      nodes = folderNodes.concat(documentNodes);
   }
//OOTB Code but first if will be replaced with else-if
   else if (parsedArgs.type === "documents")
   {
      nodes = documentNodes;
   }
   else
   {
      nodes = folderNodes.concat(documentNodes);
   }

Hope this helps.

Thank you so much!

You helped a lot!

Best regards,
Michael