Opened 17 years ago
Last modified 17 years ago
#2232 confirmed New Feature
Send the current element values as parameters to the FileBrowser (link dialog)
Reported by: | Adrian Suter | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Dialogs | Version: | FCKeditor 2.6 |
Keywords: | HasPatch | Cc: |
Description
In the link dialog, upon a click on "Browse Server" the current FCKeditor simply calls a uri defined by the configuration value
FCKConfig.LinkBrowserURL = "..." ;
Assume we defined a custom link browser. Of course we could use in our custom link browser the javascript command
opener.GetE("txtUrl").value
to access the current value given in the url textfield of the link dialog. But this is a client side action. Wouldn't it be great to have also a server-side possibility to know the current value?
I propose the following: Add some keys (placeholders) to the LinkBrowserURL which then gets replaced by the current values.
FCKConfig.LinkBrowserURL = "custom.php?url=URL&proto=PROTOCOL" ;
Implementation: It is easy to implement this feature. In the file "editor/dialog/fck_link/fck_link.js" replace
function BrowseServer() { OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; }
by
function BrowseServer() { var uri = FCKConfig.LinkBrowserURL ; uri = uri.replace( /URL/g, encodeURIComponent(GetE("txtUrl").value) ) ; uri = uri.replace( /PROTOCOL/g, encodeURIComponent(GetE("cmbLinkProtocol").value) ) ; OpenFileBrowser( uri, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; }
Attachments (1)
Change History (2)
comment:1 Changed 17 years ago by
Keywords: | Confirmed HasPatch added |
---|
Changed 17 years ago by
Attachment: | 2232.patch added |
---|
Patch