#2232: Send the current element values as parameters to the FileBrowser (link
dialog)
---------------------------+------------------------------------------------
Reporter: asuter | Type: New Feature
Status: new | Priority: Normal
Milestone: | Component: UI : Dialogs
Version: FCKeditor 2.6 | Keywords:
---------------------------+------------------------------------------------
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 ) ;
}
}}}
--
Ticket URL: <http://dev.fckeditor.net/ticket/2232>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac