Announcement

Collapse
No announcement yet.

Default view for folder trees

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • rabii
    commented on 's reply
    i am glad it worked finally.

  • shalmaxb
    replied
    Coded this way:

    Code:
    {
    "isExpandedByDefault": true,
    "isCollapsedByDefault": false
    }
    it finally works. I had to do some browser refreshs until it appeared this way.
    Thanks a lot for your patient help.

    Leave a comment:


  • shalmaxb
    commented on 's reply
    tried also this, did not change

  • shalmaxb
    replied
    I again tried to make it work. I renamed the present file DocumentFolder.json for it does not have effect.
    I created a new DocumentFolder.json in the place where you mentioned with the following code:

    Click image for larger version

Name:	code.jpg
Views:	200
Size:	13.4 KB
ID:	80872











    But it did not work either. Cleared cache again, did rebuild and all that, but the default view does not change.
    Perhaps it could be, because I modified the document entity, but only by GUI in Admin.

    Leave a comment:


  • rabii
    replied
    Also please that you can only apply one value at the time it is either "isExpandedByDefault": true (which will give you the tree view but also will expand all files under any folder Or "isCollapsedByDefault":true which also produce tree view but it will give you access to only file on root and folder to access on top of the list. You can't use both value as true it will not work.

    Leave a comment:


  • shalmaxb
    commented on 's reply
    this was only a typing error, actually I have a file DocumentFolder.json at that location with the mentioned code already in it. I don`t know, from where this came, because I do not use Kanban in no place.
    Last edited by shalmaxb; 05-31-2022, 01:52 PM.

  • rabii
    replied
    Originally posted by shalmaxb View Post
    tested again, closed the browser, cleared cache (browser and espoCRM), rebuild, closed browser again, no way.

    A bit strange, I already have a Document.json file at that location with the following code:

    Code:
    {
    "kanbanViewMode": false,
    "color": null,
    "iconClass": null
    }
    but even, if I delete that code and put in only your provided snippet, it won`t work. I can switch the view by the ellipsis menu, but whenever I close the app, opening the next time will show the same only folder view
    why did you mentioned here that you already have Document.json ? if you are making changes in Document.json it is not going to work, it has to be DocumentFolder.json

    Leave a comment:


  • rabii
    replied
    That is weird i have just tried the same code on another installation and it working 100%. Just created a new file on custom/Espo/Custom/Resources/metadata/clientDefs/DocumentFolder.json and copied code and it is working perfect.

    can you share your code (DocumentFolder.json)!

    Leave a comment:


  • shalmaxb
    commented on 's reply
    Yes, I did that, I used the same path as you mentioned in post no. 6

  • rabii
    commented on 's reply
    Please note that you need to make changes in DocumentFolder.json under clientDefs not the Document.json hence the DocumentFolder is a type of category.

  • shalmaxb
    replied
    tested again, closed the browser, cleared cache (browser and espoCRM), rebuild, closed browser again, no way.

    A bit strange, I already have a DocumentFolder.json file at that location with the following code:

    Code:
    {
    "kanbanViewMode": false,
    "color": null,
    "iconClass": null
    }
    but even, if I delete that code and put in only your provided snippet, it won`t work. I can switch the view by the ellipsis menu, but whenever I close the app, opening the next time will show the same only folder view
    Last edited by shalmaxb; 05-31-2022, 01:39 PM.

    Leave a comment:


  • rabii
    replied
    That is weird, which version you have ?

    It is working on my instant, iam using latest version 7.1.7. see attached screenshot
    Attached Files

    Leave a comment:


  • shalmaxb
    replied
    Thanks rabii, but that does not work either.

    Leave a comment:


  • rabii
    replied
    Originally posted by shalmaxb View Post
    How can I achieve the document`s entity view to be default like this:

    Document folders allow creating a so-called document repository where all the files are properly categorized according to the needs of the company. Each document folder can have several sub-folders. The folders can be presented in a tree view or a list view.


    When I open the documents, I always get the folder view, but I need the tree view with the folders and documents on the right side.
    you can achieve this by creating a new file under custom/Espo/Custom/Resources/metadata/clientDefs/DocumentFolder.json and use code below:

    Code:
    {
    "isExpandedByDefault": true,
    "isCollapsedByDefault": true
    }
    isExpandedByDefault makes the tree view applied by default and isCollapsedByDefault makes the folders collapsed by default just like the image on the link you shared.

    hope this helps.
    Last edited by rabii; 05-30-2022, 03:03 PM.

    Leave a comment:


  • shalmaxb
    replied
    I have already tried all the possibilities and they work for the moment, but the next time I open the documents, it displays again the folder view.

    Leave a comment:

Working...
X