Commit b6f01601 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2009-06-18 Kazuhiko

* add a simple file browser for fckeditor, that allows to upload only in the current document.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27643 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c16af63f
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>editor_</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>fck_browser</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>browser.html</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!--\n
* FCKeditor - The text editor for internet\n
* Copyright (C) 2003-2004 Frederico Caldeira Knabben\n
* \n
* Licensed under the terms of the GNU Lesser General Public License:\n
* \t\thttp://www.opensource.org/licenses/lgpl-license.php\n
* \n
* For further information visit:\n
* \t\thttp://www.fckeditor.net/\n
* \n
* File Name: browser.html\n
* \tThis page compose the File Browser dialog frameset.\n
* \n
* Version: 2.0 FC\n
* Modified: 2005-05-16 \n
* \n
* File Authors:\n
* \t\tFrederico Caldeira Knabben (fredck@fckeditor.net)\n
* Browser and Connector adapted for Zope objects by jean-mat@macadames.com\n
* New attributes for xml nodes (title, description, image size for Zphotoslide albums ...)\n
* \n
-->\n
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n
<html>\n
\t<head>\n
\t\t<title>FCKeditor - Resources Browser</title>\n
\t\t<link href="editor/filemanager/browser/zope/Browser.css" type="text/css" rel="stylesheet">\n
\t\t<script type="text/javascript" src="editor/filemanager/browser/zope/js/fckxml.js"></script>\n
\t\t<script language="javascript">\n
\n
function GetUrlParam( paramName )\n
{\n
\tvar oRegex = new RegExp( \'[\\?&]\' + paramName + \'=([^&]+)\', \'i\' ) ;\n
\tvar oMatch = oRegex.exec( window.top.location.search ) ;\n
\t\n
\tif ( oMatch && oMatch.length > 1 )\n
\t\treturn oMatch[1] ;\n
\telse\n
\t\treturn \'\' ;\n
}\n
\n
var oConnector = new Object() ;\n
\n
var sCurrentPath = escape(GetUrlParam( \'CurrentPath\' )) ;\n
\n
if (sCurrentPath ==\'\') sCurrentPath = \'/\' ;\n
\n
var sConnUrl = GetUrlParam( \'Connector\' ) ;\n
\n
// Gecko has some problems when using relative URLs (not starting with slash).\n
if ( sConnUrl.substr(0,1) != \'/\' && sConnUrl.indexOf( \'://\' ) < 0 )\n
\tsConnUrl = window.location.href.replace( /browser.html.*$/, \'\' ) + sConnUrl ;\n
\n
oConnector.ConnectorUrl\t\t= sConnUrl + \'?\' ;\n
\n
var sServerPath = GetUrlParam( \'ServerPath\' ) ;\n
if ( sServerPath.length > 0 )\n
\toConnector.ConnectorUrl += \'ServerPath=\' + escape( sServerPath ) + \'&\' ;\n
\n
oConnector.ResourceType\t\t= GetUrlParam( \'Type\' ) ;\n
oConnector.ShowAllTypes\t\t= ( oConnector.ResourceType.length == 0 ) ;\n
\n
if ( oConnector.ShowAllTypes )\n
\toConnector.ResourceType = \'File\' ;\n
\n
oConnector.SendCommand = function( command, params, callBackFunction )\n
{\n
\tvar sUrl = this.ConnectorUrl + \'Command=\' + command ;\n
\tsUrl += \'&Type=\' + this.ResourceType ;\n
\tsUrl += \'&CurrentFolder=\' + escape( this.CurrentFolder ) ;\n
\t\n
\tif ( params ) sUrl += \'&\' + params ;\n
\n
\tvar oXML = new FCKXml() ;\n
\t\n
\tif ( callBackFunction )\n
\t\toXML.LoadUrl( sUrl, callBackFunction ) ;\t// Asynchronous load.\n
\telse\n
\t\treturn oXML.LoadUrl( sUrl ) ;\n
}\n
\n
var oIcons = new Object() ;\n
\n
oIcons.AvailableIconsArray = [ \n
\t\'ai\',\'avi\',\'bmp\',\'cs\',\'dll\',\'doc\',\'exe\',\'fla\',\'gif\',\'gz\',\'htm\',\'html\',\'jpg\',\'js\',\n
\t\'mdb\',\'mp3\',\'pdf\',\'png\',\'ppt\',\'rdp\',\'swf\',\'swt\',\'tar\',\'tgz\',\'txt\',\'vsd\',\'xls\',\'xml\',\'zip\' ] ;\n
\t\n
oIcons.AvailableIcons = new Object() ;\n
\n
for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )\n
\toIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;\n
\n
oIcons.GetIcon = function( fileName )\n
{\n
\tvar sExtension = fileName.substr( fileName.lastIndexOf(\'.\') + 1 ).toLowerCase() ;\n
\n
\tif ( this.AvailableIcons[ sExtension ] == true )\n
\t\treturn sExtension ;\n
\telse\n
\t\treturn \'default.icon\' ;\n
}\n
\n
\n
\n
\t\t</script>\n
\t</head>\n
\n
\t<frameset cols="0,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="no">\n
\t\t<frameset rows="0,*" framespacing="0">\n
\t\t\t<frame src="editor/filemanager/browser/zope/frmresourcetype.html" scrolling="no" frameborder="no" />\n
\t\t\t<frame name="frmFolders" src="editor/filemanager/browser/zope/frmfolders.html?ServerPath=<dtml-var "REQUEST.form[\'ServerPath\']">&CurrentPath=<dtml-var "REQUEST.form[\'CurrentPath\']">" scrolling="auto" frameborder="yes" />\n
\n
\t\t</frameset>\n
\t\t<frameset rows="0,*,50" framespacing="0">\n
\t\t\t<frame name="frmActualFolder" src="editor/filemanager/browser/zope/frmactualfolder.html" scrolling="no" frameborder="no" />\n
\t\t\t<frame name="frmResourcesList" src="editor/filemanager/browser/zope/frmresourceslist.html" scrolling="auto" frameborder="yes" />\n
\t\t\t<frameset cols="0,*,0" framespacing="0" frameborder="no">\n
\t\t\t\t<frame name="frmCreateFolder" src="editor/filemanager/browser/zope/frmcreatefolder.html" scrolling="no" frameborder="no" />\n
\t\t\t\t<frame name="frmUpload" src="editor/filemanager/browser/zope/frmupload.html" scrolling="no" frameborder="no" />\n
\t\t\t\t<frame name="frmUploadWorker" src="" scrolling="no" frameborder="no" />\n
\t\t\t</frameset>\n
\t\t</frameset>\n
\t</frameset>\n
\n
\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>connectors</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -80,7 +80,7 @@ oFCKeditor.Width = \'100%\';\n
oFCKeditor.Height = ${editor_height};\n
\n
// browsing for links\n
oFCKeditor.Config[\'LinkBrowserURL\'] = \'${portal_path}editor/filemanager/browser/zope/browser.html?Connector=connectors/connectorERP5&ServerPath=/&CurrentPath=\' + pathUser ;\n
oFCKeditor.Config[\'LinkBrowserURL\'] = \'${portal_path}fck_browser/browser.html?Connector=connectors/connectorERP5&ServerPath=/&CurrentPath=\' + pathUser ;\n
\n
// rapid upload activation for links\n
//oFCKeditor.Config[\'LinkUpload\'] = true ;\n
......@@ -88,14 +88,14 @@ oFCKeditor.Config[\'LinkBrowserURL\'] = \'${portal_path}editor/filemanager/brows
//oFCKeditor.Config[\'LinkUploadURL\'] = \'${portal_url}/\' + pathUser ;\n
\n
// browsing for images\n
oFCKeditor.Config[\'ImageBrowserURL\'] = \'${portal_path}editor/filemanager/browser/zope/browser.html?Type=Image&Connector=connectors/connectorERP5&ServerPath=/&CurrentPath=\' + pathUser ;\n
oFCKeditor.Config[\'ImageBrowserURL\'] = \'${portal_path}fck_browser/browser.html?Type=Image&Connector=connectors/connectorERP5&ServerPath=/&CurrentPath=\' + pathUser ;\n
\n
// rapid upload activation for images\n
//oFCKeditor.Config[\'ImageUpload\'] = true ;\n
//oFCKeditor.Config[\'ImageUploadURL\'] = \'${portal_path}editor/filemanager/upload/zope/uploadPlone?CurrentPath=\' + pathUser ;\n
\n
// browsing for flash\n
//oFCKeditor.Config[\'FlashBrowserURL\'] = \'${portal_path}editor/filemanager/browser/zope/browser.html?Type=Flash&Connector=connectors/connectorPlone&ServerPath=/&CurrentPath=\' + pathUser ;\n
//oFCKeditor.Config[\'FlashBrowserURL\'] = \'${portal_path}fck_browser/browser.html?Type=Flash&Connector=connectors/connectorPlone&ServerPath=/&CurrentPath=\' + pathUser ;\n
\n
// rapid upload activation for flash\n
//oFCKeditor.Config[\'FlashUpload\'] = true ;\n
......
2009-06-18 Kazuhiko
* add a simple file browser for fckeditor, that allows to upload only in the current document.
2009-04-30 Tatuya
* append a condition to ListBox_asStandardHTML to set a CSS class name in a table row using 'Row CSS Method'.
......
767
\ No newline at end of file
768
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment