Opened 16 years ago

Closed 10 years ago

#1652 closed New Feature (fixed)

Change file/image browser startup folder programmatically

Reported by: Thomas Tallyce Owned by:
Priority: Normal Milestone:
Component: File Browser Version: FCKeditor 2.5
Keywords: Cc:


Feature request: there doesn't seem to be a way to change the file browser startup folder programmatically.

E.g. supposing one was editing a page /path/to/bar.html it would be useful to be able to set the file/image browser to the same folder, /path/to/ as that may well be the most logical place for files/images to be looked for first. mentions this request from someone else.

Change History (5)

comment:1 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Keywords: startup removed

comment:2 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Type: BugNew Feature

Change File Browser startup folder

The default file browser won't start any where but '/'.

In editor/filemanager/browser/default/frmfolders.html, on line 171

'LoadFolders( '/' ) ;'

needs to be

'LoadFolder( oConnector.CurrentFolder );'

And a few lines later

'LoadFolders( '/' ) ;'

needs to be

'LoadFolders( oConnector.CurrentFolder );'

And then in /editor/filemanager/browser/default/browser.html on line 36

'oConnector.CurrentFolder = '/' ;'

needs to be

'oConnector.CurrentFolder = GetUrlParam('CurrentFolder' ) ;'

Moved from[[BR]] Original author: anonymous

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

The change in frmFolders.html SetResourceType( type ) (refered above as line 171) is wrong, because when the user changes the resource type then we must reload the base folder for that type as the current folder probably won't exist for the new file type.

The change in

window.onload = function()
	oListManager.Init() ;
	LoadFolders( oConnector.CurrentFolder ) ;

would be right, if oConnector.CurrentFolder points to the proper folder, but the change in browser.html is wrong, because the current Folder isn't passed as a parameter to the file manager so it gets set to an empty string and the connector might not be ready to handle that case (and anyway it doesn't get the current folder).

So this patch would need a way to properly get the current folder from the opener window or something similar.

Moved from Sourceforge.
Original author: AlfonsoML

comment:4 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed added

comment:5 Changed 10 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

File browser is no longer used with CKEditor. A separate application CKFinder was created for that purpouse and it has possibility to set startup folder.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy