Jump to the top feature

Hi guys,

I have a large list of folders, On the explorer menu (tree menu on the left) when I click on folder name to view assets inside, I have to scroll All the way to the top. On the other hand trash icon on the explorer has this cool feature, it will scroll to the top (like ctrl+home) automatically. I was wondering if I can expand this feature to folders.
just wanna add something like scroll(0,0) :smiley:
p.s already found dsp_explorer.cfm file that controls the explorer

Anyhelp would be appretiated.

Farhad

The tree is build dynamically and buried deep within a function (yeah I
know bad design). It will be a difficult thing to do due to this. However,
if you want to give it a try you can look into the folders.cfc file
(razuna/globals/cfc). Search for a function with “tree” in the name,
something like getfoldersfortree().

Hi

Thanks Nitai , Found it and edit was successful :smile:

As “Enterprise” Digital Asset Management states, It will be used in enterprise level environment and we should expect large number of folders and subfolders. In my environment I already have over 14000 subfolders in a single folder and I’m at an early stage of deployment. So this jump to the top feature in explorer is handy for every razuna enterprise user. I recommend adding this to next version if possible.

For the time being for ppl who want to implement manually here it goes:
1- find the file named folder.cfc as Nitai stated. (razuna/globals/cfc/folders.cfc)
2- find this function in the file:
3- find this line under function stated at previous step.

<li id="<cfif iscol EQ "T">col-</cfif>#folder_id#"<cfif subhere EQ "1"> class="closed"</cfif>><a href="##" onclick="loadcontent('rightside','index.cfm?fa=<cfif iscol EQ "T">c.collections<cfelse>c.folder</cfif>&col=F&folder_id=<cfif iscol EQ "T">col-</cfif>#folder_id#');" rel="prefetch" title="<cfif theid EQ 0><cfif iscol EQ "F"><cfif session.theuserid NEQ folder_owner AND folder_owner NEQ "">Folder of (#username#)</cfif></cfif></cfif>"><ins>&nbsp;</ins>#folder_name#<cfif theid EQ 0><cfif iscol EQ "F"><cfif session.theuserid NEQ folder_owner AND folder_owner NEQ "">*<cfif folder_name EQ "my folder"> (#username#)</cfif></cfif></cfif></cfif>

and change it to:

<li id="<cfif iscol EQ "T">col-</cfif>#folder_id#"<cfif subhere EQ "1"> class="closed"</cfif>><a href="##" onclick="scroll(0,0);loadcontent('rightside','index.cfm?fa=<cfif iscol EQ "T">c.collections<cfelse>c.folder</cfif>&col=F&folder_id=<cfif iscol EQ "T">col-</cfif>#folder_id#');" rel="prefetch" title="<cfif theid EQ 0><cfif iscol EQ "F"><cfif session.theuserid NEQ folder_owner AND folder_owner NEQ "">Folder of (#username#)</cfif></cfif></cfif>"><ins>&nbsp;</ins>#folder_name#<cfif theid EQ 0><cfif iscol EQ "F"><cfif session.theuserid NEQ folder_owner AND folder_owner NEQ "">*<cfif folder_name EQ "my folder"> (#username#)</cfif></cfif></cfif></cfif>

If you look closely, I just added scroll(0,0); after onclick=" in that line. so when a user click on a folder or subfolder it will automatically jumps to the top of the page and shows the content in users view.

4- Save the file go to administration -> maintenance -> flush template cache.
5- After flush is complete log in and verify.

Btw I’m not a web developer, and I only have a little knowledge about html, there maybe a dozen better ways to do it. Please let us know if there is a better way/function to it.

Hope this helps
Farhad

Hi,

Thank you for this. It will be in the final Razuna 1.8 release.