These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Avoid tree expand

Hello,

Does anybody know how to prevent the root folder being expanded by default. I don't want this to happen because it takes a lot of time when it's a large folder.

Clemens.
Clemens 2/25/2011 5:38 AM
In 4.1...

Edit fileultimate.js and find these lines:

       //Select first root folder at start

       if (treeNode == tree.root && treeNode.childNodes.length > 0) {

        treeNode.childNodes[0].select();

       }

Commenting out the treeNode.childNodes[0].select(); line should do the trick.

In 4.0 same code but this is found on ..FileVista\FileVistaControl\scripts\filevista.js file.
Esteban 2/25/2011 5:46 AM
Hi Esteban,

Thank you for answer.
I'm don't know anything about programming, so can you show me how the code should look like for version 4.1?

Best regards, Clemens.
Clemens 2/25/2011 5:49 AM
Change the line:

 treeNode.childNodes[0].select();

to:

// treeNode.childNodes[0].select();
Esteban 2/25/2011 5:57 AM
You can do this using notepad.
Esteban 2/25/2011 5:58 AM
I'm using version 4.1 but I can't seem to find this file.
Clemens 2/25/2011 6:49 AM
Remember that the file you are looking for is: fileultimate.js 
Esteban 2/25/2011 7:14 AM
I realy can't find this file on the web server.
Clemens 2/25/2011 7:15 AM
I'm with Clemens,  I can not find  fileultimate.js file anywhere in FileVista 4.1 directory.
Shawn 2/27/2011 1:01 AM
I have 4.0 and I have filevista.js. When I asked Cem this same question he first thought I had 4.1 and this was his reply. Sorry I couldn't help guys... will have to wait for Cem's feedback.
Esteban 2/28/2011 2:11 AM
As of v4.1, all resources are embedded into GleamTech.FileVista.dll. However it's possible to override embedded resources by putting the customized versions under FileVista\App_GlobalResources folder.

Please first download Resource files for FileVista v4.1.

For instance, if you want to customize the fileultimate.js file, then copy App_GlobalResources\GleamTech.FileVista\(GleamTech.FileUltimate)\scripts\fileultimate.js file from the above zip file to the corresponding location under your FileVista folder (App_GlobalResources\GleamTech.FileVista\(GleamTech.FileUltimate)\scripts\). Then edit this file to apply your changes. Whenever you do a change under FileVista\App_GlobalResources, ASP.NET engine should restart the application so changes will be detected automatically. If changes are not detected, you can force by recycle the app-pool or touch the web.config (open and save).


For your specific case, edit fileultimate.js and go to line 263:

        treeNode.childNodes[0].select();

Comment out this line like this:

        //treeNode.childNodes[0].select();

Save the file and refresh FileVista in the browser. You should see that the root folder is not expanded by default.
Cem Alacayir 3/4/2011 2:37 PM
Thanks,

This work perfectly.
Shawn 4/1/2011 5:20 PM
Can anyone tell me how to solve this with the latest version?
Clemens 2/28/2012 6:43 AM
For v4.5.9,
Please first download Scripts for FileVista v4.5.9.

Copy FileManager.js from this zip to "FileVista\App_GlobalResources\FileUltimateResourceStore\JavaScript" folder.

Edit FileManager.js and go to line 344:

        this.TreeView.root.childNodes[0].Select();

Change this line to

        null;

Save the file and refresh FileVista in the browser. 
Cem Alacayir 3/14/2012 1:04 PM