codes****@googl*****
codes****@googl*****
2009年 4月 6日 (月) 12:04:41 JST
Author: tacahi Date: Sun Apr 5 20:03:29 2009 New Revision: 1455 Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/browser.css externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/browser.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmactualfolder.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmfolders.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmresourceslist.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmresourcetype.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmupload.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/images/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/js/ Log: Geeklog 1.5.2sr1を externals/geeklog-1.5.2sr2 に取り込みます。 Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/browser.css ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/browser.css Sun Apr 5 20:03:29 2009 @@ -0,0 +1,87 @@ +/* + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * CSS styles used by all pages that compose the File Browser. + */ + +body +{ + background-color: #f1f1e3; + margin-top:0; + margin-bottom:0; +} + +form +{ + margin: 0; + padding: 0; +} + +.Frame +{ + background-color: #f1f1e3; + border: thin inset #f1f1e3; +} + +body.FileArea +{ + background-color: #ffffff; + margin: 10px; +} + +body, td, input, select +{ + font-size: 11px; + font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; +} + +.ActualFolder +{ + font-weight: bold; + font-size: 14px; +} + +.PopupButtons +{ + border-top: #d5d59d 1px solid; + background-color: #e3e3c7; + padding: 7px 10px 7px 10px; +} + +.Button, button +{ + color: #3b3b1f; + border: #737357 1px solid; + background-color: #c7c78f; +} + +.FolderListCurrentFolder img +{ + background-image: url(images/FolderOpened.gif); +} + +.FolderListFolder img +{ + background-image: url(images/Folder.gif); +} + +.fullHeight { + height: 100%; +} Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/browser.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/browser.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,200 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" + "http://www.w3.org/TR/html4/frameset.dtd"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This page compose the File Browser dialog frameset. +--> +<html> + <head> + <title>FCKeditor - Resources Browser</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link href="browser.css" type="text/css" rel="stylesheet"> + <script type="text/javascript" src="js/fckxml.js"></script> + <script type="text/javascript"> +// Automatically detect the correct document.domain (#1919). +(function() +{ + var d = document.domain ; + + while ( true ) + { + // Test if we can access a parent property. + try + { + var test = window.opener.document.domain ; + break ; + } + catch( e ) + {} + + // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... + d = d.replace( /.*?(?:\.|$)/, '' ) ; + + if ( d.length == 0 ) + break ; // It was not able to detect the domain. + + try + { + document.domain = d ; + } + catch (e) + { + break ; + } + } +})() ; + +function GetUrlParam( paramName ) +{ + var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ; + var oMatch = oRegex.exec( window.top.location.search ) ; + + if ( oMatch && oMatch.length > 1 ) + return decodeURIComponent( oMatch[1] ) ; + else + return '' ; +} + +var oConnector = new Object() ; +oConnector.CurrentFolder = '/' ; + +var sConnUrl = GetUrlParam( 'Connector' ) ; + +// Gecko has some problems when using relative URLs (not starting with slash). +if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 ) + sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ; + +oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ; + +var sServerPath = GetUrlParam( 'ServerPath' ) ; +if ( sServerPath.length > 0 ) + oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ; + +oConnector.ResourceType = GetUrlParam( 'Type' ) ; +oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ; + +if ( oConnector.ShowAllTypes ) + oConnector.ResourceType = 'File' ; + +oConnector.SendCommand = function( command, params, callBackFunction ) +{ + var sUrl = this.ConnectorUrl + 'Command=' + command ; + sUrl += '&Type=' + this.ResourceType ; + sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ; + + if ( params ) sUrl += '&' + params ; + + // Add a random salt to avoid getting a cached version of the command execution + sUrl += '&uuid=' + new Date().getTime() ; + + var oXML = new FCKXml() ; + + if ( callBackFunction ) + oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load. + else + return oXML.LoadUrl( sUrl ) ; + + return null ; +} + +oConnector.CheckError = function( responseXml ) +{ + var iErrorNumber = 0 ; + var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ; + + if ( oErrorNode ) + { + iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ; + + switch ( iErrorNumber ) + { + case 0 : + break ; + case 1 : // Custom error. Message placed in the "text" attribute. + alert( oErrorNode.attributes.getNamedItem('text').value ) ; + break ; + case 101 : + alert( 'Folder already exists' ) ; + break ; + case 102 : + alert( 'Invalid folder name' ) ; + break ; + case 103 : + alert( 'You have no permissions to create the folder' ) ; + break ; + case 110 : + alert( 'Unknown error creating folder' ) ; + break ; + default : + alert( 'Error on your request. Error number: ' + iErrorNumber ) ; + break ; + } + } + return iErrorNumber ; +} + +var oIcons = new Object() ; + +oIcons.AvailableIconsArray = [ + 'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js', + 'mdb','mp3','pdf','png','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' ; +} + +function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) +{ + if (errorNumber == "1") + window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ) ; + else + window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ; +} + + </script> + </head> + <frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1"> + <frameset rows="50,*" framespacing="0"> + <frame src="frmresourcetype.html" scrolling="no" frameborder="0"> + <frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1"> + </frameset> + <frameset rows="50,*,50" framespacing="0"> + <frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0"> + <frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1"> + <frameset cols="150,*,0" framespacing="0" frameborder="0"> + <frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0"> + <frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0"> + <frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0"> + </frameset> + </frameset> + </frameset> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmactualfolder.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmactualfolder.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,95 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This page shows the actual folder path. +--> +<html> + <head> + <title>Folder path</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link href="browser.css" type="text/css" rel="stylesheet"> + <script type="text/javascript"> +// Automatically detect the correct document.domain (#1919). +(function() +{ + var d = document.domain ; + + while ( true ) + { + // Test if we can access a parent property. + try + { + var test = window.top.opener.document.domain ; + break ; + } + catch( e ) + {} + + // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... + d = d.replace( /.*?(?:\.|$)/, '' ) ; + + if ( d.length == 0 ) + break ; // It was not able to detect the domain. + + try + { + document.domain = d ; + } + catch (e) + { + break ; + } + } +})() ; + +function SetCurrentFolder( resourceType, folderPath ) +{ + document.getElementById('tdName').innerHTML = folderPath ; +} + +window.onload = function() +{ + window.top.IsLoadedActualFolder = true ; +} + + </script> + </head> + <body> + <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td> + <button style="WIDTH: 100%" type="button"> + <table cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td><img height="32" alt="" src="images/FolderOpened32.gif" width="32"></td> + <td> </td> + <td id="tdName" width="100%" nowrap class="ActualFolder">/</td> + <td> </td> + <td><img height="8" src="images/ButtonArrow.gif" width="12" alt=""></td> + <td> </td> + </tr> + </table> + </button> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,114 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Page used to create new folders in the current folder. +--> +<html> + <head> + <title>Create Folder</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link href="browser.css" type="text/css" rel="stylesheet"> + <script type="text/javascript" src="js/common.js"></script> + <script type="text/javascript"> + +function SetCurrentFolder( resourceType, folderPath ) +{ + oConnector.ResourceType = resourceType ; + oConnector.CurrentFolder = folderPath ; +} + +function CreateFolder() +{ + var sFolderName ; + + while ( true ) + { + sFolderName = prompt( 'Type the name of the new folder:', '' ) ; + + if ( sFolderName == null ) + return ; + else if ( sFolderName.length == 0 ) + alert( 'Please type the folder name' ) ; + else + break ; + } + + oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ) ; +} + +function CreateFolderCallBack( fckXml ) +{ + if ( oConnector.CheckError( fckXml ) == 0 ) + window.parent.frames['frmResourcesList'].Refresh() ; + + /* + // Get the current folder path. + var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ; + var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ; + + switch ( iErrorNumber ) + { + case 0 : + window.parent.frames['frmResourcesList'].Refresh() ; + break ; + case 101 : + alert( 'Folder already exists' ) ; + break ; + case 102 : + alert( 'Invalid folder name' ) ; + break ; + case 103 : + alert( 'You have no permissions to create the folder' ) ; + break ; + case 110 : + alert( 'Unknown error creating folder' ) ; + break ; + default : + alert( 'Error creating folder. Error number: ' + iErrorNumber ) ; + break ; + } + */ +} + +window.onload = function() +{ + window.top.IsLoadedCreateFolder = true ; +} + </script> + </head> + <body> + <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td> + <button type="button" style="WIDTH: 100%" onclick="CreateFolder();"> + <table cellSpacing="0" cellPadding="0" border="0"> + <tr> + <td><img height="16" alt="" src="images/Folder.gif" width="16"></td> + <td> </td> + <td nowrap>Create New Folder</td> + </tr> + </table> + </button> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmfolders.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmfolders.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,198 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This page shows the list of folders available in the parent folder + * of the current folder. +--> +<html> + <head> + <title>Folders</title> + <link href="browser.css" type="text/css" rel="stylesheet"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <script type="text/javascript" src="js/common.js"></script> + <script type="text/javascript"> + +var sActiveFolder ; + +var bIsLoaded = false ; +var iIntervalId ; + +var oListManager = new Object() ; + +oListManager.Init = function() +{ + this.Table = document.getElementById('tableFiles') ; + this.UpRow = document.getElementById('trUp') ; + + this.TableRows = new Object() ; +} + +oListManager.Clear = function() +{ + // Remove all other rows available. + while ( this.Table.rows.length > 1 ) + this.Table.deleteRow(1) ; + + // Reset the TableRows collection. + this.TableRows = new Object() ; +} + +oListManager.AddItem = function( folderName, folderPath ) +{ + // Create the new row. + var oRow = this.Table.insertRow(-1) ; + oRow.className = 'FolderListFolder' ; + + // Build the link to view the folder. + var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ; + + // Add the folder icon cell. + var oCell = oRow.insertCell(-1) ; + oCell.width = 16 ; + oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"><\/a>' ; + + // Add the folder name cell. + oCell = oRow.insertCell(-1) ; + oCell.noWrap = true ; + oCell.innerHTML = ' ' + sLink + folderName + '<\/a>' ; + + this.TableRows[ folderPath ] = oRow ; +} + +oListManager.ShowUpFolder = function( upFolderPath ) +{ + this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ; + + if ( upFolderPath != null ) + { + document.getElementById('linkUpIcon').onclick = document.getElementById('linkUp').onclick = function() + { + LoadFolders( upFolderPath ) ; + return false ; + } + } +} + +function CheckLoaded() +{ + if ( window.top.IsLoadedActualFolder + && window.top.IsLoadedCreateFolder + && window.top.IsLoadedUpload + && window.top.IsLoadedResourcesList ) + { + window.clearInterval( iIntervalId ) ; + bIsLoaded = true ; + OpenFolder( sActiveFolder ) ; + } +} + +function OpenFolder( folderPath ) +{ + sActiveFolder = folderPath ; + + if ( ! bIsLoaded ) + { + if ( ! iIntervalId ) + iIntervalId = window.setInterval( CheckLoaded, 100 ) ; + return ; + } + + // Change the style for the select row (to show the opened folder). + for ( var sFolderPath in oListManager.TableRows ) + { + oListManager.TableRows[ sFolderPath ].className = + ( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ; + } + + // Set the current folder in all frames. + window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; + window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; + window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; + + // Load the resources list for this folder. + window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ; +} + +function LoadFolders( folderPath ) +{ + // Clear the folders list. + oListManager.Clear() ; + + // Get the parent folder path. + var sParentFolderPath ; + if ( folderPath != '/' ) + sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ; + + // Show/Hide the Up Folder. + oListManager.ShowUpFolder( sParentFolderPath ) ; + + if ( folderPath != '/' ) + { + sActiveFolder = folderPath ; + oConnector.CurrentFolder = sParentFolderPath ; + oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ; + } + else + OpenFolder( '/' ) ; +} + +function GetFoldersCallBack( fckXml ) +{ + if ( oConnector.CheckError( fckXml ) != 0 ) + return ; + + // Get the current folder path. + var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; + var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ; + + var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; + + for ( var i = 0 ; i < oNodes.length ; i++ ) + { + var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; + oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + '/' ) ; + } + + OpenFolder( sActiveFolder ) ; +} + +function SetResourceType( type ) +{ + oConnector.ResourceType = type ; + LoadFolders( '/' ) ; +} + +window.onload = function() +{ + oListManager.Init() ; + LoadFolders( '/' ) ; +} + </script> + </head> + <body class="FileArea"> + <table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr id="trUp" style="DISPLAY: none"> + <td width="16"><a id="linkUpIcon" href="#"><img alt="" src="images/FolderUp.gif" width="16" height="16" border="0"></a></td> + <td nowrap width="100%"> <a id="linkUp" href="#">..</a></td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmresourceslist.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmresourceslist.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,169 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This page shows all resources available in a folder in the File Browser. +--> +<html> +<head> + <title>Resources</title> + <link href="browser.css" type="text/css" rel="stylesheet"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <script type="text/javascript" src="js/common.js"></script> + <script type="text/javascript"> + +var oListManager = new Object() ; + +oListManager.Clear = function() +{ + document.body.innerHTML = '' ; +} + +function ProtectPath(path) +{ + path = path.replace( /\\/g, '\\\\') ; + path = path.replace( /'/g, '\\\'') ; + return path ; +} + +oListManager.GetFolderRowHtml = function( folderName, folderPath ) +{ + // Build the link to view the folder. + var sLink = '<a href="#" onclick="OpenFolder(\'' + ProtectPath( folderPath ) + '\');return false;">' ; + + return '<tr>' + + '<td width="16">' + + sLink + + '<img alt="" src="images/Folder.gif" width="16" height="16" border="0"><\/a>' + + '<\/td><td nowrap colspan="2"> ' + + sLink + + folderName + + '<\/a>' + + '<\/td><\/tr>' ; +} + +oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize ) +{ + // Build the link to view the folder. + var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ; + + // Get the file icon. + var sIcon = oIcons.GetIcon( fileName ) ; + + return '<tr>' + + '<td width="16">' + + sLink + + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"><\/a>' + + '<\/td><td> ' + + sLink + + fileName + + '<\/a>' + + '<\/td><td align="right" nowrap> ' + + fileSize + + ' KB' + + '<\/td><\/tr>' ; +} + +function OpenFolder( folderPath ) +{ + // Load the resources list for this folder. + window.parent.frames['frmFolders'].LoadFolders( folderPath ) ; +} + +function OpenFile( fileUrl ) +{ + window.top.opener.SetUrl( encodeURI( fileUrl ).replace( '#', '%23' ) ) ; + window.top.close() ; + window.top.opener.focus() ; +} + +function LoadResources( resourceType, folderPath ) +{ + oListManager.Clear() ; + oConnector.ResourceType = resourceType ; + oConnector.CurrentFolder = folderPath ; + oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ; +} + +function Refresh() +{ + LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ; +} + +function GetFoldersAndFilesCallBack( fckXml ) +{ + if ( oConnector.CheckError( fckXml ) != 0 ) + return ; + + // Get the current folder path. + var oFolderNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; + if ( oFolderNode == null ) + { + alert( 'The server didn\'t reply with a proper XML data. Please check your configuration.' ) ; + return ; + } + var sCurrentFolderPath = oFolderNode.attributes.getNamedItem('path').value ; + var sCurrentFolderUrl = oFolderNode.attributes.getNamedItem('url').value ; + +// var dTimer = new Date() ; + + var oHtml = new StringBuilder( '<table id="tableFiles" cellspacing="1" cellpadding="0" width="100%" border="0">' ) ; + + // Add the Folders. + var oNodes ; + oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; + for ( var i = 0 ; i < oNodes.length ; i++ ) + { + var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; + oHtml.Append( oListManager.GetFolderRowHtml( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ) ; + } + + // Add the Files. + oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ; + for ( var j = 0 ; j < oNodes.length ; j++ ) + { + var oNode = oNodes[j] ; + var sFileName = oNode.attributes.getNamedItem('name').value ; + var sFileSize = oNode.attributes.getNamedItem('size').value ; + + // Get the optional "url" attribute. If not available, build the url. + var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ; + var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : sCurrentFolderUrl + sFileName ; + + oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ; + } + + oHtml.Append( '<\/table>' ) ; + + document.body.innerHTML = oHtml.ToString() ; + +// window.top.document.title = 'Finished processing in ' + ( ( ( new Date() ) - dTimer ) / 1000 ) + ' seconds' ; + +} + +window.onload = function() +{ + window.top.IsLoadedResourcesList = true ; +} + </script> +</head> +<body class="FileArea"> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmresourcetype.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmresourcetype.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,69 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * This page shows the list of available resource types. +--> +<html> + <head> + <title>Available types</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link href="browser.css" type="text/css" rel="stylesheet"> + <script type="text/javascript" src="js/common.js"></script> + <script type="text/javascript"> + +function SetResourceType( type ) +{ + window.parent.frames["frmFolders"].SetResourceType( type ) ; +} + +var aTypes = [ + ['File','File'], + ['Image','Image'], + ['Flash','Flash'], + ['Media','Media'] +] ; + +window.onload = function() +{ + var oCombo = document.getElementById('cmbType') ; + oCombo.innerHTML = '' ; + for ( var i = 0 ; i < aTypes.length ; i++ ) + { + if ( oConnector.ShowAllTypes || aTypes[i][0] == oConnector.ResourceType ) + AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ; + } +} + + </script> + </head> + <body> + <table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td nowrap> + Resource Type<BR> + <select id="cmbType" style="WIDTH: 100%" onchange="SetResourceType(this.value);"> + <option> + </select> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmupload.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/filemanager/browser/default/frmupload.html Sun Apr 5 20:03:29 2009 @@ -0,0 +1,115 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!-- + * FCKeditor - The text editor for Internet - http://www.fckeditor.net + * Copyright (C) 2003-2008 Frederico Caldeira Knabben + * + * == BEGIN LICENSE == + * + * Licensed under the terms of any of the following licenses at your + * choice: + * + * - GNU General Public License Version 2 or later (the "GPL") + * http://www.gnu.org/licenses/gpl.html + * + * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + * http://www.gnu.org/licenses/lgpl.html + * + * - Mozilla Public License Version 1.1 or later (the "MPL") + * http://www.mozilla.org/MPL/MPL-1.1.html + * + * == END LICENSE == + * + * Page used to upload new files in the current folder. +--> +<html> + <head> + <title>File Upload</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link href="browser.css" type="text/css" rel="stylesheet" > + <script type="text/javascript" src="js/common.js"></script> + <script type="text/javascript"> + +function SetCurrentFolder( resourceType, folderPath ) +{ + var sUrl = oConnector.ConnectorUrl + 'Command=FileUpload' ; + sUrl += '&Type=' + resourceType ; + sUrl += '&CurrentFolder=' + encodeURIComponent( folderPath ) ; + + document.getElementById('frmUpload').action = sUrl ; +} + +function OnSubmit() +{ + if ( document.getElementById('NewFile').value.length == 0 ) + { + alert( 'Please select a file from your computer' ) ; + return false ; + } + + // Set the interface elements. + document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder (Upload in progress, please wait...)' ; + document.getElementById('btnUpload').disabled = true ; + + return true ; +} + +function OnUploadCompleted( errorNumber, data ) +{ + // Reset the Upload Worker Frame. + window.parent.frames['frmUploadWorker'].location = 'javascript:void(0)' ; + + // Reset the upload form (On IE we must do a little trick to avoid problems). + if ( document.all ) + document.getElementById('NewFile').outerHTML = '<input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file">' ; + else + document.getElementById('frmUpload').reset() ; + + // Reset the interface elements. + document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder' ; + document.getElementById('btnUpload').disabled = false ; + + switch ( errorNumber ) + { + case 0 : + window.parent.frames['frmResourcesList'].Refresh() ; + break ; + case 1 : // Custom error. + alert( data ) ; + break ; + case 201 : + window.parent.frames['frmResourcesList'].Refresh() ; + alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + data + '"' ) ; + break ; + case 202 : + alert( 'Invalid file' ) ; + break ; + default : + alert( 'Error on file upload. Error number: ' + errorNumber ) ; + break ; + } +} + +window.onload = function() +{ + window.top.IsLoadedUpload = true ; +} + </script> + </head> + <body> + <form id="frmUpload" action="" target="frmUploadWorker" method="post" enctype="multipart/form-data" onsubmit="return OnSubmit();"> + <table class="fullHeight" cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td nowrap="nowrap"> + <span id="eUploadMessage">Upload a new file in this folder</span><br> + <table cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td width="100%"><input id="NewFile" name="NewFile" style="WIDTH: 100%" type="file"></td> + <td nowrap="nowrap"> <input id="btnUpload" type="submit" value="Upload"></td> + </tr> + </table> + </td> + </tr> + </table> + </form> + </body> +</html>