codes****@googl*****
codes****@googl*****
2009年 4月 6日 (月) 11:55:39 JST
Author: tacahi Date: Sun Apr 5 19:31:23 2009 New Revision: 1451 Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/fck_dialog_common.css externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/fck_dialog_common.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/locked.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/reset.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/unlocked.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/logo_fredck.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/sponsors/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_anchor.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_button.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_checkbox.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_colorselector.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/fck_flash.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_form.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_hiddenfield.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/fck_image.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/fck_image_preview.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link/fck_link.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_listprop.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_paste.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_radiobutton.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_replace.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select/fck_select.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_smiley.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_source.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_specialchar.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_table.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_tablecell.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_template/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_template.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_template/images/ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_template/images/template1.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_template/images/template2.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_template/images/template3.gif (contents, props changed) externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_textarea.html externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_textfield.html Log: Geeklog 1.5.2sr1を externals/geeklog-1.5.2sr2 に取り込みます。 Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/fck_dialog_common.css ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/fck_dialog_common.css Sun Apr 5 19:31:23 2009 @@ -0,0 +1,85 @@ +/* + * 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 is the CSS file used for interface details in some dialog + * windows. + */ + +/* ######### + * WARNING + * ######### + * When changing this file, the minified version of it must be updated in the + * fck_dialog_common.js file (see GetCommonDialogCss). + */ + +.ImagePreviewArea +{ + border: #000000 1px solid; + overflow: auto; + width: 100%; + height: 170px; + background-color: #ffffff; +} + +.FlashPreviewArea +{ + border: #000000 1px solid; + padding: 5px; + overflow: auto; + width: 100%; + height: 170px; + background-color: #ffffff; +} + +.BtnReset +{ + float: left; + background-position: center center; + background-image: url(images/reset.gif); + width: 16px; + height: 16px; + background-repeat: no-repeat; + border: 1px none; + font-size: 1px ; +} + +.BtnLocked, .BtnUnlocked +{ + float: left; + background-position: center center; + background-image: url(images/locked.gif); + width: 16px; + height: 16px; + background-repeat: no-repeat; + border: none 1px; + font-size: 1px ; +} + +.BtnUnlocked +{ + background-image: url(images/unlocked.gif); +} + +.BtnOver +{ + border: outset 1px; + cursor: pointer; + cursor: hand; +} Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/fck_dialog_common.js ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/fck_dialog_common.js Sun Apr 5 19:31:23 2009 @@ -0,0 +1,311 @@ +/* + * 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 == + * + * Useful functions used by almost all dialog window pages. + * Dialogs should link to this file as the very first script on the page. + */ + +// Automatically detect the correct document.domain (#123). +(function() +{ + var d = document.domain ; + + while ( true ) + { + // Test if we can access a parent property. + try + { + var test = window.parent.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 ; + } + } +})() ; + +// Attention: FCKConfig must be available in the page. +function GetCommonDialogCss( prefix ) +{ + // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). + return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ; +} + +// Gets a element by its Id. Used for shorter coding. +function GetE( elementId ) +{ + return document.getElementById( elementId ) ; +} + +function ShowE( element, isVisible ) +{ + if ( typeof( element ) == 'string' ) + element = GetE( element ) ; + element.style.display = isVisible ? '' : 'none' ; +} + +function SetAttribute( element, attName, attValue ) +{ + if ( attValue == null || attValue.length == 0 ) + element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive + else + element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive +} + +function GetAttribute( element, attName, valueIfNull ) +{ + var oAtt = element.attributes[attName] ; + + if ( oAtt == null || !oAtt.specified ) + return valueIfNull ? valueIfNull : '' ; + + var oValue = element.getAttribute( attName, 2 ) ; + + if ( oValue == null ) + oValue = oAtt.nodeValue ; + + return ( oValue == null ? valueIfNull : oValue ) ; +} + +function SelectField( elementId ) +{ + var element = GetE( elementId ) ; + element.focus() ; + + // element.select may not be available for some fields (like <select>). + if ( element.select ) + element.select() ; +} + +// Functions used by text fields to accept numbers only. +var IsDigit = ( function() + { + var KeyIdentifierMap = + { + End : 35, + Home : 36, + Left : 37, + Right : 39, + 'U+00007F' : 46 // Delete + } ; + + return function ( e ) + { + if ( !e ) + e = event ; + + var iCode = ( e.keyCode || e.charCode ) ; + + if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) ) + iCode = KeyIdentifierMap[ e.keyIdentifier ] ; + + return ( + ( iCode >= 48 && iCode <= 57 ) // Numbers + || (iCode >= 35 && iCode <= 40) // Arrows, Home, End + || iCode == 8 // Backspace + || iCode == 46 // Delete + || iCode == 9 // Tab + ) ; + } + } )() ; + +String.prototype.Trim = function() +{ + return this.replace( /(^\s*)|(\s*$)/g, '' ) ; +} + +String.prototype.StartsWith = function( value ) +{ + return ( this.substr( 0, value.length ) == value ) ; +} + +String.prototype.Remove = function( start, length ) +{ + var s = '' ; + + if ( start > 0 ) + s = this.substring( 0, start ) ; + + if ( start + length < this.length ) + s += this.substring( start + length , this.length ) ; + + return s ; +} + +String.prototype.ReplaceAll = function( searchArray, replaceArray ) +{ + var replaced = this ; + + for ( var i = 0 ; i < searchArray.length ; i++ ) + { + replaced = replaced.replace( searchArray[i], replaceArray[i] ) ; + } + + return replaced ; +} + +function OpenFileBrowser( url, width, height ) +{ + // oEditor must be defined. + + var iLeft = ( oEditor.FCKConfig.ScreenWidth - width ) / 2 ; + var iTop = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ; + + var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes,scrollbars=yes" ; + sOptions += ",width=" + width ; + sOptions += ",height=" + height ; + sOptions += ",left=" + iLeft ; + sOptions += ",top=" + iTop ; + + window.open( url, 'FCKBrowseWindow', sOptions ) ; +} + +/** + Utility function to create/update an element with a name attribute in IE, so it behaves properly when moved around + It also allows to change the name or other special attributes in an existing node + oEditor : instance of FCKeditor where the element will be created + oOriginal : current element being edited or null if it has to be created + nodeName : string with the name of the element to create + oAttributes : Hash object with the attributes that must be set at creation time in IE + Those attributes will be set also after the element has been + created for any other browser to avoid redudant code +*/ +function CreateNamedElement( oEditor, oOriginal, nodeName, oAttributes ) +{ + var oNewNode ; + + // IE doesn't allow easily to change properties of an existing object, + // so remove the old and force the creation of a new one. + var oldNode = null ; + if ( oOriginal && oEditor.FCKBrowserInfo.IsIE ) + { + // Force the creation only if some of the special attributes have changed: + var bChanged = false; + for( var attName in oAttributes ) + bChanged |= ( oOriginal.getAttribute( attName, 2) != oAttributes[attName] ) ; + + if ( bChanged ) + { + oldNode = oOriginal ; + oOriginal = null ; + } + } + + // If the node existed (and it's not IE), then we just have to update its attributes + if ( oOriginal ) + { + oNewNode = oOriginal ; + } + else + { + // #676, IE doesn't play nice with the name or type attribute + if ( oEditor.FCKBrowserInfo.IsIE ) + { + var sbHTML = [] ; + sbHTML.push( '<' + nodeName ) ; + for( var prop in oAttributes ) + { + sbHTML.push( ' ' + prop + '="' + oAttributes[prop] + '"' ) ; + } + sbHTML.push( '>' ) ; + if ( !oEditor.FCKListsLib.EmptyElements[nodeName.toLowerCase()] ) + sbHTML.push( '</' + nodeName + '>' ) ; + + oNewNode = oEditor.FCK.EditorDocument.createElement( sbHTML.join('') ) ; + // Check if we are just changing the properties of an existing node: copy its properties + if ( oldNode ) + { + CopyAttributes( oldNode, oNewNode, oAttributes ) ; + oEditor.FCKDomTools.MoveChildren( oldNode, oNewNode ) ; + oldNode.parentNode.removeChild( oldNode ) ; + oldNode = null ; + + if ( oEditor.FCK.Selection.SelectionData ) + { + // Trick to refresh the selection object and avoid error in + // fckdialog.html Selection.EnsureSelection + var oSel = oEditor.FCK.EditorDocument.selection ; + oEditor.FCK.Selection.SelectionData = oSel.createRange() ; // Now oSel.type will be 'None' reflecting the real situation + } + } + oNewNode = oEditor.FCK.InsertElement( oNewNode ) ; + + // FCK.Selection.SelectionData is broken by now since we've + // deleted the previously selected element. So we need to reassign it. + if ( oEditor.FCK.Selection.SelectionData ) + { + var range = oEditor.FCK.EditorDocument.body.createControlRange() ; + range.add( oNewNode ) ; + oEditor.FCK.Selection.SelectionData = range ; + } + } + else + { + oNewNode = oEditor.FCK.InsertElement( nodeName ) ; + } + } + + // Set the basic attributes + for( var attName in oAttributes ) + oNewNode.setAttribute( attName, oAttributes[attName], 0 ) ; // 0 : Case Insensitive + + return oNewNode ; +} + +// Copy all the attributes from one node to the other, kinda like a clone +// But oSkipAttributes is an object with the attributes that must NOT be copied +function CopyAttributes( oSource, oDest, oSkipAttributes ) +{ + var aAttributes = oSource.attributes ; + + for ( var n = 0 ; n < aAttributes.length ; n++ ) + { + var oAttribute = aAttributes[n] ; + + if ( oAttribute.specified ) + { + var sAttName = oAttribute.nodeName ; + // We can set the type only once, so do it with the proper value, not copying it. + if ( sAttName in oSkipAttributes ) + continue ; + + var sAttValue = oSource.getAttribute( sAttName, 2 ) ; + if ( sAttValue == null ) + sAttValue = oAttribute.nodeValue ; + + oDest.setAttribute( sAttName, sAttValue, 0 ) ; // 0 : Case Insensitive + } + } + // The style: + oDest.style.cssText = oSource.style.cssText ; +} Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/locked.gif ============================================================================== Binary file. No diff available. Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/reset.gif ============================================================================== Binary file. No diff available. Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/common/images/unlocked.gif ============================================================================== Binary file. No diff available. Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,161 @@ +<!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 == + * + * "About" dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="robots" content="noindex, nofollow" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var oEditor = window.parent.InnerDialogLoaded() ; +var FCKLang = oEditor.FCKLang ; + +window.parent.AddTab( 'About', FCKLang.DlgAboutAboutTab ) ; +window.parent.AddTab( 'License', FCKLang.DlgAboutLicenseTab ) ; +window.parent.AddTab( 'BrowserInfo', FCKLang.DlgAboutBrowserInfoTab ) ; + +// Function called when a dialog tag is selected. +function OnDialogTabChange( tabCode ) +{ + ShowE('divAbout', ( tabCode == 'About' ) ) ; + ShowE('divLicense', ( tabCode == 'License' ) ) ; + ShowE('divInfo' , ( tabCode == 'BrowserInfo' ) ) ; +} + +function SendEMail() +{ + var eMail = 'mailto:' ; + eMail += 'fredck' ; + eMail += '@' ; + eMail += 'fckeditor' ; + eMail += '.' ; + eMail += 'net' ; + + window.location = eMail ; +} + +window.onload = function() +{ + // Translate the dialog box texts. + oEditor.FCKLanguageManager.TranslatePage(document) ; + + window.parent.SetAutoSize( true ) ; +} + + </script> +</head> +<body style="overflow: hidden"> + <div id="divAbout"> + <table cellpadding="0" cellspacing="0" border="0" width="100%" style="height: 100%"> + <tr> + <td colspan="2"> + <img alt="" src="fck_about/logo_fckeditor.gif" width="236" height="41" align="left" /> + <table width="80" border="0" cellspacing="0" cellpadding="5" bgcolor="#ffffff" align="right"> + <tr> + <td align="center" nowrap="nowrap" style="border-right: #000000 1px solid; border-top: #000000 1px solid; + border-left: #000000 1px solid; border-bottom: #000000 1px solid"> + <span fcklang="DlgAboutVersion">version</span> + <br /> + <b>2.6.3</b><br /> + Build 19836</td> + </tr> + </table> + </td> + </tr> + <tr style="height: 100%"> + <td align="center" valign="middle"> + <span style="font-size: 14px" dir="ltr"> + <b><a href="http://www.fckeditor.net/?about" target="_blank" title="Visit the FCKeditor web site"> + Support <b>Open Source</b> Software</a></b> </span> + <div style="padding-top:15px"> + <img alt="" src="fck_about/logo_fredck.gif" width="87" height="36" /> + </div> + </td> + <td align="center" nowrap="nowrap" valign="middle"> + <div> + <div style="margin-bottom:5px" dir="ltr">Selected Sponsor</div> + <a href="http://www.spellchecker.net/fckeditor/" target="_blank"><img alt="Selected Sponsor" border="0" src="fck_about/sponsors/spellchecker_net.gif" width="75" height="75" /></a> + </div> + </td> + </tr> + <tr> + <td width="100%" nowrap="nowrap"> + <span fcklang="DlgAboutInfo">For further information go to</span> <a href="http://www.fckeditor.net/?About" + target="_blank">http://www.fckeditor.net/</a>. + <br /> + Copyright © 2003-2008 <a href="#" onclick="SendEMail();">Frederico Caldeira Knabben</a> + </td> + <td align="center"> + <a href="http://www.fckeditor.net/sponsors/apply" target="_blank">Become a Sponsor</a> + </td> + </tr> + </table> + </div> + <div id="divLicense" style="display: none"> + <p> + Licensed under the terms of any of the following licenses at your + choice: + </p> + <ul> + <li style="margin-bottom:15px"> + <b>GNU General Public License</b> Version 2 or later (the "GPL")<br /> + <a href="http://www.gnu.org/licenses/gpl.html" target="_blank">http://www.gnu.org/licenses/gpl.html</a> + </li> + <li style="margin-bottom:15px"> + <b>GNU Lesser General Public License</b> Version 2.1 or later (the "LGPL")<br /> + <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a> + </li> + <li> + <b>Mozilla Public License</b> Version 1.1 or later (the "MPL")<br /> + <a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a> + </li> + </ul> + </div> + <div id="divInfo" style="display: none" dir="ltr"> + <table align="center" width="80%" border="0"> + <tr> + <td> + <script type="text/javascript"> +<!-- +document.write( '<b>User Agent<\/b><br />' + window.navigator.userAgent + '<br /><br />' ) ; +document.write( '<b>Browser<\/b><br />' + window.navigator.appName + ' ' + window.navigator.appVersion + '<br /><br />' ) ; +document.write( '<b>Platform<\/b><br />' + window.navigator.platform + '<br /><br />' ) ; + +var sUserLang = '?' ; + +if ( window.navigator.language ) + sUserLang = window.navigator.language.toLowerCase() ; +else if ( window.navigator.userLanguage ) + sUserLang = window.navigator.userLanguage.toLowerCase() ; + +document.write( '<b>User Language<\/b><br />' + sUserLang ) ; +//--> + </script> + </td> + </tr> + </table> + </div> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif ============================================================================== Binary file. No diff available. Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/logo_fredck.gif ============================================================================== Binary file. No diff available. Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif ============================================================================== Binary file. No diff available. Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_anchor.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_anchor.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,220 @@ +<!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 == + * + * Anchor dialog window. +--> +<html> + <head> + <title>Anchor Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta content="noindex, nofollow" name="robots"> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +var FCK = oEditor.FCK ; +var FCKBrowserInfo = oEditor.FCKBrowserInfo ; +var FCKTools = oEditor.FCKTools ; +var FCKRegexLib = oEditor.FCKRegexLib ; + +var oDOM = FCK.EditorDocument ; + +var oFakeImage = dialog.Selection.GetSelectedElement() ; + +var oAnchor ; + +if ( oFakeImage ) +{ + if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') ) + oAnchor = FCK.GetRealElement( oFakeImage ) ; + else + oFakeImage = null ; +} + +//Search for a real anchor +if ( !oFakeImage ) +{ + oAnchor = FCK.Selection.MoveToAncestorNode( 'A' ) ; + if ( oAnchor ) + FCK.Selection.SelectNode( oAnchor ) ; +} + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( oAnchor ) + GetE('txtName').value = oAnchor.name ; + else + oAnchor = null ; + + window.parent.SetOkButton( true ) ; + window.parent.SetAutoSize( true ) ; + + SelectField( 'txtName' ) ; +} + +function Ok() +{ + var sNewName = GetE('txtName').value ; + + // Remove any illegal character in a name attribute: + // A name should start with a letter, but the validator passes anyway. + sNewName = sNewName.replace( /[^\w-_\.:]/g, '_' ) ; + + if ( sNewName.length == 0 ) + { + // Remove the anchor if the user leaves the name blank + if ( oAnchor ) + { + // Removes the current anchor from the document using the new command + FCK.Commands.GetCommand( 'AnchorDelete' ).Execute() ; + return true ; + } + + alert( oEditor.FCKLang.DlgAnchorErrorName ) ; + return false ; + } + + oEditor.FCKUndo.SaveUndoStep() ; + + if ( oAnchor ) // Modifying an existent anchor. + { + ReadjustLinksToAnchor( oAnchor.name, sNewName ); + + // Buggy explorer, bad bad browser. http://alt-tag.com/blog/archives/2006/02/ie-dom-bugs/ + // Instead of just replacing the .name for the existing anchor (in order to preserve the content), we must remove the .name + // and assign .name, although it won't appear until it's specially processed in fckxhtml.js + + // We remove the previous name + oAnchor.removeAttribute( 'name' ) ; + // Now we set it, but later we must process it specially + oAnchor.name = sNewName ; + + return true ; + } + + // Create a new anchor preserving the current selection + var aNewAnchors = oEditor.FCK.CreateLink( '#' ) ; + + if ( aNewAnchors.length == 0 ) + aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ; + else + { + // Remove the fake href + for ( var i = 0 ; i < aNewAnchors.length ; i++ ) + aNewAnchors[i].removeAttribute( 'href' ) ; + } + + // More than one anchors may have been created, so interact through all of them (see #220). + for ( var i = 0 ; i < aNewAnchors.length ; i++ ) + { + oAnchor = aNewAnchors[i] ; + + // Set the name + if ( FCKBrowserInfo.IsIE ) + { + // Setting anchor names directly in IE will trash the HTML code stored + // in FCKTempBin after undos. See #2263. + var replaceAnchor = oEditor.FCK.EditorDocument.createElement( '<a name="' + + FCKTools.HTMLEncode( sNewName ).replace( '"', '"' ) + '">' ) ; + oEditor.FCKDomTools.MoveChildren( oAnchor, replaceAnchor ) ; + oAnchor.parentNode.replaceChild( replaceAnchor, oAnchor ) ; + oAnchor = replaceAnchor ; + } + else + oAnchor.name = sNewName ; + + // IE does require special processing to show the Anchor's image + // Opera doesn't allow to select empty anchors + if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera ) + { + if ( oAnchor.innerHTML != '' ) + { + if ( FCKBrowserInfo.IsIE ) + oAnchor.className += ' FCK__AnchorC' ; + } + else + { + // Create a fake image for both IE and Opera + var oImg = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor.cloneNode(true) ) ; + oImg.setAttribute( '_fckanchor', 'true', 0 ) ; + + oAnchor.parentNode.insertBefore( oImg, oAnchor ) ; + oAnchor.parentNode.removeChild( oAnchor ) ; + } + + } + } + + return true ; +} + +// Checks all the links in the current page pointing to the current name and changes them to the new name +function ReadjustLinksToAnchor( sCurrent, sNew ) +{ + var oDoc = FCK.EditorDocument ; + + var aLinks = oDoc.getElementsByTagName( 'A' ) ; + + var sReference = '#' + sCurrent ; + // The url of the document, so we check absolute and partial references. + var sFullReference = oDoc.location.href.replace( /(#.*$)/, '') ; + sFullReference += sReference ; + + var oLink ; + var i = aLinks.length - 1 ; + while ( i >= 0 && ( oLink = aLinks[i--] ) ) + { + var sHRef = oLink.getAttribute( '_fcksavedurl' ) ; + if ( sHRef == null ) + sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; + + if ( sHRef == sReference || sHRef == sFullReference ) + { + oLink.href = '#' + sNew ; + SetAttribute( oLink, '_fcksavedurl', '#' + sNew ) ; + } + } +} + + </script> + </head> + <body style="overflow: hidden"> + <table height="100%" width="100%"> + <tr> + <td align="center"> + <table border="0" cellpadding="0" cellspacing="0" width="80%"> + <tr> + <td> + <span fckLang="DlgAnchorName">Anchor Name</span><BR> + <input id="txtName" style="WIDTH: 100%" type="text"> + </td> + </tr> + </table> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_button.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_button.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,104 @@ +<!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 == + * + * Button dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Button Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta content="noindex, nofollow" name="robots" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +// Gets the document DOM +var oDOM = oEditor.FCK.EditorDocument ; + +var oActiveEl = dialog.Selection.GetSelectedElement() ; + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( oActiveEl && oActiveEl.tagName.toUpperCase() == "INPUT" && ( oActiveEl.type == "button" || oActiveEl.type == "submit" || oActiveEl.type == "reset" ) ) + { + GetE('txtName').value = oActiveEl.name ; + GetE('txtValue').value = oActiveEl.value ; + GetE('txtType').value = oActiveEl.type ; + } + else + oActiveEl = null ; + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + SelectField( 'txtName' ) ; +} + +function Ok() +{ + oEditor.FCKUndo.SaveUndoStep() ; + + oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ; + + SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; + + return true ; +} + + </script> +</head> +<body style="overflow: hidden"> + <table width="100%" style="height: 100%"> + <tr> + <td align="center"> + <table border="0" cellpadding="0" cellspacing="0" width="80%"> + <tr> + <td colspan=""> + <span fcklang="DlgCheckboxName">Name</span><br /> + <input type="text" size="20" id="txtName" style="width: 100%" /> + </td> + </tr> + <tr> + <td> + <span fcklang="DlgButtonText">Text (Value)</span><br /> + <input type="text" id="txtValue" style="width: 100%" /> + </td> + </tr> + <tr> + <td> + <span fcklang="DlgButtonType">Type</span><br /> + <select id="txtType"> + <option fcklang="DlgButtonTypeBtn" value="button" selected="selected">Button</option> + <option fcklang="DlgButtonTypeSbm" value="submit">Submit</option> + <option fcklang="DlgButtonTypeRst" value="reset">Reset</option> + </select> + </td> + </tr> + </table> + </td> + </tr> + </table> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_checkbox.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_checkbox.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,104 @@ +<!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 == + * + * Checkbox dialog window. +--> +<html> + <head> + <title>Checkbox Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta content="noindex, nofollow" name="robots"> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +// Gets the document DOM +var oDOM = oEditor.FCK.EditorDocument ; + +var oActiveEl = dialog.Selection.GetSelectedElement() ; + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'checkbox' ) + { + GetE('txtName').value = oActiveEl.name ; + GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ; + GetE('txtSelected').checked = oActiveEl.checked ; + } + else + oActiveEl = null ; + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + SelectField( 'txtName' ) ; +} + +function Ok() +{ + oEditor.FCKUndo.SaveUndoStep() ; + + oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'checkbox' } ) ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + oActiveEl.value = GetE('txtValue').value ; + else + SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; + + var bIsChecked = GetE('txtSelected').checked ; + SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox + oActiveEl.checked = bIsChecked ; + + return true ; +} + + </script> + </head> + <body style="OVERFLOW: hidden" scroll="no"> + <table height="100%" width="100%"> + <tr> + <td align="center"> + <table border="0" cellpadding="0" cellspacing="0" width="80%"> + <tr> + <td> + <span fckLang="DlgCheckboxName">Name</span><br> + <input type="text" size="20" id="txtName" style="WIDTH: 100%"> + </td> + </tr> + <tr> + <td> + <span fckLang="DlgCheckboxValue">Value</span><br> + <input type="text" size="20" id="txtValue" style="WIDTH: 100%"> + </td> + </tr> + <tr> + <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td> + </tr> + </table> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_colorselector.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_colorselector.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,172 @@ +<!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 == + * + * Color Selection dialog window. +--> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="robots" content="noindex, nofollow" /> + <style TYPE="text/css"> + #ColorTable { cursor: pointer ; cursor: hand ; } + #hicolor { height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; } + #hicolortext { width: 75px ; text-align: right ; margin-bottom: 7px ; } + #selhicolor { height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; } + #selcolor { width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; } + #btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; } + .ColorCell { height: 15px ; width: 15px ; } + </style> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var oEditor = window.parent.InnerDialogLoaded() ; + +function OnLoad() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + CreateColorTable() ; + + window.parent.SetOkButton( true ) ; + window.parent.SetAutoSize( true ) ; +} + +function CreateColorTable() +{ + // Get the target table. + var oTable = document.getElementById('ColorTable') ; + + // Create the base colors array. + var aColors = ['00','33','66','99','cc','ff'] ; + + // This function combines two ranges of three values from the color array into a row. + function AppendColorRow( rangeA, rangeB ) + { + for ( var i = rangeA ; i < rangeA + 3 ; i++ ) + { + var oRow = oTable.insertRow(-1) ; + + for ( var j = rangeB ; j < rangeB + 3 ; j++ ) + { + for ( var n = 0 ; n < 6 ; n++ ) + { + AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ; + } + } + } + } + + // This function create a single color cell in the color table. + function AppendColorCell( targetRow, color ) + { + var oCell = targetRow.insertCell(-1) ; + oCell.className = 'ColorCell' ; + oCell.bgColor = color ; + + oCell.onmouseover = function() + { + document.getElementById('hicolor').style.backgroundColor = this.bgColor ; + document.getElementById('hicolortext').innerHTML = this.bgColor ; + } + + oCell.onclick = function() + { + document.getElementById('selhicolor').style.backgroundColor = this.bgColor ; + document.getElementById('selcolor').value = this.bgColor ; + } + } + + AppendColorRow( 0, 0 ) ; + AppendColorRow( 3, 0 ) ; + AppendColorRow( 0, 3 ) ; + AppendColorRow( 3, 3 ) ; + + // Create the last row. + var oRow = oTable.insertRow(-1) ; + + // Create the gray scale colors cells. + for ( var n = 0 ; n < 6 ; n++ ) + { + AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ; + } + + // Fill the row with black cells. + for ( var i = 0 ; i < 12 ; i++ ) + { + AppendColorCell( oRow, '#000000' ) ; + } +} + +function Clear() +{ + document.getElementById('selhicolor').style.backgroundColor = '' ; + document.getElementById('selcolor').value = '' ; +} + +function ClearActual() +{ + document.getElementById('hicolor').style.backgroundColor = '' ; + document.getElementById('hicolortext').innerHTML = ' ' ; +} + +function UpdateColor() +{ + try { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; } + catch (e) { Clear() ; } +} + +function Ok() +{ + if ( typeof(window.parent.Args().CustomValue) == 'function' ) + window.parent.Args().CustomValue( document.getElementById('selcolor').value ) ; + + return true ; +} + </script> + </head> + <body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden"> + <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> + <tr> + <td align="center" valign="middle"> + <table border="0" cellspacing="5" cellpadding="0" width="100%"> + <tr> + <td valign="top" align="center" nowrap width="100%"> + <table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();"> + </table> + </td> + <td valign="top" align="left" nowrap> + <span fckLang="DlgColorHighlight">Highlight</span> + <div id="hicolor"></div> + <div id="hicolortext"> </div> + <span fckLang="DlgColorSelected">Selected</span> + <div id="selhicolor"></div> + <input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();"> + <br> + <input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" /> + </td> + </tr> + </table> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,600 @@ +<!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 == + * + * Link dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta content="noindex, nofollow" name="robots" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var oEditor = window.parent.InnerDialogLoaded() ; +var FCK = oEditor.FCK ; +var FCKLang = oEditor.FCKLang ; +var FCKConfig = oEditor.FCKConfig ; + +//#### Dialog Tabs + +// Set the dialog tabs. +window.parent.AddTab( 'General' , FCKLang.DlgDocGeneralTab ) ; +window.parent.AddTab( 'Background' , FCKLang.DlgDocBackTab ) ; +window.parent.AddTab( 'Colors' , FCKLang.DlgDocColorsTab ) ; +window.parent.AddTab( 'Meta' , FCKLang.DlgDocMetaTab ) ; + +// Function called when a dialog tag is selected. +function OnDialogTabChange( tabCode ) +{ + ShowE( 'divGeneral' , ( tabCode == 'General' ) ) ; + ShowE( 'divBackground' , ( tabCode == 'Background' ) ) ; + ShowE( 'divColors' , ( tabCode == 'Colors' ) ) ; + ShowE( 'divMeta' , ( tabCode == 'Meta' ) ) ; + + ShowE( 'ePreview' , ( tabCode == 'Background' || tabCode == 'Colors' ) ) ; +} + +//#### Get Base elements from the document: BEGIN + +// The HTML element of the document. +var oHTML = FCK.EditorDocument.getElementsByTagName('html')[0] ; + +// The HEAD element of the document. +var oHead = oHTML.getElementsByTagName('head')[0] ; + +var oBody = FCK.EditorDocument.body ; + +// This object contains all META tags defined in the document. +var oMetaTags = new Object() ; + +// Get all META tags defined in the document. +AppendMetaCollection( oMetaTags, oHead.getElementsByTagName('meta') ) ; +AppendMetaCollection( oMetaTags, oHead.getElementsByTagName('fck:meta') ) ; + +function AppendMetaCollection( targetObject, metaCollection ) +{ + // Loop throw all METAs and put it in the HashTable. + for ( var i = 0 ; i < metaCollection.length ; i++ ) + { + // Try to get the "name" attribute. + var sName = GetAttribute( metaCollection[i], 'name', GetAttribute( metaCollection[i], '___fcktoreplace:name', '' ) ) ; + + // If no "name", try with the "http-equiv" attribute. + if ( sName.length == 0 ) + { + if ( oEditor.FCKBrowserInfo.IsIE ) + { + // Get the http-equiv value from the outerHTML. + var oHttpEquivMatch = metaCollection[i].outerHTML.match( oEditor.FCKRegexLib.MetaHttpEquiv ) ; + if ( oHttpEquivMatch ) + sName = oHttpEquivMatch[1] ; + } + else + sName = GetAttribute( metaCollection[i], 'http-equiv', '' ) ; + } + + if ( sName.length > 0 ) + targetObject[ sName.toLowerCase() ] = metaCollection[i] ; + } +} + +//#### END + +// Set a META tag in the document. +function SetMetadata( name, content, isHttp ) +{ + if ( content.length == 0 ) + { + RemoveMetadata( name ) ; + return ; + } + + var oMeta = oMetaTags[ name.toLowerCase() ] ; + + if ( !oMeta ) + { + oMeta = oHead.appendChild( FCK.EditorDocument.createElement('META') ) ; + + if ( isHttp ) + SetAttribute( oMeta, 'http-equiv', name ) ; + else + { + // On IE, it is not possible to set the "name" attribute of the META tag. + // So a temporary attribute is used and it is replaced when getting the + // editor's HTML/XHTML value. This is sad, I know :( + if ( oEditor.FCKBrowserInfo.IsIE ) + SetAttribute( oMeta, '___fcktoreplace:name', name ) ; + else + SetAttribute( oMeta, 'name', name ) ; + } + + oMetaTags[ name.toLowerCase() ] = oMeta ; + } + + SetAttribute( oMeta, 'content', content ) ; +// oMeta.content = content ; +} + +function RemoveMetadata( name ) +{ + var oMeta = oMetaTags[ name.toLowerCase() ] ; + + if ( oMeta && oMeta != null ) + { + oMeta.parentNode.removeChild( oMeta ) ; + oMetaTags[ name.toLowerCase() ] = null ; + } +} + +function GetMetadata( name ) +{ + var oMeta = oMetaTags[ name.toLowerCase() ] ; + + if ( oMeta && oMeta != null ) + return oMeta.getAttribute( 'content', 2 ) ; + else + return '' ; +} + +window.onload = function () +{ + // Show/Hide the "Browse Server" button. + GetE('tdBrowse').style.display = oEditor.FCKConfig.ImageBrowser ? "" : "none"; + + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage( document ) ; + + FillFields() ; + + UpdatePreview() ; + + // Show the "Ok" button. + window.parent.SetOkButton( true ) ; + + window.parent.SetAutoSize( true ) ; +} + +function FillFields() +{ + // ### General Info + GetE('txtPageTitle').value = FCK.EditorDocument.title ; + + GetE('selDirection').value = GetAttribute( oHTML, 'dir', '' ) ; + GetE('txtLang').value = GetAttribute( oHTML, 'xml:lang', GetAttribute( oHTML, 'lang', '' ) ) ; // "xml:lang" takes precedence to "lang". + + // Character Set Encoding. +// if ( oEditor.FCKBrowserInfo.IsIE ) +// var sCharSet = FCK.EditorDocument.charset ; +// else + var sCharSet = GetMetadata( 'Content-Type' ) ; + + if ( sCharSet != null && sCharSet.length > 0 ) + { +// if ( !oEditor.FCKBrowserInfo.IsIE ) + sCharSet = sCharSet.match( /[^=]*$/ ) ; + + GetE('selCharSet').value = sCharSet ; + + if ( GetE('selCharSet').selectedIndex == -1 ) + { + GetE('selCharSet').value = '...' ; + GetE('txtCustomCharSet').value = sCharSet ; + + CheckOther( GetE('selCharSet'), 'txtCustomCharSet' ) ; + } + } + + // Document Type. + if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 ) + { + GetE('selDocType').value = FCK.DocTypeDeclaration ; + + if ( GetE('selDocType').selectedIndex == -1 ) + { + GetE('selDocType').value = '...' ; + GetE('txtDocType').value = FCK.DocTypeDeclaration ; + + CheckOther( GetE('selDocType'), 'txtDocType' ) ; + } + } + + // Document Type. + GetE('chkIncXHTMLDecl').checked = ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 ) ; + + // ### Background + GetE('txtBackColor').value = GetAttribute( oBody, 'bgColor' , '' ) ; + GetE('txtBackImage').value = GetAttribute( oBody, 'background' , '' ) ; + GetE('chkBackNoScroll').checked = ( GetAttribute( oBody, 'bgProperties', '' ).toLowerCase() == 'fixed' ) ; + + // ### Colors + GetE('txtColorText').value = GetAttribute( oBody, 'text' , '' ) ; + GetE('txtColorLink').value = GetAttribute( oBody, 'link' , '' ) ; + GetE('txtColorVisited').value = GetAttribute( oBody, 'vLink' , '' ) ; + GetE('txtColorActive').value = GetAttribute( oBody, 'aLink' , '' ) ; + + // ### Margins + GetE('txtMarginTop').value = GetAttribute( oBody, 'topMargin' , '' ) ; + GetE('txtMarginLeft').value = GetAttribute( oBody, 'leftMargin' , '' ) ; + GetE('txtMarginRight').value = GetAttribute( oBody, 'rightMargin' , '' ) ; + GetE('txtMarginBottom').value = GetAttribute( oBody, 'bottomMargin' , '' ) ; + + // ### Meta Data + GetE('txtMetaKeywords').value = GetMetadata( 'keywords' ) ; + GetE('txtMetaDescription').value = GetMetadata( 'description' ) ; + GetE('txtMetaAuthor').value = GetMetadata( 'author' ) ; + GetE('txtMetaCopyright').value = GetMetadata( 'copyright' ) ; +} + +// Called when the "Ok" button is clicked. +function Ok() +{ + // ### General Info + FCK.EditorDocument.title = GetE('txtPageTitle').value ; + + var oHTML = FCK.EditorDocument.getElementsByTagName('html')[0] ; + + SetAttribute( oHTML, 'dir' , GetE('selDirection').value ) ; + SetAttribute( oHTML, 'lang' , GetE('txtLang').value ) ; + SetAttribute( oHTML, 'xml:lang' , GetE('txtLang').value ) ; + + // Character Set Enconding. + var sCharSet = GetE('selCharSet').value ; + if ( sCharSet == '...' ) + sCharSet = GetE('txtCustomCharSet').value ; + + if ( sCharSet.length > 0 ) + sCharSet = 'text/html; charset=' + sCharSet ; + +// if ( oEditor.FCKBrowserInfo.IsIE ) +// FCK.EditorDocument.charset = sCharSet ; +// else + SetMetadata( 'Content-Type', sCharSet, true ) ; + + // Document Type + var sDocType = GetE('selDocType').value ; + if ( sDocType == '...' ) + sDocType = GetE('txtDocType').value ; + + FCK.DocTypeDeclaration = sDocType ; + + // XHTML Declarations. + if ( GetE('chkIncXHTMLDecl').checked ) + { + if ( sCharSet.length == 0 ) + sCharSet = 'utf-8' ; + + FCK.XmlDeclaration = '<' + '?xml version="1.0" encoding="' + sCharSet + '"?>' ; + + SetAttribute( oHTML, 'xmlns', 'http://www.w3.org/1999/xhtml' ) ; + } + else + { + FCK.XmlDeclaration = null ; + oHTML.removeAttribute( 'xmlns', 0 ) ; + } + + // ### Background + SetAttribute( oBody, 'bgcolor' , GetE('txtBackColor').value ) ; + SetAttribute( oBody, 'background' , GetE('txtBackImage').value ) ; + SetAttribute( oBody, 'bgproperties' , GetE('chkBackNoScroll').checked ? 'fixed' : '' ) ; + + // ### Colors + SetAttribute( oBody, 'text' , GetE('txtColorText').value ) ; + SetAttribute( oBody, 'link' , GetE('txtColorLink').value ) ; + SetAttribute( oBody, 'vlink', GetE('txtColorVisited').value ) ; + SetAttribute( oBody, 'alink', GetE('txtColorActive').value ) ; + + // ### Margins + SetAttribute( oBody, 'topmargin' , GetE('txtMarginTop').value ) ; + SetAttribute( oBody, 'leftmargin' , GetE('txtMarginLeft').value ) ; + SetAttribute( oBody, 'rightmargin' , GetE('txtMarginRight').value ) ; + SetAttribute( oBody, 'bottommargin' , GetE('txtMarginBottom').value ) ; + + // ### Meta data + SetMetadata( 'keywords' , GetE('txtMetaKeywords').value ) ; + SetMetadata( 'description' , GetE('txtMetaDescription').value ) ; + SetMetadata( 'author' , GetE('txtMetaAuthor').value ) ; + SetMetadata( 'copyright' , GetE('txtMetaCopyright').value ) ; + + return true ; +} + +var bPreviewIsLoaded = false ; +var oPreviewWindow ; +var oPreviewBody ; + +// Called by the Preview page when loaded. +function OnPreviewLoad( previewWindow, previewBody ) +{ + oPreviewWindow = previewWindow ; + oPreviewBody = previewBody ; + + bPreviewIsLoaded = true ; + UpdatePreview() ; +} + +function UpdatePreview() +{ + if ( !bPreviewIsLoaded ) + return ; + + // ### Background + SetAttribute( oPreviewBody, 'bgcolor' , GetE('txtBackColor').value ) ; + SetAttribute( oPreviewBody, 'background' , GetE('txtBackImage').value ) ; + SetAttribute( oPreviewBody, 'bgproperties' , GetE('chkBackNoScroll').checked ? 'fixed' : '' ) ; + + // ### Colors + SetAttribute( oPreviewBody, 'text', GetE('txtColorText').value ) ; + + oPreviewWindow.SetLinkColor( GetE('txtColorLink').value ) ; + oPreviewWindow.SetVisitedColor( GetE('txtColorVisited').value ) ; + oPreviewWindow.SetActiveColor( GetE('txtColorActive').value ) ; +} + +function CheckOther( combo, txtField ) +{ + var bNotOther = ( combo.value != '...' ) ; + + GetE(txtField).style.backgroundColor = ( bNotOther ? '#cccccc' : '' ) ; + GetE(txtField).disabled = bNotOther ; +} + +function SetColor( inputId, color ) +{ + GetE( inputId ).value = color + '' ; + UpdatePreview() ; +} + +function SelectBackColor( color ) { SetColor('txtBackColor', color ) ; } +function SelectColorText( color ) { SetColor('txtColorText', color ) ; } +function SelectColorLink( color ) { SetColor('txtColorLink', color ) ; } +function SelectColorVisited( color ) { SetColor('txtColorVisited', color ) ; } +function SelectColorActive( color ) { SetColor('txtColorActive', color ) ; } + +function SelectColor( wich ) +{ + switch ( wich ) + { + case 'Back' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectBackColor, window ) ; return ; + case 'ColorText' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorText, window ) ; return ; + case 'ColorLink' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorLink, window ) ; return ; + case 'ColorVisited' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorVisited, window ) ; return ; + case 'ColorActive' : oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, SelectColorActive, window ) ; return ; + } +} + +function BrowseServerBack() +{ + OpenFileBrowser( FCKConfig.ImageBrowserURL, FCKConfig.ImageBrowserWindowWidth, FCKConfig.ImageBrowserWindowHeight ) ; +} + +function SetUrl( url ) +{ + GetE('txtBackImage').value = url ; + UpdatePreview() ; +} + + </script> +</head> +<body style="overflow: hidden"> + <table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 100%"> + <tr> + <td valign="top" style="height: 100%"> + <div id="divGeneral"> + <span fcklang="DlgDocPageTitle">Page Title</span><br /> + <input id="txtPageTitle" style="width: 100%" type="text" /> + <br /> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td> + <span fcklang="DlgDocLangDir">Language Direction</span><br /> + <select id="selDirection"> + <option value="" selected="selected"></option> + <option value="ltr" fcklang="DlgDocLangDirLTR">Left to Right (LTR)</option> + <option value="rtl" fcklang="DlgDocLangDirRTL">Right to Left (RTL)</option> + </select> + </td> + <td> + </td> + <td> + <span fcklang="DlgDocLangCode">Language Code</span><br /> + <input id="txtLang" type="text" /> + </td> + </tr> + </table> + <br /> + <table cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td style="white-space: nowrap"> + <span fcklang="DlgDocCharSet">Character Set Encoding</span><br /> + <select id="selCharSet" onchange="CheckOther( this, 'txtCustomCharSet' );"> + <option value="" selected="selected"></option> + <option value="us-ascii">ASCII</option> + <option fcklang="DlgDocCharSetCE" value="iso-8859-2">Central European</option> + <option fcklang="DlgDocCharSetCT" value="big5">Chinese Traditional (Big5)</option> + <option fcklang="DlgDocCharSetCR" value="iso-8859-5">Cyrillic</option> + <option fcklang="DlgDocCharSetGR" value="iso-8859-7">Greek</option> + <option fcklang="DlgDocCharSetJP" value="iso-2022-jp">Japanese</option> + <option fcklang="DlgDocCharSetKR" value="iso-2022-kr">Korean</option> + <option fcklang="DlgDocCharSetTR" value="iso-8859-9">Turkish</option> + <option fcklang="DlgDocCharSetUN" value="utf-8">Unicode (UTF-8)</option> + <option fcklang="DlgDocCharSetWE" value="iso-8859-1">Western European</option> + <option fcklang="DlgOpOther" value="..."><Other></option> + </select> + </td> + <td> + </td> + <td width="100%"> + <span fcklang="DlgDocCharSetOther">Other Character Set Encoding</span><br /> + <input id="txtCustomCharSet" style="width: 100%; background-color: #cccccc" disabled="disabled" + type="text" /> + </td> + </tr> + <tr> + <td colspan="3"> + </td> + </tr> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgDocDocType">Document Type Heading</span><br /> + <select id="selDocType" name="selDocType" onchange="CheckOther( this, 'txtDocType' );"> + <option value="" selected="selected"></option> + <option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'>HTML + 4.01 Transitional</option> + <option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'> + HTML 4.01 Strict</option> + <option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'> + HTML 4.01 Frameset</option> + <option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'> + XHTML 1.0 Transitional</option> + <option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'> + XHTML 1.0 Strict</option> + <option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'> + XHTML 1.0 Frameset</option> + <option value='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'> + XHTML 1.1</option> + <option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'>HTML 3.2</option> + <option value='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'>HTML 2.0</option> + <option value="..." fcklang="DlgOpOther"><Other></option> + </select> + </td> + <td> + </td> + <td width="100%"> + <span fcklang="DlgDocDocTypeOther">Other Document Type Heading</span><br /> + <input id="txtDocType" style="width: 100%; background-color: #cccccc" disabled="disabled" + type="text" /> + </td> + </tr> + </table> + <br /> + <input id="chkIncXHTMLDecl" type="checkbox" /> + <label for="chkIncXHTMLDecl" fcklang="DlgDocIncXHTML"> + Include XHTML Declarations</label> + </div> + <div id="divBackground" style="display: none"> + <span fcklang="DlgDocBgColor">Background Color</span><br /> + <input id="txtBackColor" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();" /> <input + id="btnSelBackColor" onclick="SelectColor( 'Back' )" type="button" value="Select..." + fcklang="DlgCellBtnSelect" /><br /> + <br /> + <span fcklang="DlgDocBgImage">Background Image URL</span><br /> + <table cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td width="100%"> + <input id="txtBackImage" style="width: 100%" type="text" onchange="UpdatePreview();" + onkeyup="UpdatePreview();" /></td> + <td id="tdBrowse" nowrap="nowrap"> + <input id="btnBrowse" onclick="BrowseServerBack();" type="button" fcklang="DlgBtnBrowseServer" + value="Browse Server" /></td> + </tr> + </table> + <input id="chkBackNoScroll" type="checkbox" onclick="UpdatePreview();" /> + <label for="chkBackNoScroll" fcklang="DlgDocBgNoScroll"> + Nonscrolling Background</label> + </div> + <div id="divColors" style="display: none"> + <table cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td> + <span fcklang="DlgDocCText">Text</span><br /> + <input id="txtColorText" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();" /><input + onclick="SelectColor( 'ColorText' )" type="button" value="Select..." fcklang="DlgCellBtnSelect" /> + <br /> + <span fcklang="DlgDocCLink">Link</span><br /> + <input id="txtColorLink" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();" /><input + onclick="SelectColor( 'ColorLink' )" type="button" value="Select..." fcklang="DlgCellBtnSelect" /> + <br /> + <span fcklang="DlgDocCVisited">Visited Link</span><br /> + <input id="txtColorVisited" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();" /><input + onclick="SelectColor( 'ColorVisited' )" type="button" value="Select..." fcklang="DlgCellBtnSelect" /> + <br /> + <span fcklang="DlgDocCActive">Active Link</span><br /> + <input id="txtColorActive" type="text" onchange="UpdatePreview();" onkeyup="UpdatePreview();" /><input + onclick="SelectColor( 'ColorActive' )" type="button" value="Select..." fcklang="DlgCellBtnSelect" /> + </td> + <td valign="middle" align="center"> + <table cellspacing="2" cellpadding="0" border="0"> + <tr> + <td> + <span fcklang="DlgDocMargins">Page Margins</span></td> + </tr> + <tr> + <td style="border: #000000 1px solid; padding: 5px"> + <table cellpadding="0" cellspacing="0" border="0" dir="ltr"> + <tr> + <td align="center" colspan="3"> + <span fcklang="DlgDocMaTop">Top</span><br /> + <input id="txtMarginTop" type="text" size="3" /> + </td> + </tr> + <tr> + <td align="left"> + <span fcklang="DlgDocMaLeft">Left</span><br /> + <input id="txtMarginLeft" type="text" size="3" /> + </td> + <td> + </td> + <td align="right"> + <span fcklang="DlgDocMaRight">Right</span><br /> + <input id="txtMarginRight" type="text" size="3" /> + </td> + </tr> + <tr> + <td align="center" colspan="3"> + <span fcklang="DlgDocMaBottom">Bottom</span><br /> + <input id="txtMarginBottom" type="text" size="3" /> + </td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </div> + <div id="divMeta" style="display: none"> + <span fcklang="DlgDocMeIndex">Document Indexing Keywords (comma separated)</span><br /> + <textarea id="txtMetaKeywords" style="width: 100%" rows="2" cols="20"></textarea> + <br /> + <span fcklang="DlgDocMeDescr">Document Description</span><br /> + <textarea id="txtMetaDescription" style="width: 100%" rows="4" cols="20"></textarea> + <br /> + <span fcklang="DlgDocMeAuthor">Author</span><br /> + <input id="txtMetaAuthor" style="width: 100%" type="text" /><br /> + <br /> + <span fcklang="DlgDocMeCopy">Copyright</span><br /> + <input id="txtMetaCopyright" type="text" style="width: 100%" /> + </div> + </td> + </tr> + <tr id="ePreview" style="display: none"> + <td> + <span fcklang="DlgDocPreview">Preview</span><br /> + <iframe id="frmPreview" src="fck_docprops/fck_document_preview.html" width="100%" + height="100"></iframe> + </td> + </tr> + </table> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,113 @@ +<!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 == + * + * Preview shown in the "Document Properties" dialog window. +--> +<html> + <head> + <title>Document Properties - Preview</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="robots" content="noindex, nofollow"> + <script language="javascript"> + +var eBase = parent.FCK.EditorDocument.getElementsByTagName( 'BASE' ) ; +if ( eBase.length > 0 && eBase[0].href.length > 0 ) +{ + document.write( '<base href="' + eBase[0].href + '">' ) ; +} + +window.onload = function() +{ + if ( typeof( parent.OnPreviewLoad ) == 'function' ) + parent.OnPreviewLoad( window, document.body ) ; +} + +function SetBaseHRef( baseHref ) +{ + var eBase = document.createElement( 'BASE' ) ; + eBase.href = baseHref ; + + var eHead = document.getElementsByTagName( 'HEAD' )[0] ; + eHead.appendChild( eBase ) ; +} + +function SetLinkColor( color ) +{ + if ( color && color.length > 0 ) + document.getElementById('eLink').style.color = color ; + else + document.getElementById('eLink').style.color = window.document.linkColor ; +} + +function SetVisitedColor( color ) +{ + if ( color && color.length > 0 ) + document.getElementById('eVisited').style.color = color ; + else + document.getElementById('eVisited').style.color = window.document.vlinkColor ; +} + +function SetActiveColor( color ) +{ + if ( color && color.length > 0 ) + document.getElementById('eActive').style.color = color ; + else + document.getElementById('eActive').style.color = window.document.alinkColor ; +} + </script> + </head> + <body> + <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td align="center" valign="middle"> + Normal Text + </td> + <td id="eLink" align="center" valign="middle"> + <u>Link Text</u> + </td> + </tr> + <tr> + <td id="eVisited" valign="middle" align="center"> + <u>Visited Link</u> + </td> + <td id="eActive" valign="middle" align="center"> + <u>Active Link</u> + </td> + </tr> + </table> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,152 @@ +<!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 == + * + * Flash Properties dialog window. +--> +<html> + <head> + <title>Flash Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta content="noindex, nofollow" name="robots"> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script src="fck_flash/fck_flash.js" type="text/javascript"></script> + <script type="text/javascript"> + +document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; + + </script> + </head> + <body scroll="no" style="OVERFLOW: hidden"> + <div id="divInfo"> + <table cellSpacing="1" cellPadding="1" width="100%" border="0"> + <tr> + <td> + <table cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td width="100%"><span fckLang="DlgImgURL">URL</span> + </td> + <td id="tdBrowse" style="DISPLAY: none" noWrap rowSpan="2"> <input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" fckLang="DlgBtnBrowseServer"> + </td> + </tr> + <tr> + <td vAlign="top"><input id="txtUrl" onblur="UpdatePreview();" style="WIDTH: 100%" type="text"> + </td> + </tr> + </table> + </td> + </tr> + <TR> + <TD> + <table cellSpacing="0" cellPadding="0" border="0"> + <TR> + <TD nowrap> + <span fckLang="DlgImgWidth">Width</span><br> + <input id="txtWidth" onkeypress="return IsDigit(event);" type="text" size="3"> + </TD> + <TD> </TD> + <TD> + <span fckLang="DlgImgHeight">Height</span><br> + <input id="txtHeight" onkeypress="return IsDigit(event);" type="text" size="3"> + </TD> + </TR> + </table> + </TD> + </TR> + <tr> + <td vAlign="top"> + <table cellSpacing="0" cellPadding="0" width="100%" border="0"> + <tr> + <td valign="top" width="100%"> + <table cellSpacing="0" cellPadding="0" width="100%"> + <tr> + <td><span fckLang="DlgImgPreview">Preview</span></td> + </tr> + <tr> + <td id="ePreviewCell" valign="top" class="FlashPreviewArea"><iframe src="fck_flash/fck_flash_preview.html" frameborder="0" marginheight="0" marginwidth="0"></iframe></td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </div> + <div id="divUpload" style="DISPLAY: none"> + <form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();"> + <span fckLang="DlgLnkUpload">Upload</span><br /> + <input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br /> + <br /> + <input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> + <script type="text/javascript"> + document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; + </script> + </form> + </div> + <div id="divAdvanced" style="DISPLAY: none"> + <TABLE cellSpacing="0" cellPadding="0" border="0"> + <TR> + <TD nowrap> + <span fckLang="DlgFlashScale">Scale</span><BR> + <select id="cmbScale"> + <option value="" selected></option> + <option value="showall" fckLang="DlgFlashScaleAll">Show all</option> + <option value="noborder" fckLang="DlgFlashScaleNoBorder">No Border</option> + <option value="exactfit" fckLang="DlgFlashScaleFit">Exact Fit</option> + </select></TD> + <TD> + </TD> + <td valign="bottom"> + <table> + <tr> + <td><input id="chkAutoPlay" type="checkbox" checked></td> + <td><label for="chkAutoPlay" nowrap fckLang="DlgFlashChkPlay">Auto Play</label> </td> + <td><input id="chkLoop" type="checkbox" checked></td> + <td><label for="chkLoop" nowrap fckLang="DlgFlashChkLoop">Loop</label> </td> + <td><input id="chkMenu" type="checkbox" checked></td> + <td><label for="chkMenu" nowrap fckLang="DlgFlashChkMenu">Enable Flash Menu</label></td> + </tr> + </table> + </td> + </TR> + </TABLE> + <br> + + <table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0"> + <tr> + <td vAlign="top" width="50%"><span fckLang="DlgGenId">Id</span><br> + <input id="txtAttId" style="WIDTH: 100%" type="text"> + </td> + <td> </td> + <td vAlign="top" nowrap><span fckLang="DlgGenClass">Stylesheet Classes</span><br> + <input id="txtAttClasses" style="WIDTH: 100%" type="text"> + </td> + <td> </td> + <td vAlign="top" nowrap width="50%"> <span fckLang="DlgGenTitle">Advisory Title</span><br> + <input id="txtAttTitle" style="WIDTH: 100%" type="text"> + </td> + </tr> + </table> + <span fckLang="DlgGenStyle">Style</span><br> + <input id="txtAttStyle" style="WIDTH: 100%" type="text"> + </div> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/fck_flash.js ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/fck_flash.js Sun Apr 5 19:31:23 2009 @@ -0,0 +1,300 @@ +/* + * 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 == + * + * Scripts related to the Flash dialog window (see fck_flash.html). + */ + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; +var FCK = oEditor.FCK ; +var FCKLang = oEditor.FCKLang ; +var FCKConfig = oEditor.FCKConfig ; +var FCKTools = oEditor.FCKTools ; + +//#### Dialog Tabs + +// Set the dialog tabs. +dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ; + +if ( FCKConfig.FlashUpload ) + dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; + +if ( !FCKConfig.FlashDlgHideAdvanced ) + dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; + +// Function called when a dialog tag is selected. +function OnDialogTabChange( tabCode ) +{ + ShowE('divInfo' , ( tabCode == 'Info' ) ) ; + ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; + ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; +} + +// Get the selected flash embed (if available). +var oFakeImage = dialog.Selection.GetSelectedElement() ; +var oEmbed ; + +if ( oFakeImage ) +{ + if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') ) + oEmbed = FCK.GetRealElement( oFakeImage ) ; + else + oFakeImage = null ; +} + +window.onload = function() +{ + // Translate the dialog box texts. + oEditor.FCKLanguageManager.TranslatePage(document) ; + + // Load the selected element information (if any). + LoadSelection() ; + + // Show/Hide the "Browse Server" button. + GetE('tdBrowse').style.display = FCKConfig.FlashBrowser ? '' : 'none' ; + + // Set the actual uploader URL. + if ( FCKConfig.FlashUpload ) + GetE('frmUpload').action = FCKConfig.FlashUploadURL ; + + dialog.SetAutoSize( true ) ; + + // Activate the "OK" button. + dialog.SetOkButton( true ) ; + + SelectField( 'txtUrl' ) ; +} + +function LoadSelection() +{ + if ( ! oEmbed ) return ; + + GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ; + GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ; + GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ; + + // Get Advances Attributes + GetE('txtAttId').value = oEmbed.id ; + GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ; + GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ; + GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ; + GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ; + + GetE('txtAttTitle').value = oEmbed.title ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + { + GetE('txtAttClasses').value = oEmbed.getAttribute('className') || '' ; + GetE('txtAttStyle').value = oEmbed.style.cssText ; + } + else + { + GetE('txtAttClasses').value = oEmbed.getAttribute('class',2) || '' ; + GetE('txtAttStyle').value = oEmbed.getAttribute('style',2) || '' ; + } + + UpdatePreview() ; +} + +//#### The OK button was hit. +function Ok() +{ + if ( GetE('txtUrl').value.length == 0 ) + { + dialog.SetSelectedTab( 'Info' ) ; + GetE('txtUrl').focus() ; + + alert( oEditor.FCKLang.DlgAlertUrl ) ; + + return false ; + } + + oEditor.FCKUndo.SaveUndoStep() ; + if ( !oEmbed ) + { + oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ; + oFakeImage = null ; + } + UpdateEmbed( oEmbed ) ; + + if ( !oFakeImage ) + { + oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ; + oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ; + oFakeImage = FCK.InsertElement( oFakeImage ) ; + } + + oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ; + + return true ; +} + +function UpdateEmbed( e ) +{ + SetAttribute( e, 'type' , 'application/x-shockwave-flash' ) ; + SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ; + + SetAttribute( e, 'src', GetE('txtUrl').value ) ; + SetAttribute( e, "width" , GetE('txtWidth').value ) ; + SetAttribute( e, "height", GetE('txtHeight').value ) ; + + // Advances Attributes + + SetAttribute( e, 'id' , GetE('txtAttId').value ) ; + SetAttribute( e, 'scale', GetE('cmbScale').value ) ; + + SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ; + SetAttribute( e, 'loop', GetE('chkLoop').checked ? 'true' : 'false' ) ; + SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' ) ; + + SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + { + SetAttribute( e, 'className', GetE('txtAttClasses').value ) ; + e.style.cssText = GetE('txtAttStyle').value ; + } + else + { + SetAttribute( e, 'class', GetE('txtAttClasses').value ) ; + SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; + } +} + +var ePreview ; + +function SetPreviewElement( previewEl ) +{ + ePreview = previewEl ; + + if ( GetE('txtUrl').value.length > 0 ) + UpdatePreview() ; +} + +function UpdatePreview() +{ + if ( !ePreview ) + return ; + + while ( ePreview.firstChild ) + ePreview.removeChild( ePreview.firstChild ) ; + + if ( GetE('txtUrl').value.length == 0 ) + ePreview.innerHTML = ' ' ; + else + { + var oDoc = ePreview.ownerDocument || ePreview.document ; + var e = oDoc.createElement( 'EMBED' ) ; + + SetAttribute( e, 'src', GetE('txtUrl').value ) ; + SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ; + SetAttribute( e, 'width', '100%' ) ; + SetAttribute( e, 'height', '100%' ) ; + + ePreview.appendChild( e ) ; + } +} + +// <embed id="ePreview" src="fck_flash/claims.swf" width="100%" height="100%" style="visibility:hidden" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> + +function BrowseServer() +{ + OpenFileBrowser( FCKConfig.FlashBrowserURL, FCKConfig.FlashBrowserWindowWidth, FCKConfig.FlashBrowserWindowHeight ) ; +} + +function SetUrl( url, width, height ) +{ + GetE('txtUrl').value = url ; + + if ( width ) + GetE('txtWidth').value = width ; + + if ( height ) + GetE('txtHeight').value = height ; + + UpdatePreview() ; + + dialog.SetSelectedTab( 'Info' ) ; +} + +function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) +{ + // Remove animation + window.parent.Throbber.Hide() ; + GetE( 'divUpload' ).style.display = '' ; + + switch ( errorNumber ) + { + case 0 : // No errors + alert( 'Your file has been successfully uploaded' ) ; + break ; + case 1 : // Custom error + alert( customMsg ) ; + return ; + case 101 : // Custom warning + alert( customMsg ) ; + break ; + case 201 : + alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; + break ; + case 202 : + alert( 'Invalid file type' ) ; + return ; + case 203 : + alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; + return ; + case 500 : + alert( 'The connector is disabled' ) ; + break ; + default : + alert( 'Error on file upload. Error number: ' + errorNumber ) ; + return ; + } + + SetUrl( fileUrl ) ; + GetE('frmUpload').reset() ; +} + +var oUploadAllowedExtRegex = new RegExp( FCKConfig.FlashUploadAllowedExtensions, 'i' ) ; +var oUploadDeniedExtRegex = new RegExp( FCKConfig.FlashUploadDeniedExtensions, 'i' ) ; + +function CheckUpload() +{ + var sFile = GetE('txtUploadFile').value ; + + if ( sFile.length == 0 ) + { + alert( 'Please select a file to upload' ) ; + return false ; + } + + if ( ( FCKConfig.FlashUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || + ( FCKConfig.FlashUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) + { + OnUploadCompleted( 202 ) ; + return false ; + } + + // Show animation + window.parent.Throbber.Show( 100 ) ; + GetE( 'divUpload' ).style.display = 'none' ; + + return true ; +} Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,50 @@ +<!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 == + * + * Preview page for the Flash dialog window. +--> +<html> + <head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="robots" content="noindex, nofollow"> + <script src="../common/fck_dialog_common.js" type="text/javascript"></script> + <script language="javascript"> + +var FCKTools = window.parent.FCKTools ; +var FCKConfig = window.parent.FCKConfig ; + +// Sets the Skin CSS +document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ; +document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ; + +if ( window.parent.FCKConfig.BaseHref.length > 0 ) + document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; + +window.onload = function() +{ + window.parent.SetPreviewElement( document.body ) ; +} + + </script> + </head> + <body style="COLOR: #000000; BACKGROUND-COLOR: #ffffff"></body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_form.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_form.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,109 @@ +<!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 == + * + * Form dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta content="noindex, nofollow" name="robots" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +// Gets the document DOM +var oDOM = oEditor.FCK.EditorDocument ; + +var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( 'FORM' ) ; + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( oActiveEl ) + { + GetE('txtName').value = oActiveEl.name ; + GetE('txtAction').value = oActiveEl.getAttribute( 'action', 2 ) ; + GetE('txtMethod').value = oActiveEl.method ; + } + else + oActiveEl = null ; + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + SelectField( 'txtName' ) ; +} + +function Ok() +{ + if ( !oActiveEl ) + { + oActiveEl = oEditor.FCK.InsertElement( 'form' ) ; + + if ( oEditor.FCKBrowserInfo.IsGeckoLike ) + oEditor.FCKTools.AppendBogusBr( oActiveEl ) ; + } + + oActiveEl.name = GetE('txtName').value ; + SetAttribute( oActiveEl, 'action', GetE('txtAction').value ) ; + oActiveEl.method = GetE('txtMethod').value ; + + return true ; +} + + </script> +</head> +<body style="overflow: hidden"> + <table width="100%" style="height: 100%"> + <tr> + <td align="center"> + <table cellspacing="0" cellpadding="0" width="80%" border="0"> + <tr> + <td> + <span fcklang="DlgFormName">Name</span><br /> + <input style="width: 100%" type="text" id="txtName" /> + </td> + </tr> + <tr> + <td> + <span fcklang="DlgFormAction">Action</span><br /> + <input style="width: 100%" type="text" id="txtAction" /> + </td> + </tr> + <tr> + <td> + <span fcklang="DlgFormMethod">Method</span><br /> + <select id="txtMethod"> + <option value="get" selected="selected">GET</option> + <option value="post">POST</option> + </select> + </td> + </tr> + </table> + </td> + </tr> + </table> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_hiddenfield.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_hiddenfield.html Sun Apr 5 19:31:23 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 == + * + * Hidden Field dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Hidden Field Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta content="noindex, nofollow" name="robots" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +var FCK = oEditor.FCK ; + +// Gets the document DOM +var oDOM = FCK.EditorDocument ; + +// Get the selected flash embed (if available). +var oFakeImage = dialog.Selection.GetSelectedElement() ; +var oActiveEl ; + +if ( oFakeImage ) +{ + if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') ) + oActiveEl = FCK.GetRealElement( oFakeImage ) ; + else + oFakeImage = null ; +} + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( oActiveEl ) + { + GetE('txtName').value = oActiveEl.name ; + GetE('txtValue').value = oActiveEl.value ; + } + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + SelectField( 'txtName' ) ; +} + + +function Ok() +{ + oEditor.FCKUndo.SaveUndoStep() ; + + oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'hidden' } ) ; + + SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; + + if ( !oFakeImage ) + { + oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ; + oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ; + + oActiveEl.parentNode.insertBefore( oFakeImage, oActiveEl ) ; + oActiveEl.parentNode.removeChild( oActiveEl ) ; + } + else + oEditor.FCKUndo.SaveUndoStep() ; + + return true ; +} + + </script> +</head> +<body style="overflow: hidden" scroll="no"> + <table height="100%" width="100%"> + <tr> + <td align="center"> + <table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%"> + <tr> + <td> + <span fcklang="DlgHiddenName">Name</span><br /> + <input type="text" size="20" id="txtName" style="width: 100%" /> + </td> + </tr> + <tr> + <td> + <span fcklang="DlgHiddenValue">Value</span><br /> + <input type="text" size="30" id="txtValue" style="width: 100%" /> + </td> + </tr> + </table> + </td> + </tr> + </table> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,258 @@ +<!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 == + * + * Image Properties dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Image Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="robots" content="noindex, nofollow" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script src="fck_image/fck_image.js" type="text/javascript"></script> + <script type="text/javascript"> + +document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ; + + </script> +</head> +<body scroll="no" style="overflow: hidden"> + <div id="divInfo"> + <table cellspacing="1" cellpadding="1" border="0" width="100%" height="100%"> + <tr> + <td> + <table cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td width="100%"> + <span fcklang="DlgImgURL">URL</span> + </td> + <td id="tdBrowse" style="display: none" nowrap="nowrap" rowspan="2"> + + <input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" + fcklang="DlgBtnBrowseServer" /> + </td> + </tr> + <tr> + <td valign="top"> + <input id="txtUrl" style="width: 100%" type="text" onblur="UpdatePreview();" /> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td> + <span fcklang="DlgImgAlt">Short Description</span><br /> + <input id="txtAlt" style="width: 100%" type="text" /><br /> + </td> + </tr> + <tr height="100%"> + <td valign="top"> + <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%"> + <tr> + <td valign="top"> + <br /> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgImgWidth">Width</span> </td> + <td> + <input type="text" size="3" id="txtWidth" onkeyup="OnSizeChanged('Width',this.value);" /></td> + <td rowspan="2"> + <div id="btnLockSizes" class="BtnLocked" onmouseover="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';" + onmouseout="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );" title="Lock Sizes" + onclick="SwitchLock(this);"> + </div> + </td> + <td rowspan="2"> + <div id="btnResetSize" class="BtnReset" onmouseover="this.className='BtnReset BtnOver';" + onmouseout="this.className='BtnReset';" title="Reset Size" onclick="ResetSizes();"> + </div> + </td> + </tr> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgImgHeight">Height</span> </td> + <td> + <input type="text" size="3" id="txtHeight" onkeyup="OnSizeChanged('Height',this.value);" /></td> + </tr> + </table> + <br /> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgImgBorder">Border</span> </td> + <td> + <input type="text" size="2" value="" id="txtBorder" onkeyup="UpdatePreview();" /></td> + </tr> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgImgHSpace">HSpace</span> </td> + <td> + <input type="text" size="2" id="txtHSpace" onkeyup="UpdatePreview();" /></td> + </tr> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgImgVSpace">VSpace</span> </td> + <td> + <input type="text" size="2" id="txtVSpace" onkeyup="UpdatePreview();" /></td> + </tr> + <tr> + <td nowrap="nowrap"> + <span fcklang="DlgImgAlign">Align</span> </td> + <td> + <select id="cmbAlign" onchange="UpdatePreview();"> + <option value="" selected="selected"></option> + <option fcklang="DlgImgAlignLeft" value="left">Left</option> + <option fcklang="DlgImgAlignAbsBottom" value="absBottom">Abs Bottom</option> + <option fcklang="DlgImgAlignAbsMiddle" value="absMiddle">Abs Middle</option> + <option fcklang="DlgImgAlignBaseline" value="baseline">Baseline</option> + <option fcklang="DlgImgAlignBottom" value="bottom">Bottom</option> + <option fcklang="DlgImgAlignMiddle" value="middle">Middle</option> + <option fcklang="DlgImgAlignRight" value="right">Right</option> + <option fcklang="DlgImgAlignTextTop" value="textTop">Text Top</option> + <option fcklang="DlgImgAlignTop" value="top">Top</option> + </select> + </td> + </tr> + </table> + </td> + <td> + </td> + <td width="100%" valign="top"> + <table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed"> + <tr> + <td> + <span fcklang="DlgImgPreview">Preview</span></td> + </tr> + <tr> + <td valign="top"> + <iframe class="ImagePreviewArea" src="fck_image/fck_image_preview.html" frameborder="0" + marginheight="0" marginwidth="0"></iframe> + </td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </div> + <div id="divUpload" style="display: none"> + <form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" + action="" onsubmit="return CheckUpload();"> + <span fcklang="DlgLnkUpload">Upload</span><br /> + <input id="txtUploadFile" style="width: 100%" type="file" size="40" name="NewFile" /><br /> + <br /> + <input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" /> + <script type="text/javascript"> + document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; + </script> + </form> + </div> + <div id="divLink" style="display: none"> + <table cellspacing="1" cellpadding="1" border="0" width="100%"> + <tr> + <td> + <div> + <span fcklang="DlgLnkURL">URL</span><br /> + <input id="txtLnkUrl" style="width: 100%" type="text" onblur="UpdatePreview();" /> + </div> + <div id="divLnkBrowseServer" align="right"> + <input type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" onclick="LnkBrowseServer();" /> + </div> + <div> + <span fcklang="DlgLnkTarget">Target</span><br /> + <select id="cmbLnkTarget"> + <option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option> + <option value="_blank" fcklang="DlgLnkTargetBlank">New Window (_blank)</option> + <option value="_top" fcklang="DlgLnkTargetTop">Topmost Window (_top)</option> + <option value="_self" fcklang="DlgLnkTargetSelf">Same Window (_self)</option> + <option value="_parent" fcklang="DlgLnkTargetParent">Parent Window (_parent)</option> + </select> + </div> + </td> + </tr> + </table> + </div> + <div id="divAdvanced" style="display: none"> + <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> + <tr> + <td valign="top" width="50%"> + <span fcklang="DlgGenId">Id</span><br /> + <input id="txtAttId" style="width: 100%" type="text" /> + </td> + <td width="1"> + </td> + <td valign="top"> + <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> + <tr> + <td width="60%"> + <span fcklang="DlgGenLangDir">Language Direction</span><br /> + <select id="cmbAttLangDir" style="width: 100%"> + <option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option> + <option value="ltr" fcklang="DlgGenLangDirLtr">Left to Right (LTR)</option> + <option value="rtl" fcklang="DlgGenLangDirRtl">Right to Left (RTL)</option> + </select> + </td> + <td width="1%"> + </td> + <td nowrap="nowrap"> + <span fcklang="DlgGenLangCode">Language Code</span><br /> + <input id="txtAttLangCode" style="width: 100%" type="text" /> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td colspan="3"> + </td> + </tr> + <tr> + <td colspan="3"> + <span fcklang="DlgGenLongDescr">Long Description URL</span><br /> + <input id="txtLongDesc" style="width: 100%" type="text" /> + </td> + </tr> + <tr> + <td colspan="3"> + </td> + </tr> + <tr> + <td valign="top"> + <span fcklang="DlgGenClass">Stylesheet Classes</span><br /> + <input id="txtAttClasses" style="width: 100%" type="text" /> + </td> + <td> + </td> + <td valign="top"> + <span fcklang="DlgGenTitle">Advisory Title</span><br /> + <input id="txtAttTitle" style="width: 100%" type="text" /> + </td> + </tr> + </table> + <span fcklang="DlgGenStyle">Style</span><br /> + <input id="txtAttStyle" style="width: 100%" type="text" /> + </div> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/fck_image.js ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/fck_image.js Sun Apr 5 19:31:23 2009 @@ -0,0 +1,512 @@ +/* + * 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 == + * + * Scripts related to the Image dialog window (see fck_image.html). + */ + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; +var FCK = oEditor.FCK ; +var FCKLang = oEditor.FCKLang ; +var FCKConfig = oEditor.FCKConfig ; +var FCKDebug = oEditor.FCKDebug ; +var FCKTools = oEditor.FCKTools ; + +var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; + +//#### Dialog Tabs + +// Set the dialog tabs. +dialog.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; + +if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) + dialog.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; + +if ( FCKConfig.ImageUpload ) + dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; + +if ( !FCKConfig.ImageDlgHideAdvanced ) + dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; + +// Function called when a dialog tag is selected. +function OnDialogTabChange( tabCode ) +{ + ShowE('divInfo' , ( tabCode == 'Info' ) ) ; + ShowE('divLink' , ( tabCode == 'Link' ) ) ; + ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; + ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; +} + +// Get the selected image (if available). +var oImage = dialog.Selection.GetSelectedElement() ; + +if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) ) + oImage = null ; + +// Get the active link. +var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; + +var oImageOriginal ; + +function UpdateOriginal( resetSize ) +{ + if ( !eImgPreview ) + return ; + + if ( GetE('txtUrl').value.length == 0 ) + { + oImageOriginal = null ; + return ; + } + + oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ; + + if ( resetSize ) + { + oImageOriginal.onload = function() + { + this.onload = null ; + ResetSizes() ; + } + } + + oImageOriginal.src = eImgPreview.src ; +} + +var bPreviewInitialized ; + +window.onload = function() +{ + // Translate the dialog box texts. + oEditor.FCKLanguageManager.TranslatePage(document) ; + + GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ; + GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ; + + // Load the selected element information (if any). + LoadSelection() ; + + // Show/Hide the "Browse Server" button. + GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ; + GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; + + UpdateOriginal() ; + + // Set the actual uploader URL. + if ( FCKConfig.ImageUpload ) + GetE('frmUpload').action = FCKConfig.ImageUploadURL ; + + dialog.SetAutoSize( true ) ; + + // Activate the "OK" button. + dialog.SetOkButton( true ) ; + + SelectField( 'txtUrl' ) ; +} + +function LoadSelection() +{ + if ( ! oImage ) return ; + + var sUrl = oImage.getAttribute( '_fcksavedurl' ) ; + if ( sUrl == null ) + sUrl = GetAttribute( oImage, 'src', '' ) ; + + GetE('txtUrl').value = sUrl ; + GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; + GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; + GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; + GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ; + GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ; + + var iWidth, iHeight ; + + var regexSize = /^\s*(\d+)px\s*$/i ; + + if ( oImage.style.width ) + { + var aMatchW = oImage.style.width.match( regexSize ) ; + if ( aMatchW ) + { + iWidth = aMatchW[1] ; + oImage.style.width = '' ; + SetAttribute( oImage, 'width' , iWidth ) ; + } + } + + if ( oImage.style.height ) + { + var aMatchH = oImage.style.height.match( regexSize ) ; + if ( aMatchH ) + { + iHeight = aMatchH[1] ; + oImage.style.height = '' ; + SetAttribute( oImage, 'height', iHeight ) ; + } + } + + GetE('txtWidth').value = iWidth ? iWidth : GetAttribute( oImage, "width", '' ) ; + GetE('txtHeight').value = iHeight ? iHeight : GetAttribute( oImage, "height", '' ) ; + + // Get Advances Attributes + GetE('txtAttId').value = oImage.id ; + GetE('cmbAttLangDir').value = oImage.dir ; + GetE('txtAttLangCode').value = oImage.lang ; + GetE('txtAttTitle').value = oImage.title ; + GetE('txtLongDesc').value = oImage.longDesc ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + { + GetE('txtAttClasses').value = oImage.className || '' ; + GetE('txtAttStyle').value = oImage.style.cssText ; + } + else + { + GetE('txtAttClasses').value = oImage.getAttribute('class',2) || '' ; + GetE('txtAttStyle').value = oImage.getAttribute('style',2) ; + } + + if ( oLink ) + { + var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ; + if ( sLinkUrl == null ) + sLinkUrl = oLink.getAttribute('href',2) ; + + GetE('txtLnkUrl').value = sLinkUrl ; + GetE('cmbLnkTarget').value = oLink.target ; + } + + UpdatePreview() ; +} + +//#### The OK button was hit. +function Ok() +{ + if ( GetE('txtUrl').value.length == 0 ) + { + dialog.SetSelectedTab( 'Info' ) ; + GetE('txtUrl').focus() ; + + alert( FCKLang.DlgImgAlertUrl ) ; + + return false ; + } + + var bHasImage = ( oImage != null ) ; + + if ( bHasImage && bImageButton && oImage.tagName == 'IMG' ) + { + if ( confirm( 'Do you want to transform the selected image on a image button?' ) ) + oImage = null ; + } + else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' ) + { + if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) ) + oImage = null ; + } + + oEditor.FCKUndo.SaveUndoStep() ; + if ( !bHasImage ) + { + if ( bImageButton ) + { + oImage = FCK.EditorDocument.createElement( 'input' ) ; + oImage.type = 'image' ; + oImage = FCK.InsertElement( oImage ) ; + } + else + oImage = FCK.InsertElement( 'img' ) ; + } + + UpdateImage( oImage ) ; + + var sLnkUrl = GetE('txtLnkUrl').value.Trim() ; + + if ( sLnkUrl.length == 0 ) + { + if ( oLink ) + FCK.ExecuteNamedCommand( 'Unlink' ) ; + } + else + { + if ( oLink ) // Modifying an existent link. + oLink.href = sLnkUrl ; + else // Creating a new link. + { + if ( !bHasImage ) + oEditor.FCKSelection.SelectNode( oImage ) ; + + oLink = oEditor.FCK.CreateLink( sLnkUrl )[0] ; + + if ( !bHasImage ) + { + oEditor.FCKSelection.SelectNode( oLink ) ; + oEditor.FCKSelection.Collapse( false ) ; + } + } + + SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ; + SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ; + } + + return true ; +} + +function UpdateImage( e, skipId ) +{ + e.src = GetE('txtUrl').value ; + SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ; + SetAttribute( e, "alt" , GetE('txtAlt').value ) ; + SetAttribute( e, "width" , GetE('txtWidth').value ) ; + SetAttribute( e, "height", GetE('txtHeight').value ) ; + SetAttribute( e, "vspace", GetE('txtVSpace').value ) ; + SetAttribute( e, "hspace", GetE('txtHSpace').value ) ; + SetAttribute( e, "border", GetE('txtBorder').value ) ; + SetAttribute( e, "align" , GetE('cmbAlign').value ) ; + + // Advances Attributes + + if ( ! skipId ) + SetAttribute( e, 'id', GetE('txtAttId').value ) ; + + SetAttribute( e, 'dir' , GetE('cmbAttLangDir').value ) ; + SetAttribute( e, 'lang' , GetE('txtAttLangCode').value ) ; + SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; + SetAttribute( e, 'longDesc' , GetE('txtLongDesc').value ) ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + { + e.className = GetE('txtAttClasses').value ; + e.style.cssText = GetE('txtAttStyle').value ; + } + else + { + SetAttribute( e, 'class' , GetE('txtAttClasses').value ) ; + SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; + } +} + +var eImgPreview ; +var eImgPreviewLink ; + +function SetPreviewElements( imageElement, linkElement ) +{ + eImgPreview = imageElement ; + eImgPreviewLink = linkElement ; + + UpdatePreview() ; + UpdateOriginal() ; + + bPreviewInitialized = true ; +} + +function UpdatePreview() +{ + if ( !eImgPreview || !eImgPreviewLink ) + return ; + + if ( GetE('txtUrl').value.length == 0 ) + eImgPreviewLink.style.display = 'none' ; + else + { + UpdateImage( eImgPreview, true ) ; + + if ( GetE('txtLnkUrl').value.Trim().length > 0 ) + eImgPreviewLink.href = 'javascript:void(null);' ; + else + SetAttribute( eImgPreviewLink, 'href', '' ) ; + + eImgPreviewLink.style.display = '' ; + } +} + +var bLockRatio = true ; + +function SwitchLock( lockButton ) +{ + bLockRatio = !bLockRatio ; + lockButton.className = bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ; + lockButton.title = bLockRatio ? 'Lock sizes' : 'Unlock sizes' ; + + if ( bLockRatio ) + { + if ( GetE('txtWidth').value.length > 0 ) + OnSizeChanged( 'Width', GetE('txtWidth').value ) ; + else + OnSizeChanged( 'Height', GetE('txtHeight').value ) ; + } +} + +// Fired when the width or height input texts change +function OnSizeChanged( dimension, value ) +{ + // Verifies if the aspect ration has to be maintained + if ( oImageOriginal && bLockRatio ) + { + var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ; + + if ( value.length == 0 || isNaN( value ) ) + { + e.value = '' ; + return ; + } + + if ( dimension == 'Width' ) + value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ; + else + value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ; + + if ( !isNaN( value ) ) + e.value = value ; + } + + UpdatePreview() ; +} + +// Fired when the Reset Size button is clicked +function ResetSizes() +{ + if ( ! oImageOriginal ) return ; + if ( oEditor.FCKBrowserInfo.IsGecko && !oImageOriginal.complete ) + { + setTimeout( ResetSizes, 50 ) ; + return ; + } + + GetE('txtWidth').value = oImageOriginal.width ; + GetE('txtHeight').value = oImageOriginal.height ; + + UpdatePreview() ; +} + +function BrowseServer() +{ + OpenServerBrowser( + 'Image', + FCKConfig.ImageBrowserURL, + FCKConfig.ImageBrowserWindowWidth, + FCKConfig.ImageBrowserWindowHeight ) ; +} + +function LnkBrowseServer() +{ + OpenServerBrowser( + 'Link', + FCKConfig.LinkBrowserURL, + FCKConfig.LinkBrowserWindowWidth, + FCKConfig.LinkBrowserWindowHeight ) ; +} + +function OpenServerBrowser( type, url, width, height ) +{ + sActualBrowser = type ; + OpenFileBrowser( url, width, height ) ; +} + +var sActualBrowser ; + +function SetUrl( url, width, height, alt ) +{ + if ( sActualBrowser == 'Link' ) + { + GetE('txtLnkUrl').value = url ; + UpdatePreview() ; + } + else + { + GetE('txtUrl').value = url ; + GetE('txtWidth').value = width ? width : '' ; + GetE('txtHeight').value = height ? height : '' ; + + if ( alt ) + GetE('txtAlt').value = alt; + + UpdatePreview() ; + UpdateOriginal( true ) ; + } + + dialog.SetSelectedTab( 'Info' ) ; +} + +function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) +{ + // Remove animation + window.parent.Throbber.Hide() ; + GetE( 'divUpload' ).style.display = '' ; + + switch ( errorNumber ) + { + case 0 : // No errors + alert( 'Your file has been successfully uploaded' ) ; + break ; + case 1 : // Custom error + alert( customMsg ) ; + return ; + case 101 : // Custom warning + alert( customMsg ) ; + break ; + case 201 : + alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; + break ; + case 202 : + alert( 'Invalid file type' ) ; + return ; + case 203 : + alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; + return ; + case 500 : + alert( 'The connector is disabled' ) ; + break ; + default : + alert( 'Error on file upload. Error number: ' + errorNumber ) ; + return ; + } + + sActualBrowser = '' ; + SetUrl( fileUrl ) ; + GetE('frmUpload').reset() ; +} + +var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ; +var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ; + +function CheckUpload() +{ + var sFile = GetE('txtUploadFile').value ; + + if ( sFile.length == 0 ) + { + alert( 'Please select a file to upload' ) ; + return false ; + } + + if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || + ( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) + { + OnUploadCompleted( 202 ) ; + return false ; + } + + // Show animation + window.parent.Throbber.Show( 100 ) ; + GetE( 'divUpload' ).style.display = 'none' ; + + return true ; +} Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/fck_image_preview.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_image/fck_image_preview.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,72 @@ +<!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 == + * + * Preview page for the Image dialog window. + * + * Curiosity: http://en.wikipedia.org/wiki/Lorem_ipsum +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="robots" content="noindex, nofollow" /> + <script src="../common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var FCKTools = window.parent.FCKTools ; +var FCKConfig = window.parent.FCKConfig ; + +// Set the preview CSS +document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaCSS ) ) ; +document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaStyles ) ) ; + +if ( window.parent.FCKConfig.BaseHref.length > 0 ) + document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; + +window.onload = function() +{ + window.parent.SetPreviewElements( + document.getElementById( 'imgPreview' ), + document.getElementById( 'lnkPreview' ) ) ; +} + + </script> +</head> +<body> + <div> + <a id="lnkPreview" onclick="return false;" style="cursor: default"> + <img id="imgPreview" onload="window.parent.UpdateOriginal();" + style="display: none" alt="" /></a>Lorem ipsum dolor sit amet, consectetuer adipiscing + elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus + a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, + nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed + velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper + nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices + a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus + faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget + tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, + tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis + id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, + eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur + ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris. + </div> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,295 @@ +<!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 == + * + * Link dialog window. +--> +<html> + <head> + <title>Link Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="robots" content="noindex, nofollow" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script src="fck_link/fck_link.js" type="text/javascript"></script> + </head> + <body scroll="no" style="OVERFLOW: hidden"> + <div id="divInfo" style="DISPLAY: none"> + <span fckLang="DlgLnkType">Link Type</span><br /> + <select id="cmbLinkType" onchange="SetLinkType(this.value);"> + <option value="url" fckLang="DlgLnkTypeURL" selected="selected">URL</option> + <option value="anchor" fckLang="DlgLnkTypeAnchor">Anchor in this page</option> + <option value="email" fckLang="DlgLnkTypeEMail">E-Mail</option> + </select> + <br /> + <br /> + <div id="divLinkTypeUrl"> + <table cellspacing="0" cellpadding="0" width="100%" border="0" dir="ltr"> + <tr> + <td nowrap="nowrap"> + <span fckLang="DlgLnkProto">Protocol</span><br /> + <select id="cmbLinkProtocol"> + <option value="http://" selected="selected">http://</option> + <option value="https://">https://</option> + <option value="ftp://">ftp://</option> + <option value="news://">news://</option> + <option value="" fckLang="DlgLnkProtoOther"><other></option> + </select> + </td> + <td nowrap="nowrap"> </td> + <td nowrap="nowrap" width="100%"> + <span fckLang="DlgLnkURL">URL</span><br /> + <input id="txtUrl" style="WIDTH: 100%" type="text" onkeyup="OnUrlChange();" onchange="OnUrlChange();" /> + </td> + </tr> + </table> + <br /> + <div id="divBrowseServer"> + <input type="button" value="Browse Server" fckLang="DlgBtnBrowseServer" onclick="BrowseServer();" /> + </div> + </div> + <div id="divLinkTypeAnchor" style="DISPLAY: none" align="center"> + <div id="divSelAnchor" style="DISPLAY: none"> + <table cellspacing="0" cellpadding="0" border="0" width="70%"> + <tr> + <td colspan="3"> + <span fckLang="DlgLnkAnchorSel">Select an Anchor</span> + </td> + </tr> + <tr> + <td width="50%"> + <span fckLang="DlgLnkAnchorByName">By Anchor Name</span><br /> + <select id="cmbAnchorName" onchange="GetE('cmbAnchorId').value='';" style="WIDTH: 100%"> + <option value="" selected="selected"></option> + </select> + </td> + <td> </td> + <td width="50%"> + <span fckLang="DlgLnkAnchorById">By Element Id</span><br /> + <select id="cmbAnchorId" onchange="GetE('cmbAnchorName').value='';" style="WIDTH: 100%"> + <option value="" selected="selected"></option> + </select> + </td> + </tr> + </table> + </div> + <div id="divNoAnchor" style="DISPLAY: none"> + <span fckLang="DlgLnkNoAnchors"><No anchors available in the document></span> + </div> + </div> + <div id="divLinkTypeEMail" style="DISPLAY: none"> + <span fckLang="DlgLnkEMail">E-Mail Address</span><br /> + <input id="txtEMailAddress" style="WIDTH: 100%" type="text" /><br /> + <span fckLang="DlgLnkEMailSubject">Message Subject</span><br /> + <input id="txtEMailSubject" style="WIDTH: 100%" type="text" /><br /> + <span fckLang="DlgLnkEMailBody">Message Body</span><br /> + <textarea id="txtEMailBody" style="WIDTH: 100%" rows="3" cols="20"></textarea> + </div> + </div> + <div id="divUpload" style="DISPLAY: none"> + <form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();"> + <span fckLang="DlgLnkUpload">Upload</span><br /> + <input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br /> + <br /> + <input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> + <script type="text/javascript"> + document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; + </script> + </form> + </div> + <div id="divTarget" style="DISPLAY: none"> + <table cellspacing="0" cellpadding="0" width="100%" border="0"> + <tr> + <td nowrap="nowrap"> + <span fckLang="DlgLnkTarget">Target</span><br /> + <select id="cmbTarget" onchange="SetTarget(this.value);"> + <option value="" fckLang="DlgGenNotSet" selected="selected"><not set></option> + <option value="frame" fckLang="DlgLnkTargetFrame"><frame></option> + <option value="popup" fckLang="DlgLnkTargetPopup"><popup window></option> + <option value="_blank" fckLang="DlgLnkTargetBlank">New Window (_blank)</option> + <option value="_top" fckLang="DlgLnkTargetTop">Topmost Window (_top)</option> + <option value="_self" fckLang="DlgLnkTargetSelf">Same Window (_self)</option> + <option value="_parent" fckLang="DlgLnkTargetParent">Parent Window (_parent)</option> + </select> + </td> + <td> </td> + <td id="tdTargetFrame" nowrap="nowrap" width="100%"> + <span fckLang="DlgLnkTargetFrameName">Target Frame Name</span><br /> + <input id="txtTargetFrame" style="WIDTH: 100%" type="text" onkeyup="OnTargetNameChange();" + onchange="OnTargetNameChange();" /> + </td> + <td id="tdPopupName" style="DISPLAY: none" nowrap="nowrap" width="100%"> + <span fckLang="DlgLnkPopWinName">Popup Window Name</span><br /> + <input id="txtPopupName" style="WIDTH: 100%" type="text" /> + </td> + </tr> + </table> + <br /> + <table id="tablePopupFeatures" style="DISPLAY: none" cellspacing="0" cellpadding="0" align="center" + border="0"> + <tr> + <td> + <span fckLang="DlgLnkPopWinFeat">Popup Window Features</span><br /> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td valign="top" nowrap="nowrap" width="50%"> + <input id="chkPopupResizable" name="chkFeature" value="resizable" type="checkbox" /><label for="chkPopupResizable" fckLang="DlgLnkPopResize">Resizable</label><br /> + <input id="chkPopupLocationBar" name="chkFeature" value="location" type="checkbox" /><label for="chkPopupLocationBar" fckLang="DlgLnkPopLocation">Location + Bar</label><br /> + <input id="chkPopupManuBar" name="chkFeature" value="menubar" type="checkbox" /><label for="chkPopupManuBar" fckLang="DlgLnkPopMenu">Menu + Bar</label><br /> + <input id="chkPopupScrollBars" name="chkFeature" value="scrollbars" type="checkbox" /><label for="chkPopupScrollBars" fckLang="DlgLnkPopScroll">Scroll + Bars</label> + </td> + <td></td> + <td valign="top" nowrap="nowrap" width="50%"> + <input id="chkPopupStatusBar" name="chkFeature" value="status" type="checkbox" /><label for="chkPopupStatusBar" fckLang="DlgLnkPopStatus">Status + Bar</label><br /> + <input id="chkPopupToolbar" name="chkFeature" value="toolbar" type="checkbox" /><label for="chkPopupToolbar" fckLang="DlgLnkPopToolbar">Toolbar</label><br /> + <input id="chkPopupFullScreen" name="chkFeature" value="fullscreen" type="checkbox" /><label for="chkPopupFullScreen" fckLang="DlgLnkPopFullScrn">Full + Screen (IE)</label><br /> + <input id="chkPopupDependent" name="chkFeature" value="dependent" type="checkbox" /><label for="chkPopupDependent" fckLang="DlgLnkPopDependent">Dependent + (Netscape)</label> + </td> + </tr> + <tr> + <td valign="top" nowrap="nowrap" width="50%"> </td> + <td></td> + <td valign="top" nowrap="nowrap" width="50%"></td> + </tr> + <tr> + <td valign="top"> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td nowrap="nowrap"><span fckLang="DlgLnkPopWidth">Width</span></td> + <td> <input id="txtPopupWidth" type="text" maxlength="4" size="4" /></td> + </tr> + <tr> + <td nowrap="nowrap"><span fckLang="DlgLnkPopHeight">Height</span></td> + <td> <input id="txtPopupHeight" type="text" maxlength="4" size="4" /></td> + </tr> + </table> + </td> + <td> </td> + <td valign="top"> + <table cellspacing="0" cellpadding="0" border="0"> + <tr> + <td nowrap="nowrap"><span fckLang="DlgLnkPopLeft">Left Position</span></td> + <td> <input id="txtPopupLeft" type="text" maxlength="4" size="4" /></td> + </tr> + <tr> + <td nowrap="nowrap"><span fckLang="DlgLnkPopTop">Top Position</span></td> + <td> <input id="txtPopupTop" type="text" maxlength="4" size="4" /></td> + </tr> + </table> + </td> + </tr> + </table> + </td> + </tr> + </table> + </div> + <div id="divAttribs" style="DISPLAY: none"> + <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> + <tr> + <td valign="top" width="50%"> + <span fckLang="DlgGenId">Id</span><br /> + <input id="txtAttId" style="WIDTH: 100%" type="text" /> + </td> + <td width="1"></td> + <td valign="top"> + <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> + <tr> + <td width="60%"> + <span fckLang="DlgGenLangDir">Language Direction</span><br /> + <select id="cmbAttLangDir" style="WIDTH: 100%"> + <option value="" fckLang="DlgGenNotSet" selected><not set></option> + <option value="ltr" fckLang="DlgGenLangDirLtr">Left to Right (LTR)</option> + <option value="rtl" fckLang="DlgGenLangDirRtl">Right to Left (RTL)</option> + </select> + </td> + <td width="1%"> </td> + <td nowrap="nowrap"><span fckLang="DlgGenAccessKey">Access Key</span><br /> + <input id="txtAttAccessKey" style="WIDTH: 100%" type="text" maxlength="1" size="1" /> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td valign="top" width="50%"> + <span fckLang="DlgGenName">Name</span><br /> + <input id="txtAttName" style="WIDTH: 100%" type="text" /> + </td> + <td width="1"></td> + <td valign="top"> + <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> + <tr> + <td width="60%"> + <span fckLang="DlgGenLangCode">Language Code</span><br /> + <input id="txtAttLangCode" style="WIDTH: 100%" type="text" /> + </td> + <td width="1%"> </td> + <td nowrap="nowrap"> + <span fckLang="DlgGenTabIndex">Tab Index</span><br /> + <input id="txtAttTabIndex" style="WIDTH: 100%" type="text" maxlength="5" size="5" /> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td valign="top" width="50%"> </td> + <td width="1"></td> + <td valign="top"></td> + </tr> + <tr> + <td valign="top" width="50%"> + <span fckLang="DlgGenTitle">Advisory Title</span><br /> + <input id="txtAttTitle" style="WIDTH: 100%" type="text" /> + </td> + <td width="1"> </td> + <td valign="top"> + <span fckLang="DlgGenContType">Advisory Content Type</span><br /> + <input id="txtAttContentType" style="WIDTH: 100%" type="text" /> + </td> + </tr> + <tr> + <td valign="top"> + <span fckLang="DlgGenClass">Stylesheet Classes</span><br /> + <input id="txtAttClasses" style="WIDTH: 100%" type="text" /> + </td> + <td></td> + <td valign="top"> + <span fckLang="DlgGenLinkCharset">Linked Resource Charset</span><br /> + <input id="txtAttCharSet" style="WIDTH: 100%" type="text" /> + </td> + </tr> + </table> + <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0"> + <tr> + <td> + <span fckLang="DlgGenStyle">Style</span><br /> + <input id="txtAttStyle" style="WIDTH: 100%" type="text" /> + </td> + </tr> + </table> + </div> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link/fck_link.js ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_link/fck_link.js Sun Apr 5 19:31:23 2009 @@ -0,0 +1,893 @@ +/* + * 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 == + * + * Scripts related to the Link dialog window (see fck_link.html). + */ + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +var FCK = oEditor.FCK ; +var FCKLang = oEditor.FCKLang ; +var FCKConfig = oEditor.FCKConfig ; +var FCKRegexLib = oEditor.FCKRegexLib ; +var FCKTools = oEditor.FCKTools ; + +//#### Dialog Tabs + +// Set the dialog tabs. +dialog.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; + +if ( !FCKConfig.LinkDlgHideTarget ) + dialog.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; + +if ( FCKConfig.LinkUpload ) + dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; + +if ( !FCKConfig.LinkDlgHideAdvanced ) + dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; + +// Function called when a dialog tag is selected. +function OnDialogTabChange( tabCode ) +{ + ShowE('divInfo' , ( tabCode == 'Info' ) ) ; + ShowE('divTarget' , ( tabCode == 'Target' ) ) ; + ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; + ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; + + dialog.SetAutoSize( true ) ; +} + +//#### Regular Expressions library. +var oRegex = new Object() ; + +oRegex.UriProtocol = /^(((http|https|ftp|news):\/\/)|mailto:)/gi ; + +oRegex.UrlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi ; + +oRegex.UrlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi ; + +oRegex.ReserveTarget = /^_(blank|self|top|parent)$/i ; + +oRegex.PopupUri = /^javascript:void\(\s*window.open\(\s*'([^']+)'\s*,\s*(?:'([^']*)'| null)\s*,\s*'([^']*)'\s*\)\s*\)\s*$/ ; + +// Accessible popups +oRegex.OnClickPopup = /^\s*on[cC]lick="\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'| null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*"$/ ; + +oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ; + +//#### Parser Functions + +var oParser = new Object() ; + +// This method simply returns the two inputs in numerical order. You can even +// provide strings, as the method would parseInt() the values. +oParser.SortNumerical = function(a, b) +{ + return parseInt( a, 10 ) - parseInt( b, 10 ) ; +} + +oParser.ParseEMailParams = function(sParams) +{ + // Initialize the oEMailParams object. + var oEMailParams = new Object() ; + oEMailParams.Subject = '' ; + oEMailParams.Body = '' ; + + var aMatch = sParams.match( /(^|^\?|&)subject=([^&]+)/i ) ; + if ( aMatch ) oEMailParams.Subject = decodeURIComponent( aMatch[2] ) ; + + aMatch = sParams.match( /(^|^\?|&)body=([^&]+)/i ) ; + if ( aMatch ) oEMailParams.Body = decodeURIComponent( aMatch[2] ) ; + + return oEMailParams ; +} + +// This method returns either an object containing the email info, or FALSE +// if the parameter is not an email link. +oParser.ParseEMailUri = function( sUrl ) +{ + // Initializes the EMailInfo object. + var oEMailInfo = new Object() ; + oEMailInfo.Address = '' ; + oEMailInfo.Subject = '' ; + oEMailInfo.Body = '' ; + + var aLinkInfo = sUrl.match( /^(\w+):(.*)$/ ) ; + if ( aLinkInfo && aLinkInfo[1] == 'mailto' ) + { + // This seems to be an unprotected email link. + var aParts = aLinkInfo[2].match( /^([^\?]+)\??(.+)?/ ) ; + if ( aParts ) + { + // Set the e-mail address. + oEMailInfo.Address = aParts[1] ; + + // Look for the optional e-mail parameters. + if ( aParts[2] ) + { + var oEMailParams = oParser.ParseEMailParams( aParts[2] ) ; + oEMailInfo.Subject = oEMailParams.Subject ; + oEMailInfo.Body = oEMailParams.Body ; + } + } + return oEMailInfo ; + } + else if ( aLinkInfo && aLinkInfo[1] == 'javascript' ) + { + // This may be a protected email. + + // Try to match the url against the EMailProtectionFunction. + var func = FCKConfig.EMailProtectionFunction ; + if ( func != null ) + { + try + { + // Escape special chars. + func = func.replace( /([\/^$*+.?()\[\]])/g, '\\$1' ) ; + + // Define the possible keys. + var keys = new Array('NAME', 'DOMAIN', 'SUBJECT', 'BODY') ; + + // Get the order of the keys (hold them in the array <pos>) and + // the function replaced by regular expression patterns. + var sFunc = func ; + var pos = new Array() ; + for ( var i = 0 ; i < keys.length ; i ++ ) + { + var rexp = new RegExp( keys[i] ) ; + var p = func.search( rexp ) ; + if ( p >= 0 ) + { + sFunc = sFunc.replace( rexp, '\'([^\']*)\'' ) ; + pos[pos.length] = p + ':' + keys[i] ; + } + } + + // Sort the available keys. + pos.sort( oParser.SortNumerical ) ; + + // Replace the excaped single quotes in the url, such they do + // not affect the regexp afterwards. + aLinkInfo[2] = aLinkInfo[2].replace( /\\'/g, '###SINGLE_QUOTE###' ) ; + + // Create the regexp and execute it. + var rFunc = new RegExp( '^' + sFunc + '$' ) ; + var aMatch = rFunc.exec( aLinkInfo[2] ) ; + if ( aMatch ) + { + var aInfo = new Array(); + for ( var i = 1 ; i < aMatch.length ; i ++ ) + { + var k = pos[i-1].match(/^\d+:(.+)$/) ; + aInfo[k[1]] = aMatch[i].replace(/###SINGLE_QUOTE###/g, '\'') ; + } + + // Fill the EMailInfo object that will be returned + oEMailInfo.Address = aInfo['NAME'] + '@' + aInfo['DOMAIN'] ; + oEMailInfo.Subject = decodeURIComponent( aInfo['SUBJECT'] ) ; + oEMailInfo.Body = decodeURIComponent( aInfo['BODY'] ) ; + + return oEMailInfo ; + } + } + catch (e) + { + } + } + + // Try to match the email against the encode protection. + var aMatch = aLinkInfo[2].match( /^location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'$/ ) ; + if ( aMatch ) + { + // The link is encoded + oEMailInfo.Address = eval( aMatch[1] ) ; + if ( aMatch[2] ) + { + var oEMailParams = oParser.ParseEMailParams( aMatch[2] ) ; + oEMailInfo.Subject = oEMailParams.Subject ; + oEMailInfo.Body = oEMailParams.Body ; + } + return oEMailInfo ; + } + } + return false; +} + +oParser.CreateEMailUri = function( address, subject, body ) +{ + // Switch for the EMailProtection setting. + switch ( FCKConfig.EMailProtection ) + { + case 'function' : + var func = FCKConfig.EMailProtectionFunction ; + if ( func == null ) + { + if ( FCKConfig.Debug ) + { + alert('EMailProtection alert!\nNo function defined. Please set "FCKConfig.EMailProtectionFunction"') ; + } + return ''; + } + + // Split the email address into name and domain parts. + var aAddressParts = address.split( '@', 2 ) ; + if ( aAddressParts[1] == undefined ) + { + aAddressParts[1] = '' ; + } + + // Replace the keys by their values (embedded in single quotes). + func = func.replace(/NAME/g, "'" + aAddressParts[0].replace(/'/g, '\\\'') + "'") ; + func = func.replace(/DOMAIN/g, "'" + aAddressParts[1].replace(/'/g, '\\\'') + "'") ; + func = func.replace(/SUBJECT/g, "'" + encodeURIComponent( subject ).replace(/'/g, '\\\'') + "'") ; + func = func.replace(/BODY/g, "'" + encodeURIComponent( body ).replace(/'/g, '\\\'') + "'") ; + + return 'javascript:' + func ; + + case 'encode' : + var aParams = [] ; + var aAddressCode = [] ; + + if ( subject.length > 0 ) + aParams.push( 'subject='+ encodeURIComponent( subject ) ) ; + if ( body.length > 0 ) + aParams.push( 'body=' + encodeURIComponent( body ) ) ; + for ( var i = 0 ; i < address.length ; i++ ) + aAddressCode.push( address.charCodeAt( i ) ) ; + + return 'javascript:location.href=\'mailto:\'+String.fromCharCode(' + aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\'' ; + } + + // EMailProtection 'none' + + var sBaseUri = 'mailto:' + address ; + + var sParams = '' ; + + if ( subject.length > 0 ) + sParams = '?subject=' + encodeURIComponent( subject ) ; + + if ( body.length > 0 ) + { + sParams += ( sParams.length == 0 ? '?' : '&' ) ; + sParams += 'body=' + encodeURIComponent( body ) ; + } + + return sBaseUri + sParams ; +} + +//#### Initialization Code + +// oLink: The actual selected link in the editor. +var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; +if ( oLink ) + FCK.Selection.SelectNode( oLink ) ; + +window.onload = function() +{ + // Translate the dialog box texts. + oEditor.FCKLanguageManager.TranslatePage(document) ; + + // Fill the Anchor Names and Ids combos. + LoadAnchorNamesAndIds() ; + + // Load the selected link information (if any). + LoadSelection() ; + + // Update the dialog box. + SetLinkType( GetE('cmbLinkType').value ) ; + + // Show/Hide the "Browse Server" button. + GetE('divBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; + + // Show the initial dialog content. + GetE('divInfo').style.display = '' ; + + // Set the actual uploader URL. + if ( FCKConfig.LinkUpload ) + GetE('frmUpload').action = FCKConfig.LinkUploadURL ; + + // Set the default target (from configuration). + SetDefaultTarget() ; + + // Activate the "OK" button. + dialog.SetOkButton( true ) ; + + // Select the first field. + switch( GetE('cmbLinkType').value ) + { + case 'url' : + SelectField( 'txtUrl' ) ; + break ; + case 'email' : + SelectField( 'txtEMailAddress' ) ; + break ; + case 'anchor' : + if ( GetE('divSelAnchor').style.display != 'none' ) + SelectField( 'cmbAnchorName' ) ; + else + SelectField( 'cmbLinkType' ) ; + } +} + +var bHasAnchors ; + +function LoadAnchorNamesAndIds() +{ + // Since version 2.0, the anchors are replaced in the DOM by IMGs so the user see the icon + // to edit them. So, we must look for that images now. + var aAnchors = new Array() ; + var i ; + var oImages = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ; + for( i = 0 ; i < oImages.length ; i++ ) + { + if ( oImages[i].getAttribute('_fckanchor') ) + aAnchors[ aAnchors.length ] = oEditor.FCK.GetRealElement( oImages[i] ) ; + } + + // Add also real anchors + var oLinks = oEditor.FCK.EditorDocument.getElementsByTagName( 'A' ) ; + for( i = 0 ; i < oLinks.length ; i++ ) + { + if ( oLinks[i].name && ( oLinks[i].name.length > 0 ) ) + aAnchors[ aAnchors.length ] = oLinks[i] ; + } + + var aIds = FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ; + + bHasAnchors = ( aAnchors.length > 0 || aIds.length > 0 ) ; + + for ( i = 0 ; i < aAnchors.length ; i++ ) + { + var sName = aAnchors[i].name ; + if ( sName && sName.length > 0 ) + FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; + } + + for ( i = 0 ; i < aIds.length ; i++ ) + { + FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ; + } + + ShowE( 'divSelAnchor' , bHasAnchors ) ; + ShowE( 'divNoAnchor' , !bHasAnchors ) ; +} + +function LoadSelection() +{ + if ( !oLink ) return ; + + var sType = 'url' ; + + // Get the actual Link href. + var sHRef = oLink.getAttribute( '_fcksavedurl' ) ; + if ( sHRef == null ) + sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; + + // Look for a popup javascript link. + var oPopupMatch = oRegex.PopupUri.exec( sHRef ) ; + if( oPopupMatch ) + { + GetE('cmbTarget').value = 'popup' ; + sHRef = oPopupMatch[1] ; + FillPopupFields( oPopupMatch[2], oPopupMatch[3] ) ; + SetTarget( 'popup' ) ; + } + + // Accessible popups, the popup data is in the onclick attribute + if ( !oPopupMatch ) + { + var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; + if ( onclick ) + { + // Decode the protected string + onclick = decodeURIComponent( onclick ) ; + + oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; + if( oPopupMatch ) + { + GetE( 'cmbTarget' ).value = 'popup' ; + FillPopupFields( oPopupMatch[1], oPopupMatch[2] ) ; + SetTarget( 'popup' ) ; + } + } + } + + // Search for the protocol. + var sProtocol = oRegex.UriProtocol.exec( sHRef ) ; + + // Search for a protected email link. + var oEMailInfo = oParser.ParseEMailUri( sHRef ); + + if ( oEMailInfo ) + { + sType = 'email' ; + + GetE('txtEMailAddress').value = oEMailInfo.Address ; + GetE('txtEMailSubject').value = oEMailInfo.Subject ; + GetE('txtEMailBody').value = oEMailInfo.Body ; + } + else if ( sProtocol ) + { + sProtocol = sProtocol[0].toLowerCase() ; + GetE('cmbLinkProtocol').value = sProtocol ; + + // Remove the protocol and get the remaining URL. + var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ; + sType = 'url' ; + GetE('txtUrl').value = sUrl ; + } + else if ( sHRef.substr(0,1) == '#' && sHRef.length > 1 ) // It is an anchor link. + { + sType = 'anchor' ; + GetE('cmbAnchorName').value = GetE('cmbAnchorId').value = sHRef.substr(1) ; + } + else // It is another type of link. + { + sType = 'url' ; + + GetE('cmbLinkProtocol').value = '' ; + GetE('txtUrl').value = sHRef ; + } + + if ( !oPopupMatch ) + { + // Get the target. + var sTarget = oLink.target ; + + if ( sTarget && sTarget.length > 0 ) + { + if ( oRegex.ReserveTarget.test( sTarget ) ) + { + sTarget = sTarget.toLowerCase() ; + GetE('cmbTarget').value = sTarget ; + } + else + GetE('cmbTarget').value = 'frame' ; + GetE('txtTargetFrame').value = sTarget ; + } + } + + // Get Advances Attributes + GetE('txtAttId').value = oLink.id ; + GetE('txtAttName').value = oLink.name ; + GetE('cmbAttLangDir').value = oLink.dir ; + GetE('txtAttLangCode').value = oLink.lang ; + GetE('txtAttAccessKey').value = oLink.accessKey ; + GetE('txtAttTabIndex').value = oLink.tabIndex <= 0 ? '' : oLink.tabIndex ; + GetE('txtAttTitle').value = oLink.title ; + GetE('txtAttContentType').value = oLink.type ; + GetE('txtAttCharSet').value = oLink.charset ; + + var sClass ; + if ( oEditor.FCKBrowserInfo.IsIE ) + { + sClass = oLink.getAttribute('className',2) || '' ; + // Clean up temporary classes for internal use: + sClass = sClass.replace( FCKRegexLib.FCK_Class, '' ) ; + + GetE('txtAttStyle').value = oLink.style.cssText ; + } + else + { + sClass = oLink.getAttribute('class',2) || '' ; + GetE('txtAttStyle').value = oLink.getAttribute('style',2) || '' ; + } + GetE('txtAttClasses').value = sClass ; + + // Update the Link type combo. + GetE('cmbLinkType').value = sType ; +} + +//#### Link type selection. +function SetLinkType( linkType ) +{ + ShowE('divLinkTypeUrl' , (linkType == 'url') ) ; + ShowE('divLinkTypeAnchor' , (linkType == 'anchor') ) ; + ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; + + if ( !FCKConfig.LinkDlgHideTarget ) + dialog.SetTabVisibility( 'Target' , (linkType == 'url') ) ; + + if ( FCKConfig.LinkUpload ) + dialog.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; + + if ( !FCKConfig.LinkDlgHideAdvanced ) + dialog.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; + + if ( linkType == 'email' ) + dialog.SetAutoSize( true ) ; +} + +//#### Target type selection. +function SetTarget( targetType ) +{ + GetE('tdTargetFrame').style.display = ( targetType == 'popup' ? 'none' : '' ) ; + GetE('tdPopupName').style.display = + GetE('tablePopupFeatures').style.display = ( targetType == 'popup' ? '' : 'none' ) ; + + switch ( targetType ) + { + case "_blank" : + case "_self" : + case "_parent" : + case "_top" : + GetE('txtTargetFrame').value = targetType ; + break ; + case "" : + GetE('txtTargetFrame').value = '' ; + break ; + } + + if ( targetType == 'popup' ) + dialog.SetAutoSize( true ) ; +} + +//#### Called while the user types the URL. +function OnUrlChange() +{ + var sUrl = GetE('txtUrl').value ; + var sProtocol = oRegex.UrlOnChangeProtocol.exec( sUrl ) ; + + if ( sProtocol ) + { + sUrl = sUrl.substr( sProtocol[0].length ) ; + GetE('txtUrl').value = sUrl ; + GetE('cmbLinkProtocol').value = sProtocol[0].toLowerCase() ; + } + else if ( oRegex.UrlOnChangeTestOther.test( sUrl ) ) + { + GetE('cmbLinkProtocol').value = '' ; + } +} + +//#### Called while the user types the target name. +function OnTargetNameChange() +{ + var sFrame = GetE('txtTargetFrame').value ; + + if ( sFrame.length == 0 ) + GetE('cmbTarget').value = '' ; + else if ( oRegex.ReserveTarget.test( sFrame ) ) + GetE('cmbTarget').value = sFrame.toLowerCase() ; + else + GetE('cmbTarget').value = 'frame' ; +} + +// Accessible popups +function BuildOnClickPopup() +{ + var sWindowName = "'" + GetE('txtPopupName').value.replace(/\W/gi, "") + "'" ; + + var sFeatures = '' ; + var aChkFeatures = document.getElementsByName( 'chkFeature' ) ; + for ( var i = 0 ; i < aChkFeatures.length ; i++ ) + { + if ( i > 0 ) sFeatures += ',' ; + sFeatures += aChkFeatures[i].value + '=' + ( aChkFeatures[i].checked ? 'yes' : 'no' ) ; + } + + if ( GetE('txtPopupWidth').value.length > 0 ) sFeatures += ',width=' + GetE('txtPopupWidth').value ; + if ( GetE('txtPopupHeight').value.length > 0 ) sFeatures += ',height=' + GetE('txtPopupHeight').value ; + if ( GetE('txtPopupLeft').value.length > 0 ) sFeatures += ',left=' + GetE('txtPopupLeft').value ; + if ( GetE('txtPopupTop').value.length > 0 ) sFeatures += ',top=' + GetE('txtPopupTop').value ; + + if ( sFeatures != '' ) + sFeatures = sFeatures + ",status" ; + + return ( "window.open(this.href," + sWindowName + ",'" + sFeatures + "'); return false" ) ; +} + +//#### Fills all Popup related fields. +function FillPopupFields( windowName, features ) +{ + if ( windowName ) + GetE('txtPopupName').value = windowName ; + + var oFeatures = new Object() ; + var oFeaturesMatch ; + while( ( oFeaturesMatch = oRegex.PopupFeatures.exec( features ) ) != null ) + { + var sValue = oFeaturesMatch[2] ; + if ( sValue == ( 'yes' || '1' ) ) + oFeatures[ oFeaturesMatch[1] ] = true ; + else if ( ! isNaN( sValue ) && sValue != 0 ) + oFeatures[ oFeaturesMatch[1] ] = sValue ; + } + + // Update all features check boxes. + var aChkFeatures = document.getElementsByName('chkFeature') ; + for ( var i = 0 ; i < aChkFeatures.length ; i++ ) + { + if ( oFeatures[ aChkFeatures[i].value ] ) + aChkFeatures[i].checked = true ; + } + + // Update position and size text boxes. + if ( oFeatures['width'] ) GetE('txtPopupWidth').value = oFeatures['width'] ; + if ( oFeatures['height'] ) GetE('txtPopupHeight').value = oFeatures['height'] ; + if ( oFeatures['left'] ) GetE('txtPopupLeft').value = oFeatures['left'] ; + if ( oFeatures['top'] ) GetE('txtPopupTop').value = oFeatures['top'] ; +} + +//#### The OK button was hit. +function Ok() +{ + var sUri, sInnerHtml ; + oEditor.FCKUndo.SaveUndoStep() ; + + switch ( GetE('cmbLinkType').value ) + { + case 'url' : + sUri = GetE('txtUrl').value ; + + if ( sUri.length == 0 ) + { + alert( FCKLang.DlnLnkMsgNoUrl ) ; + return false ; + } + + sUri = GetE('cmbLinkProtocol').value + sUri ; + + break ; + + case 'email' : + sUri = GetE('txtEMailAddress').value ; + + if ( sUri.length == 0 ) + { + alert( FCKLang.DlnLnkMsgNoEMail ) ; + return false ; + } + + sUri = oParser.CreateEMailUri( + sUri, + GetE('txtEMailSubject').value, + GetE('txtEMailBody').value ) ; + break ; + + case 'anchor' : + var sAnchor = GetE('cmbAnchorName').value ; + if ( sAnchor.length == 0 ) sAnchor = GetE('cmbAnchorId').value ; + + if ( sAnchor.length == 0 ) + { + alert( FCKLang.DlnLnkMsgNoAnchor ) ; + return false ; + } + + sUri = '#' + sAnchor ; + break ; + } + + // If no link is selected, create a new one (it may result in more than one link creation - #220). + var aLinks = oLink ? [ oLink ] : oEditor.FCK.CreateLink( sUri, true ) ; + + // If no selection, no links are created, so use the uri as the link text (by dom, 2006-05-26) + var aHasSelection = ( aLinks.length > 0 ) ; + if ( !aHasSelection ) + { + sInnerHtml = sUri; + + // Built a better text for empty links. + switch ( GetE('cmbLinkType').value ) + { + // anchor: use old behavior --> return true + case 'anchor': + sInnerHtml = sInnerHtml.replace( /^#/, '' ) ; + break ; + + // url: try to get path + case 'url': + var oLinkPathRegEx = new RegExp("//?([^?\"']+)([?].*)?$") ; + var asLinkPath = oLinkPathRegEx.exec( sUri ) ; + if (asLinkPath != null) + sInnerHtml = asLinkPath[1]; // use matched path + break ; + + // mailto: try to get email address + case 'email': + sInnerHtml = GetE('txtEMailAddress').value ; + break ; + } + + // Create a new (empty) anchor. + aLinks = [ oEditor.FCK.InsertElement( 'a' ) ] ; + } + + for ( var i = 0 ; i < aLinks.length ; i++ ) + { + oLink = aLinks[i] ; + + if ( aHasSelection ) + sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL). + + oLink.href = sUri ; + SetAttribute( oLink, '_fcksavedurl', sUri ) ; + + var onclick; + // Accessible popups + if( GetE('cmbTarget').value == 'popup' ) + { + onclick = BuildOnClickPopup() ; + // Encode the attribute + onclick = encodeURIComponent( " onclick=\"" + onclick + "\"" ) ; + SetAttribute( oLink, 'onclick_fckprotectedatt', onclick ) ; + } + else + { + // Check if the previous onclick was for a popup: + // In that case remove the onclick handler. + onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; + if ( onclick ) + { + // Decode the protected string + onclick = decodeURIComponent( onclick ) ; + + if( oRegex.OnClickPopup.test( onclick ) ) + SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; + } + } + + oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML + + // Target + if( GetE('cmbTarget').value != 'popup' ) + SetAttribute( oLink, 'target', GetE('txtTargetFrame').value ) ; + else + SetAttribute( oLink, 'target', null ) ; + + // Let's set the "id" only for the first link to avoid duplication. + if ( i == 0 ) + SetAttribute( oLink, 'id', GetE('txtAttId').value ) ; + + // Advances Attributes + SetAttribute( oLink, 'name' , GetE('txtAttName').value ) ; + SetAttribute( oLink, 'dir' , GetE('cmbAttLangDir').value ) ; + SetAttribute( oLink, 'lang' , GetE('txtAttLangCode').value ) ; + SetAttribute( oLink, 'accesskey', GetE('txtAttAccessKey').value ) ; + SetAttribute( oLink, 'tabindex' , ( GetE('txtAttTabIndex').value > 0 ? GetE('txtAttTabIndex').value : null ) ) ; + SetAttribute( oLink, 'title' , GetE('txtAttTitle').value ) ; + SetAttribute( oLink, 'type' , GetE('txtAttContentType').value ) ; + SetAttribute( oLink, 'charset' , GetE('txtAttCharSet').value ) ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + { + var sClass = GetE('txtAttClasses').value ; + // If it's also an anchor add an internal class + if ( GetE('txtAttName').value.length != 0 ) + sClass += ' FCK__AnchorC' ; + SetAttribute( oLink, 'className', sClass ) ; + + oLink.style.cssText = GetE('txtAttStyle').value ; + } + else + { + SetAttribute( oLink, 'class', GetE('txtAttClasses').value ) ; + SetAttribute( oLink, 'style', GetE('txtAttStyle').value ) ; + } + } + + // Select the (first) link. + oEditor.FCKSelection.SelectNode( aLinks[0] ); + + return true ; +} + +function BrowseServer() +{ + OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; +} + +function SetUrl( url ) +{ + GetE('txtUrl').value = url ; + OnUrlChange() ; + dialog.SetSelectedTab( 'Info' ) ; +} + +function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) +{ + // Remove animation + window.parent.Throbber.Hide() ; + GetE( 'divUpload' ).style.display = '' ; + + switch ( errorNumber ) + { + case 0 : // No errors + alert( 'Your file has been successfully uploaded' ) ; + break ; + case 1 : // Custom error + alert( customMsg ) ; + return ; + case 101 : // Custom warning + alert( customMsg ) ; + break ; + case 201 : + alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; + break ; + case 202 : + alert( 'Invalid file type' ) ; + return ; + case 203 : + alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; + return ; + case 500 : + alert( 'The connector is disabled' ) ; + break ; + default : + alert( 'Error on file upload. Error number: ' + errorNumber ) ; + return ; + } + + SetUrl( fileUrl ) ; + GetE('frmUpload').reset() ; +} + +var oUploadAllowedExtRegex = new RegExp( FCKConfig.LinkUploadAllowedExtensions, 'i' ) ; +var oUploadDeniedExtRegex = new RegExp( FCKConfig.LinkUploadDeniedExtensions, 'i' ) ; + +function CheckUpload() +{ + var sFile = GetE('txtUploadFile').value ; + + if ( sFile.length == 0 ) + { + alert( 'Please select a file to upload' ) ; + return false ; + } + + if ( ( FCKConfig.LinkUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || + ( FCKConfig.LinkUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) + { + OnUploadCompleted( 202 ) ; + return false ; + } + + // Show animation + window.parent.Throbber.Show( 100 ) ; + GetE( 'divUpload' ).style.display = 'none' ; + + return true ; +} + +function SetDefaultTarget() +{ + var target = FCKConfig.DefaultLinkTarget || '' ; + + if ( oLink || target.length == 0 ) + return ; + + switch ( target ) + { + case '_blank' : + case '_self' : + case '_parent' : + case '_top' : + GetE('cmbTarget').value = target ; + break ; + default : + GetE('cmbTarget').value = 'frame' ; + break ; + } + + GetE('txtTargetFrame').value = target ; +} Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_listprop.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_listprop.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,120 @@ +<!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 == + * + * Bulleted List dialog window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta content="noindex, nofollow" name="robots" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +// Gets the document DOM +var oDOM = oEditor.FCK.EditorDocument ; +var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ; + +var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( sListType ) ; +var oActiveSel ; + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( sListType == 'UL' ) + oActiveSel = GetE('selBulleted') ; + else + { + if ( oActiveEl ) + { + oActiveSel = GetE('selNumbered') ; + GetE('eStart').style.display = '' ; + GetE('txtStartPosition').value = GetAttribute( oActiveEl, 'start' ) ; + } + } + + oActiveSel.style.display = '' ; + + if ( oActiveEl ) + { + if ( oActiveEl.getAttribute('type') ) + oActiveSel.value = oActiveEl.getAttribute('type') ; + } + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + + SelectField( sListType == 'OL' ? 'txtStartPosition' : 'selBulleted' ) ; +} + +function Ok() +{ + if ( oActiveEl ){ + SetAttribute( oActiveEl, 'type' , oActiveSel.value ) ; + if(oActiveEl.tagName == 'OL') + SetAttribute( oActiveEl, 'start', GetE('txtStartPosition').value ) ; + } + + return true ; +} + + </script> +</head> +<body style="overflow: hidden"> + <table width="100%" style="height: 100%"> + <tr> + <td style="text-align:center"> + <table cellspacing="0" cellpadding="0" border="0" style="margin-left: auto; margin-right: auto;"> + <tr> + <td id="eStart" style="display: none; padding-right: 5px; padding-left: 5px"> + <span fcklang="DlgLstStart">Start</span><br /> + <input type="text" id="txtStartPosition" size="5" /> + </td> + <td style="padding-right: 5px; padding-left: 5px"> + <span fcklang="DlgLstType">List Type</span><br /> + <select id="selBulleted" style="display: none"> + <option value="" selected="selected"></option> + <option value="circle" fcklang="DlgLstTypeCircle">Circle</option> + <option value="disc" fcklang="DlgLstTypeDisc">Disc</option> + <option value="square" fcklang="DlgLstTypeSquare">Square</option> + </select> + <select id="selNumbered" style="display: none"> + <option value="" selected="selected"></option> + <option value="1" fcklang="DlgLstTypeNumbers">Numbers (1, 2, 3)</option> + <option value="a" fcklang="DlgLstTypeLCase">Lowercase Letters (a, b, c)</option> + <option value="A" fcklang="DlgLstTypeUCase">Uppercase Letters (A, B, C)</option> + <option value="i" fcklang="DlgLstTypeSRoman">Small Roman Numerals (i, ii, iii)</option> + <option value="I" fcklang="DlgLstTypeLRoman">Large Roman Numerals (I, II, III)</option> + </select> + + </td> + </tr> + </table> + </td> + </tr> + </table> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_paste.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_paste.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,346 @@ +<!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 dialog is shown when, for some reason (usually security settings), + * the user is not able to paste data from the clipboard to the editor using + * the toolbar buttons or the context menu. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="robots" content="noindex, nofollow" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; +var FCK = oEditor.FCK; +var FCKTools = oEditor.FCKTools ; +var FCKConfig = oEditor.FCKConfig ; +var FCKBrowserInfo = oEditor.FCKBrowserInfo ; + +window.onload = function () +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + var sPastingType = dialog.Args().CustomValue ; + + if ( sPastingType == 'Word' || sPastingType == 'Security' ) + { + if ( sPastingType == 'Security' ) + document.getElementById( 'xSecurityMsg' ).style.display = '' ; + + // For document.domain compatibility (#123) we must do all the magic in + // the URL for IE. + var sFrameUrl = !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ? + 'javascript:void(0)' : + 'javascript:void( (function(){' + + 'document.open() ;' + + 'document.domain=\'' + document.domain + '\' ;' + + 'document.write(\'<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>\') ;' + + 'document.close() ;' + + 'document.body.contentEditable = true ;' + + 'window.focus() ;' + + '})() )' ; + + var eFrameSpace = document.getElementById( 'xFrameSpace' ) ; + eFrameSpace.innerHTML = '<iframe id="frmData" src="' + sFrameUrl + '" ' + + 'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"><\/iframe>' ; + + var oFrame = eFrameSpace.firstChild ; + + if ( !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ) + { + // Avoid errors if the pasted content has any script that fails: #389 + var oDoc = oFrame.contentWindow.document ; + oDoc.open() ; + oDoc.write('<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>') ; + oDoc.close() ; + + if ( FCKBrowserInfo.IsIE ) + oDoc.body.contentEditable = true ; + else + oDoc.designMode = 'on' ; + + oFrame.contentWindow.focus(); + } + } + else + { + document.getElementById('txtData').style.display = '' ; + } + + if ( sPastingType != 'Word' ) + document.getElementById('oWordCommands').style.display = 'none' ; + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; +} + +function Ok() +{ + // Before doing anything, save undo snapshot. + oEditor.FCKUndo.SaveUndoStep() ; + + var sHtml ; + + var sPastingType = dialog.Args().CustomValue ; + + if ( sPastingType == 'Word' || sPastingType == 'Security' ) + { + var oFrame = document.getElementById('frmData') ; + var oBody ; + + if ( oFrame.contentDocument ) + oBody = oFrame.contentDocument.body ; + else + oBody = oFrame.contentWindow.document.body ; + + if ( sPastingType == 'Word' ) + { + // If a plugin creates a FCK.CustomCleanWord function it will be called instead of the default one + if ( typeof( FCK.CustomCleanWord ) == 'function' ) + sHtml = FCK.CustomCleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ; + else + sHtml = CleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ; + } + else + sHtml = oBody.innerHTML ; + + // Fix relative anchor URLs (IE automatically adds the current page URL). + var re = new RegExp( window.location + "#", "g" ) ; + sHtml = sHtml.replace( re, '#') ; + } + else + { + sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value ) ; + sHtml = FCKTools.ProcessLineBreaks( oEditor, FCKConfig, sHtml ) ; + + // FCK.InsertHtml() does not work for us, since document fragments cannot contain node fragments. :( + // Use the marker method instead. It's primitive, but it works. + var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; + var oDoc = oEditor.FCK.EditorDocument ; + dialog.Selection.EnsureSelection() ; + range.MoveToSelection() ; + range.DeleteContents() ; + var marker = [] ; + for ( var i = 0 ; i < 5 ; i++ ) + marker.push( parseInt(Math.random() * 100000, 10 ) ) ; + marker = marker.join( "" ) ; + range.InsertNode ( oDoc.createTextNode( marker ) ) ; + var bookmark = range.CreateBookmark() ; + + // Now we've got a marker indicating the paste position in the editor document. + // Find its position in the HTML code. + var htmlString = oDoc.body.innerHTML ; + var index = htmlString.indexOf( marker ) ; + + // Split it the HTML code up, add the code we generated, and put them back together. + var htmlList = [] ; + htmlList.push( htmlString.substr( 0, index ) ) ; + htmlList.push( sHtml ) ; + htmlList.push( htmlString.substr( index + marker.length ) ) ; + htmlString = htmlList.join( "" ) ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + oEditor.FCK.SetInnerHtml( htmlString ) ; + else + oDoc.body.innerHTML = htmlString ; + + range.MoveToBookmark( bookmark ) ; + range.Collapse( false ) ; + range.Select() ; + range.Release() ; + return true ; + } + + oEditor.FCK.InsertHtml( sHtml ) ; + + return true ; +} + +// This function will be called from the PasteFromWord dialog (fck_paste.html) +// Input: oNode a DOM node that contains the raw paste from the clipboard +// bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog +// Output: the cleaned string +function CleanWord( oNode, bIgnoreFont, bRemoveStyles ) +{ + var html = oNode.innerHTML ; + + html = html.replace(/<o:p>\s*<\/o:p>/g, '') ; + html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, ' ') ; + + // Remove mso-xxx styles. + html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '' ) ; + + // Remove margin styles. + html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, '' ) ; + html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ; + + html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, '' ) ; + html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ; + + html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ; + + html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ; + + html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ; + + html = html.replace( /\s*tab-stops:[^;"]*;?/gi, '' ) ; + html = html.replace( /\s*tab-stops:[^"]*/gi, '' ) ; + + // Remove FONT face attributes. + if ( bIgnoreFont ) + { + html = html.replace( /\s*face="[^"]*"/gi, '' ) ; + html = html.replace( /\s*face=[^ >]*/gi, '' ) ; + + html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, '' ) ; + } + + // Remove Class attributes + html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ; + + // Remove styles. + if ( bRemoveStyles ) + html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ; + + // Remove style, meta and link tags + html = html.replace( /<STYLE[^>]*>[\s\S]*?<\/STYLE[^>]*>/gi, '' ) ; + html = html.replace( /<(?:META|LINK)[^>]*>\s*/gi, '' ) ; + + // Remove empty styles. + html = html.replace( /\s*style="\s*"/gi, '' ) ; + + html = html.replace( /<SPAN\s*[^>]*>\s* \s*<\/SPAN>/gi, ' ' ) ; + + html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ; + + // Remove Lang attributes + html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ; + + html = html.replace( /<SPAN\s*>([\s\S]*?)<\/SPAN>/gi, '$1' ) ; + + html = html.replace( /<FONT\s*>([\s\S]*?)<\/FONT>/gi, '$1' ) ; + + // Remove XML elements and declarations + html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ; + + // Remove w: tags with contents. + html = html.replace( /<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '' ) ; + + // Remove Tags with XML namespace declarations: <o:p><\/o:p> + html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ; + + // Remove comments [SF BUG-1481861]. + html = html.replace(/<\!--[\s\S]*?-->/g, '' ) ; + + html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ; + + html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ; + + // Remove "display:none" tags. + html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none[\s\S]*?<\/\1>/ig, '' ) ; + + // Remove language tags + html = html.replace( /<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3") ; + + // Remove onmouseover and onmouseout events (from MS Word comments effect) + html = html.replace( /<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi, "<$1$3") ; + html = html.replace( /<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi, "<$1$3") ; + + if ( FCKConfig.CleanWordKeepsStructure ) + { + // The original <Hn> tag send from Word is something like this: <Hn style="margin-top:0px;margin-bottom:0px"> + html = html.replace( /<H(\d)([^>]*)>/gi, '<h$1>' ) ; + + // Word likes to insert extra <font> tags, when using MSIE. (Wierd). + html = html.replace( /<(H\d)><FONT[^>]*>([\s\S]*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' ); + html = html.replace( /<(H\d)><EM>([\s\S]*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' ); + } + else + { + html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ; + html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ; + html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ; + html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ; + html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ; + html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ; + + html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ; + + // Transform <P> to <DIV> + var re = new RegExp( '(<P)([^>]*>[\\s\\S]*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error + html = html.replace( re, '<div$2<\/div>' ) ; + + // Remove empty tags (three times, just to be sure). + // This also removes any empty anchor + html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ; + html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ; + html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ; + } + + return html ; +} + + </script> + +</head> +<body style="overflow: hidden"> + <table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 98%"> + <tr> + <td> + <div id="xSecurityMsg" style="display: none"> + <span fcklang="DlgPasteSec">Because of your browser security settings, + the editor is not able to access your clipboard data directly. You are required + to paste it again in this window.</span><br /> + + </div> + <div> + <span fcklang="DlgPasteMsg2">Please paste inside the following box using the keyboard + (<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</span><br /> + + </div> + </td> + </tr> + <tr> + <td id="xFrameSpace" valign="top" height="100%" style="border: #000000 1px solid"> + <textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none; + width: 99%; height: 98%"></textarea> + </td> + </tr> + <tr id="oWordCommands"> + <td> + + <input id="chkRemoveFont" type="checkbox" checked="checked" /> + <label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont"> + Ignore Font Face definitions</label> + <br /> + <input id="chkRemoveStyles" type="checkbox" /> + <label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles"> + Remove Styles definitions</label> + + </td> + </tr> + </table> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_radiobutton.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_radiobutton.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,104 @@ +<!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 == + * + * Radio Button dialog window. +--> +<html> + <head> + <title>Radio Button Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta content="noindex, nofollow" name="robots"> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +// Gets the document DOM +var oDOM = oEditor.FCK.EditorDocument ; + +var oActiveEl = dialog.Selection.GetSelectedElement() ; + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' ) + { + GetE('txtName').value = oActiveEl.name ; + GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ; + GetE('txtSelected').checked = oActiveEl.checked ; + } + else + oActiveEl = null ; + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + SelectField( 'txtName' ) ; +} + +function Ok() +{ + oEditor.FCKUndo.SaveUndoStep() ; + + oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'radio' } ) ; + + if ( oEditor.FCKBrowserInfo.IsIE ) + oActiveEl.value = GetE('txtValue').value ; + else + SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; + + var bIsChecked = GetE('txtSelected').checked ; + SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox + oActiveEl.checked = bIsChecked ; + + return true ; +} + + </script> + </head> + <body style="OVERFLOW: hidden" scroll="no"> + <table height="100%" width="100%"> + <tr> + <td align="center"> + <table border="0" cellpadding="0" cellspacing="0" width="80%"> + <tr> + <td> + <span fckLang="DlgCheckboxName">Name</span><br> + <input type="text" size="20" id="txtName" style="WIDTH: 100%"> + </td> + </tr> + <tr> + <td> + <span fckLang="DlgCheckboxValue">Value</span><br> + <input type="text" size="20" id="txtValue" style="WIDTH: 100%"> + </td> + </tr> + <tr> + <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td> + </tr> + </table> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_replace.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_replace.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,648 @@ +<!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 == + * + * "Find" and "Replace" dialog box window. +--> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta content="noindex, nofollow" name="robots" /> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; +var dialogArguments = dialog.Args() ; + +var FCKLang = oEditor.FCKLang ; +var FCKDomTools = oEditor.FCKDomTools ; +var FCKDomRange = oEditor.FCKDomRange ; +var FCKListsLib = oEditor.FCKListsLib ; +var FCKTools = oEditor.FCKTools ; +var EditorDocument = oEditor.FCK.EditorDocument ; +var HighlightStyle = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ) ; + +dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ; +dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ; +var idMap = {} ; + +function OnDialogTabChange( tabCode ) +{ + ShowE( 'divFind', ( tabCode == 'Find' ) ) ; + ShowE( 'divReplace', ( tabCode == 'Replace' ) ) ; + idMap['FindText'] = 'txtFind' + tabCode ; + idMap['CheckCase'] = 'chkCase' + tabCode ; + idMap['CheckWord'] = 'chkWord' + tabCode ; + + if ( tabCode == 'Replace' ) + dialog.SetAutoSize( true ) ; +} + +GetNextNonEmptyTextNode = function( node, stopNode ) +{ + while ( ( node = FCKDomTools.GetNextSourceNode( node, false, 3, stopNode ) ) && node && node.length < 1 ) + 1 ; + return node ; +} + +CharacterCursor = function( arg ) +{ + if ( arg.nodeType && arg.nodeType == 9 ) + { + this._textNode = GetNextNonEmptyTextNode( arg.body, arg.documentElement ) ; + this._offset = 0 ; + this._doc = arg ; + } + else + { + this._textNode = arguments[0] ; + this._offset = arguments[1] ; + this._doc = FCKTools.GetElementDocument( arguments[0] ) ; + } +} +CharacterCursor.prototype = +{ + GetCharacter : function() + { + return ( this._textNode && this._textNode.nodeValue.charAt( this._offset ) ) || null ; + }, + + // Non-normalized. + GetTextNode : function() + { + return this._textNode ; + }, + + // Non-normalized. + GetIndex : function() + { + return this._offset ; + }, + + // Return value means whehther we've crossed a line break or a paragraph boundary. + MoveNext : function() + { + if ( this._offset < this._textNode.length - 1 ) + { + this._offset++ ; + return false ; + } + + var crossed = false ; + var curNode = this._textNode ; + while ( ( curNode = FCKDomTools.GetNextSourceNode( curNode ) ) + && curNode && ( curNode.nodeType != 3 || curNode.length < 1 ) ) + { + var tag = curNode.nodeName.toLowerCase() ; + if ( FCKListsLib.BlockElements[tag] || tag == 'br' ) + crossed = true ; + } + + this._textNode = curNode ; + this._offset = 0 ; + return crossed ; + }, + + // Return value means whehther we've crossed a line break or a paragraph boundary. + MoveBack : function() + { + if ( this._offset > 0 && this._textNode.length > 0 ) + { + this._offset = Math.min( this._offset - 1, this._textNode.length - 1 ) ; + return false ; + } + + var crossed = false ; + var curNode = this._textNode ; + while ( ( curNode = FCKDomTools.GetPreviousSourceNode( curNode ) ) + && curNode && ( curNode.nodeType != 3 || curNode.length < 1 ) ) + { + var tag = curNode.nodeName.toLowerCase() ; + if ( FCKListsLib.BlockElements[tag] || tag == 'br' ) + crossed = true ; + } + + this._textNode = curNode ; + this._offset = curNode.length - 1 ; + return crossed ; + }, + + Clone : function() + { + return new CharacterCursor( this._textNode, this._offset ) ; + } +} ; + +CharacterRange = function( initCursor, maxLength ) +{ + this._cursors = initCursor.push ? initCursor : [initCursor] ; + this._maxLength = maxLength ; + this._highlightRange = null ; +} +CharacterRange.prototype = +{ + ToDomRange : function() + { + var firstCursor = this._cursors[0] ; + var lastCursor = this._cursors[ this._cursors.length - 1 ] ; + var domRange = new FCKDomRange( FCKTools.GetElementWindow( firstCursor.GetTextNode() ) ) ; + var w3cRange = domRange._Range = domRange.CreateRange() ; + w3cRange.setStart( firstCursor.GetTextNode(), firstCursor.GetIndex() ) ; + w3cRange.setEnd( lastCursor.GetTextNode(), lastCursor.GetIndex() + 1 ) ; + domRange._UpdateElementInfo() ; + return domRange ; + }, + + Highlight : function() + { + if ( this._cursors.length < 1 ) + return ; + + var domRange = this.ToDomRange() ; + HighlightStyle.ApplyToRange( domRange, false, true ) ; + this._highlightRange = domRange ; + + var charRange = CharacterRange.CreateFromDomRange( domRange ) ; + var focusNode = domRange.StartNode ; + if ( focusNode.nodeType != 1 ) + focusNode = focusNode.parentNode ; + FCKDomTools.ScrollIntoView( focusNode, false ) ; + this._cursors = charRange._cursors ; + }, + + RemoveHighlight : function() + { + if ( this._highlightRange ) + { + HighlightStyle.RemoveFromRange( this._highlightRange, false, true ) ; + var charRange = CharacterRange.CreateFromDomRange( this._highlightRange ) ; + this._cursors = charRange._cursors ; + this._highlightRange = null ; + } + }, + + GetHighlightDomRange : function() + { + return this._highlightRange; + }, + + MoveNext : function() + { + var next = this._cursors[ this._cursors.length - 1 ].Clone() ; + var retval = next.MoveNext() ; + if ( retval ) + this._cursors = [] ; + this._cursors.push( next ) ; + if ( this._cursors.length > this._maxLength ) + this._cursors.shift() ; + return retval ; + }, + + MoveBack : function() + { + var prev = this._cursors[0].Clone() ; + var retval = prev.MoveBack() ; + if ( retval ) + this._cursors = [] ; + this._cursors.unshift( prev ) ; + if ( this._cursors.length > this._maxLength ) + this._cursors.pop() ; + return retval ; + }, + + GetEndCharacter : function() + { + if ( this._cursors.length < 1 ) + return null ; + var retval = this._cursors[ this._cursors.length - 1 ].GetCharacter() ; + return retval ; + }, + + GetNextRange : function( len ) + { + if ( this._cursors.length == 0 ) + return null ; + var cur = this._cursors[ this._cursors.length - 1 ].Clone() ; + cur.MoveNext() ; + return new CharacterRange( cur, len ) ; + }, + + GetCursors : function() + { + return this._cursors ; + } +} ; + +CharacterRange.CreateFromDomRange = function( domRange ) +{ + var w3cRange = domRange._Range ; + var startContainer = w3cRange.startContainer ; + var endContainer = w3cRange.endContainer ; + var startTextNode, startIndex, endTextNode, endIndex ; + + if ( startContainer.nodeType == 3 ) + { + startTextNode = startContainer ; + startIndex = w3cRange.startOffset ; + } + else if ( domRange.StartNode.nodeType == 3 ) + { + startTextNode = domRange.StartNode ; + startIndex = 0 ; + } + else + { + startTextNode = GetNextNonEmptyTextNode( domRange.StartNode, domRange.StartNode.parentNode ) ; + if ( !startTextNode ) + return null ; + startIndex = 0 ; + } + + if ( endContainer.nodeType == 3 && w3cRange.endOffset > 0 ) + { + endTextNode = endContainer ; + endIndex = w3cRange.endOffset - 1 ; + } + else + { + endTextNode = domRange.EndNode ; + while ( endTextNode.nodeType != 3 ) + endTextNode = endTextNode.lastChild ; + endIndex = endTextNode.length - 1 ; + } + + var cursors = [] ; + var current = new CharacterCursor( startTextNode, startIndex ) ; + cursors.push( current ) ; + if ( !( current.GetTextNode() == endTextNode && current.GetIndex() == endIndex ) && !domRange.CheckIsEmpty() ) + { + do + { + current = current.Clone() ; + current.MoveNext() ; + cursors.push( current ) ; + } + while ( !( current.GetTextNode() == endTextNode && current.GetIndex() == endIndex ) ) ; + } + + return new CharacterRange( cursors, cursors.length ) ; +} + +// Knuth-Morris-Pratt Algorithm for stream input +KMP_NOMATCH = 0 ; +KMP_ADVANCED = 1 ; +KMP_MATCHED = 2 ; +KmpMatch = function( pattern, ignoreCase ) +{ + var overlap = [ -1 ] ; + for ( var i = 0 ; i < pattern.length ; i++ ) + { + overlap.push( overlap[i] + 1 ) ; + while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern.charAt( overlap[ i + 1 ] - 1 ) ) + overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1 ; + } + this._Overlap = overlap ; + this._State = 0 ; + this._IgnoreCase = ( ignoreCase === true ) ; + if ( ignoreCase ) + this.Pattern = pattern.toLowerCase(); + else + this.Pattern = pattern ; +} +KmpMatch.prototype = { + FeedCharacter : function( c ) + { + if ( this._IgnoreCase ) + c = c.toLowerCase(); + + while ( true ) + { + if ( c == this.Pattern.charAt( this._State ) ) + { + this._State++ ; + if ( this._State == this.Pattern.length ) + { + // found a match, start over, don't care about partial matches involving the current match + this._State = 0; + return KMP_MATCHED; + } + return KMP_ADVANCED ; + } + else if ( this._State == 0 ) + return KMP_NOMATCH; + else + this._State = this._Overlap[ this._State ]; + } + + return null ; + }, + + Reset : function() + { + this._State = 0 ; + } +}; + +// Place a range at the start of document. +function OnLoad() +{ + // First of all, translate the dialog box texts. + oEditor.FCKLanguageManager.TranslatePage( document ) ; + + // Show the appropriate tab at startup. + if ( dialogArguments.CustomValue == 'Find' ) + { + dialog.SetSelectedTab( 'Find' ) ; + dialog.SetAutoSize( true ) ; + } + else + dialog.SetSelectedTab( 'Replace' ) ; + + SelectField( 'txtFind' + dialogArguments.CustomValue ) ; +} + +function btnStat() +{ + GetE('btnReplace').disabled = + GetE('btnReplaceAll').disabled = + GetE('btnFind').disabled = + ( GetE(idMap["FindText"]).value.length == 0 ) ; +} + +function btnStatDelayed() +{ + setTimeout( btnStat, 1 ) ; +} + +function GetSearchString() +{ + return GetE(idMap['FindText']).value ; +} + +function GetReplaceString() +{ + return GetE("txtReplace").value ; +} + +function GetCheckCase() +{ + return !! ( GetE(idMap['CheckCase']).checked ) ; +} + +function GetMatchWord() +{ + return !! ( GetE(idMap['CheckWord']).checked ) ; +} + +/* Is this character a unicode whitespace or a punctuation mark? + * References: + * http://unicode.org/Public/UNIDATA/PropList.txt (whitespaces) + * http://php.chinaunix.net/manual/tw/ref.regex.php (punctuation marks) + */ +function CheckIsWordSeparator( c ) +{ + var code = c.charCodeAt( 0 ); + if ( code >= 9 && code <= 0xd ) + return true; + if ( code >= 0x2000 && code <= 0x200a ) + return true; + switch ( code ) + { + case 0x20: + case 0x85: + case 0xa0: + case 0x1680: + case 0x180e: + case 0x2028: + case 0x2029: + case 0x202f: + case 0x205f: + case 0x3000: + return true; + default: + } + return /[.,"'?!;:]/.test( c ) ; +} + +FindRange = null ; +function _Find() +{ + var searchString = GetSearchString() ; + if ( !FindRange ) + FindRange = new CharacterRange( new CharacterCursor( EditorDocument ), searchString.length ) ; + else + { + FindRange.RemoveHighlight() ; + FindRange = FindRange.GetNextRange( searchString.length ) ; + } + var matcher = new KmpMatch( searchString, ! GetCheckCase() ) ; + var matchState = KMP_NOMATCH ; + var character = '%' ; + + while ( character != null ) + { + while ( ( character = FindRange.GetEndCharacter() ) ) + { + matchState = matcher.FeedCharacter( character ) ; + if ( matchState == KMP_MATCHED ) + break ; + if ( FindRange.MoveNext() ) + matcher.Reset() ; + } + + if ( matchState == KMP_MATCHED ) + { + if ( GetMatchWord() ) + { + var cursors = FindRange.GetCursors() ; + var head = cursors[ cursors.length - 1 ].Clone() ; + var tail = cursors[0].Clone() ; + if ( !head.MoveNext() && !CheckIsWordSeparator( head.GetCharacter() ) ) + continue ; + if ( !tail.MoveBack() && !CheckIsWordSeparator( tail.GetCharacter() ) ) + continue ; + } + + FindRange.Highlight() ; + return true ; + } + } + + FindRange = null ; + return false ; +} + +function Find() +{ + if ( ! _Find() ) + alert( FCKLang.DlgFindNotFoundMsg ) ; +} + +function Replace() +{ + var saveUndoStep = function( selectRange ) + { + var ieRange ; + if ( oEditor.FCKBrowserInfo.IsIE ) + ieRange = document.selection.createRange() ; + + selectRange.Select() ; + oEditor.FCKUndo.SaveUndoStep() ; + var cloneRange = selectRange.Clone() ; + cloneRange.Collapse( false ) ; + cloneRange.Select() ; + + if ( ieRange ) + setTimeout( function(){ ieRange.select() ; }, 1 ) ; + } + + if ( FindRange && FindRange.GetHighlightDomRange() ) + { + var range = FindRange.GetHighlightDomRange() ; + var bookmark = range.CreateBookmark() ; + FindRange.RemoveHighlight() ; + range.MoveToBookmark( bookmark ) ; + + saveUndoStep( range ) ; + range.DeleteContents() ; + range.InsertNode( EditorDocument.createTextNode( GetReplaceString() ) ) ; + range._UpdateElementInfo() ; + + FindRange = CharacterRange.CreateFromDomRange( range ) ; + } + else + { + if ( ! _Find() ) + { + FindRange && FindRange.RemoveHighlight() ; + alert( FCKLang.DlgFindNotFoundMsg ) ; + } + } +} + +function ReplaceAll() +{ + oEditor.FCKUndo.SaveUndoStep() ; + var replaceCount = 0 ; + + while ( _Find() ) + { + var range = FindRange.GetHighlightDomRange() ; + var bookmark = range.CreateBookmark() ; + FindRange.RemoveHighlight() ; + range.MoveToBookmark( bookmark) ; + + range.DeleteContents() ; + range.InsertNode( EditorDocument.createTextNode( GetReplaceString() ) ) ; + range._UpdateElementInfo() ; + + FindRange = CharacterRange.CreateFromDomRange( range ) ; + replaceCount++ ; + } + if ( replaceCount == 0 ) + { + FindRange && FindRange.RemoveHighlight() ; + alert( FCKLang.DlgFindNotFoundMsg ) ; + } + dialog.Cancel() ; +} + +window.onunload = function() +{ + if ( FindRange ) + { + FindRange.RemoveHighlight() ; + FindRange.ToDomRange().Select() ; + } +} + </script> +</head> +<body onload="OnLoad()" style="overflow: hidden"> + <div id="divFind" style="display: none"> + <table cellspacing="3" cellpadding="2" width="100%" border="0"> + <tr> + <td nowrap="nowrap"> + <label for="txtFindFind" fcklang="DlgReplaceFindLbl"> + Find what:</label> + </td> + <td width="100%"> + <input id="txtFindFind" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1" + type="text" /> + </td> + <td> + <input id="btnFind" style="width: 80px" disabled="disabled" onclick="Find();" + type="button" value="Find" fcklang="DlgFindFindBtn" /> + </td> + </tr> + <tr> + <td valign="bottom" colspan="3"> + <input id="chkCaseFind" tabindex="3" type="checkbox" /><label for="chkCaseFind" fcklang="DlgReplaceCaseChk">Match + case</label> + <br /> + <input id="chkWordFind" tabindex="4" type="checkbox" /><label for="chkWordFind" fcklang="DlgReplaceWordChk">Match + whole word</label> + </td> + </tr> + </table> + </div> + <div id="divReplace" style="display:none"> + <table cellspacing="3" cellpadding="2" width="100%" border="0"> + <tr> + <td nowrap="nowrap"> + <label for="txtFindReplace" fcklang="DlgReplaceFindLbl"> + Find what:</label> + </td> + <td width="100%"> + <input id="txtFindReplace" onkeyup="btnStat()" oninput="btnStat()" onpaste="btnStatDelayed()" style="width: 100%" tabindex="1" + type="text" /> + </td> + <td> + <input id="btnReplace" style="width: 80px" disabled="disabled" onclick="Replace();" + type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" /> + </td> + </tr> + <tr> + <td valign="top" nowrap="nowrap"> + <label for="txtReplace" fcklang="DlgReplaceReplaceLbl"> + Replace with:</label> + </td> + <td valign="top"> + <input id="txtReplace" style="width: 100%" tabindex="2" type="text" /> + </td> + <td> + <input id="btnReplaceAll" style="width: 80px" disabled="disabled" onclick="ReplaceAll()" type="button" + value="Replace All" fcklang="DlgReplaceReplAllBtn" /> + </td> + </tr> + <tr> + <td valign="bottom" colspan="3"> + <input id="chkCaseReplace" tabindex="3" type="checkbox" /><label for="chkCaseReplace" fcklang="DlgReplaceCaseChk">Match + case</label> + <br /> + <input id="chkWordReplace" tabindex="4" type="checkbox" /><label for="chkWordReplace" fcklang="DlgReplaceWordChk">Match + whole word</label> + </td> + </tr> + </table> + </div> +</body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select.html ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select.html Sun Apr 5 19:31:23 2009 @@ -0,0 +1,180 @@ +<!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 == + * + * Select dialog window. +--> +<html> + <head> + <title>Select Properties</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta content="noindex, nofollow" name="robots"> + <script src="common/fck_dialog_common.js" type="text/javascript"></script> + <script type="text/javascript" src="fck_select/fck_select.js"></script> + <script type="text/javascript"> + +var dialog = window.parent ; +var oEditor = dialog.InnerDialogLoaded() ; + +// Gets the document DOM +var oDOM = oEditor.FCK.EditorDocument ; + +var oActiveEl = dialog.Selection.GetSelectedElement() ; + +var oListText ; +var oListValue ; + +window.onload = function() +{ + // First of all, translate the dialog box texts + oEditor.FCKLanguageManager.TranslatePage(document) ; + + oListText = document.getElementById( 'cmbText' ) ; + oListValue = document.getElementById( 'cmbValue' ) ; + + // Fix the lists widths. (Bug #970) + oListText.style.width = oListText.offsetWidth ; + oListValue.style.width = oListValue.offsetWidth ; + + if ( oActiveEl && oActiveEl.tagName == 'SELECT' ) + { + GetE('txtName').value = oActiveEl.name ; + GetE('txtSelValue').value = oActiveEl.value ; + GetE('txtLines').value = GetAttribute( oActiveEl, 'size' ) ; + GetE('chkMultiple').checked = oActiveEl.multiple ; + + // Load the actual options + for ( var i = 0 ; i < oActiveEl.options.length ; i++ ) + { + var sText = HTMLDecode( oActiveEl.options[i].innerHTML ) ; + var sValue = oActiveEl.options[i].value ; + + AddComboOption( oListText, sText, sText ) ; + AddComboOption( oListValue, sValue, sValue ) ; + } + } + else + oActiveEl = null ; + + dialog.SetOkButton( true ) ; + dialog.SetAutoSize( true ) ; + SelectField( 'txtName' ) ; +} + +function Ok() +{ + oEditor.FCKUndo.SaveUndoStep() ; + + var sSize = GetE('txtLines').value ; + if ( sSize == null || isNaN( sSize ) || sSize <= 1 ) + sSize = '' ; + + oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'SELECT', {name: GetE('txtName').value} ) ; + + SetAttribute( oActiveEl, 'size' , sSize ) ; + oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ; + + // Remove all options. + while ( oActiveEl.options.length > 0 ) + oActiveEl.remove(0) ; + + // Add all available options. + for ( var i = 0 ; i < oListText.options.length ; i++ ) + { + var sText = oListText.options[i].value ; + var sValue = oListValue.options[i].value ; + if ( sValue.length == 0 ) sValue = sText ; + + var oOption = AddComboOption( oActiveEl, sText, sValue, oDOM ) ; + + if ( sValue == GetE('txtSelValue').value ) + { + SetAttribute( oOption, 'selected', 'selected' ) ; + oOption.selected = true ; + } + } + + return true ; +} + + </script> + </head> + <body style="overflow: hidden"> + <table width="100%" height="100%"> + <tr> + <td> + <table width="100%"> + <tr> + <td nowrap><span fckLang="DlgSelectName">Name</span> </td> + <td width="100%" colSpan="2"><input id="txtName" style="WIDTH: 100%" type="text"></td> + </tr> + <tr> + <td nowrap><span fckLang="DlgSelectValue">Value</span> </td> + <td width="100%" colSpan="2"><input id="txtSelValue" style="WIDTH: 100%; BACKGROUND-COLOR: buttonface" type="text" readonly></td> + </tr> + <tr> + <td nowrap><span fckLang="DlgSelectSize">Size</span> </td> + <td nowrap><input id="txtLines" type="text" size="2" value=""> <span fckLang="DlgSelectLines">lines</span></td> + <td nowrap align="right"><input id="chkMultiple" name="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow + multiple selections</label></td> + </tr> + </table> + <br> + <hr style="POSITION: absolute"> + <span style="LEFT: 10px; POSITION: relative; TOP: -7px" class="BackColor"> <span fckLang="DlgSelectOpAvail">Available + Options</span> </span> + <table width="100%"> + <tr> + <td width="50%"><span fckLang="DlgSelectOpText">Text</span><br> + <input id="txtText" style="WIDTH: 100%" type="text" name="txtText"> + </td> + <td width="50%"><span fckLang="DlgSelectOpValue">Value</span><br> + <input id="txtValue" style="WIDTH: 100%" type="text" name="txtValue"> + </td> + <td vAlign="bottom"><input onclick="Add();" type="button" fckLang="DlgSelectBtnAdd" value="Add"></td> + <td vAlign="bottom"><input onclick="Modify();" type="button" fckLang="DlgSelectBtnModify" value="Modify"></td> + </tr> + <tr> + <td rowSpan="2"><select id="cmbText" style="WIDTH: 100%" onchange="GetE('cmbValue').selectedIndex = this.selectedIndex;Select(this);" + size="5" name="cmbText"></select> + </td> + <td rowSpan="2"><select id="cmbValue" style="WIDTH: 100%" onchange="GetE('cmbText').selectedIndex = this.selectedIndex;Select(this);" + size="5" name="cmbValue"></select> + </td> + <td vAlign="top" colSpan="2"> + </td> + </tr> + <tr> + <td vAlign="bottom" colSpan="2"><input style="WIDTH: 100%" onclick="Move(-1);" type="button" fckLang="DlgSelectBtnUp" value="Up"> + <br> + <input style="WIDTH: 100%" onclick="Move(1);" type="button" fckLang="DlgSelectBtnDown" + value="Down"> + </td> + </tr> + <TR> + <TD vAlign="bottom" colSpan="4"><INPUT onclick="SetSelectedValue();" type="button" fckLang="DlgSelectBtnSetValue" value="Set as selected value"> + <input onclick="Delete();" type="button" fckLang="DlgSelectBtnDelete" value="Delete"></TD> + </TR> + </table> + </td> + </tr> + </table> + </body> +</html> Added: externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select/fck_select.js ============================================================================== --- (empty file) +++ externals/geeklog-1.5.2sr2/public_html/fckeditor/editor/dialog/fck_select/fck_select.js Sun Apr 5 19:31:23 2009 @@ -0,0 +1,194 @@ +� ============================================================================== Diff truncated at 200k characters