Update of /cvsroot/phpslash/phpslash-dev/public_html/scripts/fckeditor/editor/filemanager/browser/default/js
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16237/phpslash-dev/public_html/scripts/fckeditor/editor/filemanager/browser/default/js
Added Files:
common.js fckxml.js
Log Message:
added fckeditor to comment submittal.
--- NEW FILE: common.js ---
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: common.js
* Common objects and functions shared by all pages that compose the
* File Browser dialog window.
*
* Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:53
*
* File Authors:
* Frederico Caldeira Knabben (fr...@fc...)
*/
var oConnector = new Object() ;
oConnector.ResourceType = '' ;
oConnector.CurrentFolder = '/' ;
// Get the connector path from the URL.
oConnector.Regex = new RegExp( '[\?&]Connector=([^&]+)', 'i' ) ;
oConnector.ConnectorUrl = oConnector.Regex.exec( window.top.location.search )[1] ;
oConnector.SendCommand = function( command, params, callBackFunction )
{
var sUrl = this.ConnectorUrl + '?Command=' + command ;
sUrl += '&Type=' + this.ResourceType ;
sUrl += '&CurrentFolder=' + escape( this.CurrentFolder ) ;
if ( params ) sUrl += '&' + params ;
var oXML = new FCKXml() ;
if ( callBackFunction )
oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load.
else
return oXML.LoadUrl( sUrl ) ;
}
var oIcons = new Object() ;
oIcons.AvailableIconsArray = [
'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
'mdb','mp3','pdf','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
oIcons.AvailableIcons = new Object() ;
for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;
oIcons.GetIcon = function( fileName )
{
var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ;
if ( this.AvailableIcons[ sExtension ] == true )
return sExtension ;
else
return 'default.icon' ;
}
--- NEW FILE: fckxml.js ---
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fckxml.js
* Defines the FCKXml object that is used for XML data calls
* and XML processing.
* This script is shared by almost all pages that compose the
* File Browser frameset.
*
* Version: 2.0 Beta 1
* Modified: 2004-05-31 23:07:53
*
* File Authors:
* Frederico Caldeira Knabben (fr...@fc...)
*/
var FCKXml = function()
{}
FCKXml.prototype.GetHttpRequest = function()
{
if ( window.XMLHttpRequest ) // Gecko
return new XMLHttpRequest() ;
else if ( window.ActiveXObject ) // IE
return new ActiveXObject("MsXml2.XmlHttp") ;
}
FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer )
{
var oFCKXml = this ;
var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ;
var oXmlHttp = this.GetHttpRequest() ;
oXmlHttp.open( "GET", urlToCall, bAsync ) ;
if ( bAsync )
{
oXmlHttp.onreadystatechange = function()
{
if ( oXmlHttp.readyState == 4 )
{
oFCKXml.DOMDocument = oXmlHttp.responseXML ;
asyncFunctionPointer( oFCKXml ) ;
}
}
}
oXmlHttp.send( null ) ;
if ( ! bAsync )
this.DOMDocument = oXmlHttp.responseXML ;
}
FCKXml.prototype.SelectNodes = function( xpath )
{
if ( document.all ) // IE
return this.DOMDocument.selectNodes( xpath ) ;
else // Gecko
{
var aNodeArray = new Array();
var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument,
this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ;
if ( xPathResult )
{
var oNode = xPathResult.iterateNext() ;
while( oNode )
{
aNodeArray[aNodeArray.length] = oNode ;
oNode = xPathResult.iterateNext();
}
}
return aNodeArray ;
}
}
FCKXml.prototype.SelectSingleNode = function( xpath )
{
if ( document.all ) // IE
return this.DOMDocument.selectSingleNode( xpath ) ;
else // Gecko
{
var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument,
this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null);
if ( xPathResult && xPathResult.singleNodeValue )
return xPathResult.singleNodeValue ;
else
return null ;
}
}
|