Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Aug 14, 10:17 AM

in-portal

Index: branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js
===================================================================
--- branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (nonexistent)
+++ branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js (revision 6800)
@@ -0,0 +1,723 @@
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fck_link.js
+ * Scripts related to the Link dialog window (see fck_link.html).
+ *
+ * Version: 2.0 RC3
+ * Modified: 2005-02-09 13:53:13
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+var oEditor = window.parent.InnerDialogLoaded() ;
+var FCK = oEditor.FCK ;
+var FCKLang = oEditor.FCKLang ;
+var ServerPath = '';
+var from = '';
+var anchor_ = '';
+var links_path = new Array()
+
+//#### Dialog Tabs
+
+// Set the dialog tabs.
+//window.parent.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ;
+//window.parent.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ;
+// TODO : Enable File Upload (1/3).
+//window.parent.AddTab( 'Upload', 'Upload', true ) ;
+//window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;
+
+// Function called when a dialog tag is selected.
+function OnDialogTabChange( tabCode )
+{
+// ShowE('divInfo' , ( tabCode == 'Info' ) ) ;
+// ShowE('divTarget' , ( tabCode == 'Target' ) ) ;
+// TODO : Enable File Upload (2/3).
+// ShowE('divUpload' , ( tabCode == 'Upload' ) ) ;
+// ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ;
+}
+
+//#### Regular Expressions library.
+var oRegex = new Object() ;
+
+oRegex.UriProtocol = new RegExp('') ;
+oRegex.UriProtocol.compile( '^(((http|https|ftp|news):\/\/)|mailto:)', 'gi' ) ;
+
+oRegex.UrlOnChangeProtocol = new RegExp('') ;
+oRegex.UrlOnChangeProtocol.compile( '^(http|https|ftp|news)://(?=.)', 'gi' ) ;
+
+oRegex.UrlOnChangeTestOther = new RegExp('') ;
+oRegex.UrlOnChangeTestOther.compile( '^(javascript:|#|/)', 'gi' ) ;
+
+oRegex.ReserveTarget = new RegExp('') ;
+oRegex.ReserveTarget.compile( '^_(blank|self|top|parent)$', 'i' ) ;
+
+oRegex.PopupUri = new RegExp('') ;
+//oRegex.PopupUri.compile( "^javascript:void\\(\\s*window.open\\(\\s*'([^']+)'\\s*,\\s*(?:'([^']*)'|null)\\s*,\\s*'([^']*)'\\s*\\)\\s*\\)\\s*$" ) ;
+oRegex.PopupUri.compile( "^javascript:openwincms\\(\\s*'([^']+)'\\s*,\\s*(?:'([^']*)'|null)\\s*,\\s*([^']*)\\s*,\\s*([^']*)\\s*\\)$" ) ;
+
+oRegex.PopupFeatures = new RegExp('') ;
+oRegex.PopupFeatures.compile( '(?:^|,)([^=]+)=(\\d+|yes|no)', 'gi' ) ;
+
+//#### Parser Functions
+
+var oParser = new Object() ;
+
+oParser.ParseEMailUrl = function( emailUrl )
+{
+ // Initializes the EMailInfo object.
+ var oEMailInfo = new Object() ;
+ oEMailInfo.Address = '' ;
+ oEMailInfo.Subject = '' ;
+ oEMailInfo.Body = '' ;
+
+ var oParts = emailUrl.match( /^([^\?]+)\??(.+)?/ ) ;
+ if ( oParts )
+ {
+ // Set the e-mail address.
+ oEMailInfo.Address = oParts[1] ;
+
+ // Look for the optional e-mail parameters.
+ if ( oParts[2] )
+ {
+ var oMatch = oParts[2].match( /(^|&)subject=([^&]+)/i ) ;
+ if ( oMatch ) oEMailInfo.Subject = unescape( oMatch[2] ) ;
+
+ oMatch = oParts[2].match( /(^|&)body=([^&]+)/i ) ;
+ if ( oMatch ) oEMailInfo.Body = unescape( oMatch[2] ) ;
+ }
+ }
+
+ return oEMailInfo ;
+}
+
+oParser.CreateEMailUri = function( address, subject, body )
+{
+ var sBaseUri = 'mailto:' + address ;
+
+ var sParams = '' ;
+
+ if ( subject.length > 0 )
+ sParams = '?subject=' + escape( subject ) ;
+
+ if ( body.length > 0 )
+ {
+ sParams += ( sParams.length == 0 ? '?' : '&' ) ;
+ sParams += 'body=' + escape( body ) ;
+ }
+
+ return sBaseUri + sParams ;
+}
+
+//#### Initialization Code
+
+// oLink: The actual selected link in the editor.
+var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;
+if ( oLink ) {
+ FCK.Selection.MoveToNode( oLink ) ;
+
+ //show_props(oLink.attributes, 'LINK: ')
+}
+
+function OnDialogTabChange( tabCode )
+{
+ if (tabCode == 'Info') {
+ updateDataArray();
+ window.parent.document.getElementById('TitleArea').innerHTML = oEditor.FCKLang.DlgImgTitle;
+ }
+}
+
+function updateDataArray()
+{
+ window.parent.parentData['linkTxtUrl'] = BuildUrlByType();
+ if (window.parent.parentData['linkTxtUrl'].length > 2) {
+ if (GetE('txtAlt')) {
+ window.parent.parentData['linkTxtAlt'] = GetE('txtAlt').value;
+ window.parent.parentData['linkTxtTitle'] = GetE('txtAlt').value;
+ }
+ window.parent.parentData['linkCmbTarget'] = GetE('cmbTarget').value;
+ window.parent.parentData['linkType'] = GetE('cmbLinkType').value;
+ window.location.href='dialog/fck_image.html?from';
+ }
+}
+
+window.onload = function()
+{
+ CreateLinkTypes();
+ oEditor.FCKLanguageManager.TranslatePage(document) ;
+ LoadSelection() ;
+ GetE('divInfo').style.display = '' ;
+ window.parent.SetOkButton( true ) ;
+}
+
+var bHasAnchors ;
+
+function CreateLinkTypes()
+{
+ if (InternalLinksEsists() === true)
+ oEditor.FCKTools.AddSelectOption( document, GetE('cmbLinkType'), 'Internal Web Page', 'internal');
+ oEditor.FCKTools.AddSelectOption( document, GetE('cmbLinkType'), 'External Web Page', 'external');
+ oEditor.FCKTools.AddSelectOption( document, GetE('cmbLinkType'), 'E-mail', 'email');
+ oEditor.FCKTools.AddSelectOption( document, GetE('cmbLinkType'), 'File', 'Doc');
+}
+
+function InternalLinksEsists()
+{
+ if (typeof(oEditor.FCKConfig.InternalLinksEsists) != 'undefined')
+ {
+ if (oEditor.FCKConfig.InternalLinksEsists != 'Off')
+ return true;
+ } else
+ return true;
+}
+
+function LoadAnchorNamesAndIds()
+{
+ count_real_anchors = 0;
+ if (GetE('cmbLinkType').value != 'internal') {
+ ShowE( 'divNoAnchor' , 0 ) ;
+ return;
+ }
+ var aAnchors = window.frames["frmInternal"].document.anchors ;
+ if (aAnchors) {
+ bHasAnchors = ( aAnchors.length > 0) ;
+ if (GetE('cmbAnchorName').options.length > 0) {
+ GetE('cmbAnchorName').options.length = 0;
+ }
+
+ oEditor.FCKTools.AddSelectOption( document, GetE('cmbAnchorName'), '', '' ) ;
+ for ( var i = 0 ; i < aAnchors.length ; i++ )
+ {
+ var sName = aAnchors[i].name ;
+ if ( sName && sName.length > 0 ) {
+ count_real_anchors++;
+ oEditor.FCKTools.AddSelectOption( document, GetE('cmbAnchorName'), sName, sName ) ;
+ }
+ }
+ if (count_real_anchors > 0) bHasAnchors = true;
+ else bHasAnchors = false ;
+ ShowE( 'divSelAnchor' , bHasAnchors ) ;
+ ShowE( 'divNoAnchor' , !bHasAnchors ) ;
+ for ( var i = 0 ; i < GetE('cmbAnchorName').length ; i++ )
+ {
+ if (anchor_ == GetE('cmbAnchorName').options[i].value)
+ GetE('cmbAnchorName').options[i].selected=1;
+ }
+
+ }
+}
+
+function LoadSelection()
+{
+ var sHRef = '';
+ var sType = '';
+ if (window.parent.parentData['linkTxtUrl'])
+ {
+ sHRef = window.parent.parentData['linkTxtUrl'];
+ if (window.parent.parentData['linkTxtAlt'])
+ GetE('txtAlt').value = window.parent.parentData['linkTxtAlt'];
+ sType = GetE('cmbLinkType').value = window.parent.parentData['linkType'];
+ var sTarget = window.parent.parentData['linkCmbTarget'];
+ //alert('href: ' + sHRef + '\n'+'txtAlt: '+ GetE('txtAlt').value+'\n'+'sType: ' + sType+'\n'+'sTarget: ' + sTarget);
+ } else if ( !oLink ) {
+ if (InternalLinksEsists() === true)
+ SetLinkType('internal');
+ else
+ SetLinkType('external');
+ return ;
+ }
+ if (sHRef.length == 0)
+ {
+ // Get the actual Link href.
+ var sHRef = oLink.getAttribute('href',2) + '' ;
+ if (oLink.getAttribute('alt',2)) {
+ if(oLink.getAttribute('alt',2).length > 0)
+ GetE('txtAlt').value = oLink.getAttribute('alt',2) + '' ;
+ else
+ GetE('txtAlt').value = '';
+ }
+ // Look for a popup javascript link.
+ }
+ var oPopupMatch = oRegex.PopupUri.exec( sHRef ) ;
+ if( oPopupMatch )
+ {
+ GetE('cmbTarget').value = 'popup' ;
+ sHRef = oPopupMatch[1] ;
+ GetE('txtPopupWidth').value = oPopupMatch[3];
+ GetE('txtPopupHeight').value = oPopupMatch[4];
+ SetTarget('popup');
+ }
+ // Search for the protocol.
+ var sProtocol = oRegex.UriProtocol.exec( sHRef ) ;
+ if ( sProtocol )
+ {
+ sProtocol = sProtocol[0].toLowerCase() ;
+ GetE('cmbLinkProtocol').value = sProtocol ;
+
+ // Remove the protocol and get the remainig URL.
+ var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ;
+
+ if ( sProtocol == 'mailto:' ) // It is an e-mail link.
+ {
+ sType = 'email' ;
+ var oEMailInfo = oParser.ParseEMailUrl( sUrl ) ;
+ GetE('txtEMailAddress').value = oEMailInfo.Address ;
+ GetE('txtEMailSubject').value = oEMailInfo.Subject ;
+ GetE('txtEMailBody').value = oEMailInfo.Body ;
+ }
+ else // It is a normal link.
+ GetE('txtUrl').value = sUrl ;
+ }
+ else // It is another type of link.
+ {
+ GetE('cmbLinkProtocol').value = '' ;
+ GetE('txtUrl').value = sHRef ;
+ }
+
+ if (oLink) {
+ //if (!window.location.search)
+ if (sType.length == 0)
+ sType = GetAttribute( oLink, 'label', '' );
+ if (sType.length == 0)
+ sType = 'external';
+ }
+
+ if (sType == 'Doc' && sHRef.length > 2) {
+ GetE('fileUrl').value = sHRef ;
+ }
+
+
+ if (sType == 'internal' && sHRef.length > 2 && sHRef.indexOf('#') > 0) {
+ anchor_ = sHRef.slice(sHRef.lastIndexOf('#')+1);
+ sHRef = sHRef.slice(0,sHRef.lastIndexOf('#'));
+ GetE('txtUrl').value = sHRef ;
+ }
+
+ if ( !oPopupMatch )
+ {
+ // Get the target.
+ if (oLink)
+ var sTarget = oLink.target;
+ else if (window.parent.parentData['linkCmbTarget'])
+ var sTarget = window.parent.parentData['linkCmbTarget'];
+
+ if ( sTarget && sTarget.length > 0 )
+ {
+ if ( oRegex.ReserveTarget.test( sTarget ) )
+ {
+ sTarget = sTarget.toLowerCase() ;
+ GetE('cmbTarget').value = sTarget ;
+ }
+ else
+ GetE('cmbTarget').value = '' ;
+ }
+ }
+ GetE('cmbLinkType').value = sType ;
+ SetLinkType( sType );
+}
+
+
+//#### Link type selection.
+function SetLinkType( linkType )
+{
+ if (linkType == 'email') {
+ ShowE('divNoMail1',0);
+ ShowE('divNoMail2',0);
+ ShowE('divNoMail3',0);
+ } else {
+ ShowE('divNoMail1',1);
+ ShowE('divNoMail2',1);
+ ShowE('divNoMail3',1);
+ }
+ if (linkType != 'internal')
+ ShowE( 'divNoAnchor' , 0 ) ;
+
+ ShowE('divLinkTypeInternal' , (linkType == 'internal') ) ;
+ ShowE('divLinkTypeExternal' , (linkType == 'external') ) ;
+ ShowE('divLinkTypeEMail' , (linkType == 'email') ) ;
+ ShowE('divLinkTypeFile' , (linkType == 'Doc') ) ;
+
+ if(GetE('cmbTarget')) {
+ if (GetE('cmbTarget').value == 'popup' ) {
+ ShowE('divPopupSize',1);
+ } else
+ ShowE('divPopupSize',0);
+ } else
+ ShowE('divPopupSize',0);
+
+ if ( linkType == 'internal' )
+ LoadResources();
+
+ if ( linkType == 'email')
+ window.parent.SetAutoSize( true ) ;
+}
+
+function LoadResources()
+{
+ var oXML = new FCKXml() ;
+ var sConnUrl = 'filemanager/browser/default/connectors/php/connector.php?Command=GetCmsTree';
+ sConnUrl = window.location.href.replace( /dialog.*$/, '' ) + sConnUrl ;
+ oXML.LoadUrl(sConnUrl, GetCmsTreeCallBack ) ; // Asynchronous load.
+}
+
+function GetCmsTreeCallBack( fckXml )
+{
+// alert(show_props(fckXml, 'oNodes'));
+ var oNodes = fckXml.SelectNodes( 'Connector/CmsPages/CmsPage' ) ;
+
+ for ( var i = 0 ; i < oNodes.length ; i++ )
+ {
+ var sCmsPage = oNodes[i].attributes.getNamedItem('path').value ;
+ var sCmsId = oNodes[i].attributes.getNamedItem('st_id').value ;
+ var sTitle = oNodes[i].attributes.getNamedItem('title').value ;
+ ServerPath = oNodes[i].attributes.getNamedItem('serverpath').value;
+ if (LinkTypeID()) {
+ links_path[i] = sCmsPage;
+ GetE('cmbImternalPagName').options[i] = new Option(sTitle, SetIDtag(sCmsId));
+ }
+ else
+ GetE('cmbImternalPagName').options[i] = new Option(sTitle, sCmsPage);
+
+ if (GetE('txtUrl')) {
+ tmpUrl = GetE('txtUrl').value;
+ if (tmpUrl.length == 0 && i == 0) {
+ window.frames["frmInternal"].document.location.href = ServerPath + sCmsPage+GetAdmin();
+ }
+ //alert(tmpUrl+' === '+sCmsPage);
+ if (LinkTypeID())
+ {
+ if (EncodeHrefTag(tmpUrl) == SetIDtagEncode(sCmsId)) {
+ GetE('cmbImternalPagName').options[i].selected=1;
+ //alert(ServerPath+sCmsPage+GetAdmin());
+ window.frames["frmInternal"].document.location.href = ServerPath+sCmsPage+GetAdmin();
+ }
+ } else {
+ if (tmpUrl.match(sCmsPage+'$')) {
+ GetE('cmbImternalPagName').options[i].selected=1;
+ //alert(tmpUrl+GetAdmin());
+ window.frames["frmInternal"].document.location.href = tmpUrl+GetAdmin();
+ }
+ }
+ }
+ }
+}
+
+function LinkTypeID()
+{
+ if (typeof(oEditor.FCKConfig.LocalLinkType) != 'undefined')
+ {
+ if (oEditor.FCKConfig.LocalLinkType == 'ID')
+ return true;
+ }
+ return false;
+}
+
+function SetIDtagEncode(id)
+{
+ return "<%cms:GetBlockData id='"+id+"' field='href'%>";
+}
+
+function SetIDtagNoLtQt(id)
+{
+ return "<%cms:GetBlockData id='"+id+"' field='href'%>";
+}
+
+function SetIDtag(id)
+{
+ return "&lt;%cms:GetBlockData id='"+id+"' field='href'%&gt;";
+}
+function SetIDtagAMP(id)
+{
+ return "&amp;lt;%cms:GetBlockData id='"+id+"' field='href'%&amp;gt;";
+}
+
+function ChangeInternalUrl(url,obj)
+{
+// alert('ChangeInternalUrl '+ServerPath + url+GetAdmin());
+ if(LinkTypeID()) {
+// alert('by Link ID')
+ for (var i=0; i < obj.options.length; i++) {
+ if (obj.options[i].value == url) {
+ url=links_path[i];
+ window.frames["frmInternal"].document.location.href = ServerPath + url + GetAdmin();
+ return;
+ }
+ }
+ } else {
+// alert('no link ID');
+ window.frames["frmInternal"].document.location.href = ServerPath + url+GetAdmin();
+ }
+}
+
+function EncodeHrefTag(text)
+{
+ if ( typeof( text ) != "string" )
+ text = text.toString() ;
+ //alert(text);
+ text = text.replace(/&amp;lt;/g, "<");
+ text = text.replace(/&lt;/g, "<");
+ text = text.replace(/&amp;gt;/g, ">");
+ text = text.replace(/&gt;/g, ">");
+ text = text.replace(/%27/g, "\'") ;
+ text = text.replace(/%3C/g, "<") ;
+ text = text.replace(/%3E/g, ">") ;
+ text = text.replace(/%&39/g, "\"") ;
+ //text = text.replace(/-/g, "&#45;") ;
+ text = text.replace(/%20/g, " ") ;
+ return text ;
+}
+
+
+
+
+function GetAdmin()
+{
+ if (typeof(oEditor.FCKConfig.K4) && oEditor.FCKConfig.K4 ) {
+ return '?admin=1';
+ }
+ if (typeof(oEditor.FCKConfig.Admin) != 'undefined' && oEditor.FCKConfig.Admin == 1) {
+ add_admin = '&admin=1&cmseditor=1';
+ if (typeof(oEditor.FCKConfig.AdminSid) != 'undefined') {
+ add_admin+='&sid='+oEditor.FCKConfig.AdminSid;
+ }
+ if (oEditor.FCKConfig.Admin == 1) {
+ return add_admin;
+ }
+ else {
+ return '';
+ }
+ }
+ else {
+ return '';
+ }
+}
+
+
+
+
+function show_props(obj, objName) {
+ var result = "";
+ for (var i in obj) {
+ alert( objName + "." + i + " = " + obj[i] + " \n" );
+ }
+ }
+
+//#### Target type selection.
+function SetTarget( targetType )
+{
+
+ switch ( targetType )
+ {
+ case "_blank" :
+ case "_self" :
+ case "_parent" :
+ case "_top" :
+ GetE('cmbTarget').value = targetType ;
+ break ;
+ case "" :
+ GetE('cmbTarget').value = '' ;
+ break ;
+ }
+
+ if ( targetType == 'popup' )
+ {
+ ShowE('divPopupSize',1);
+ window.parent.SetAutoSize( true ) ;
+ if (!GetE('txtPopupWidth').value)
+ GetE('txtPopupWidth').value = 800;
+ if (!GetE('txtPopupHeight').value)
+ GetE('txtPopupHeight').value = 600;
+ } else
+ ShowE('divPopupSize',0);
+}
+
+//#### Called while the user types the URL.
+function OnUrlChange()
+{
+ //alert("OnUrlChange "+ sUrl);
+ 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()
+{
+}
+
+//#### Builds the javascript URI to open a popup to the specified URI.
+function BuildPopupUri( uri )
+{
+ var ret = "javascript:openwincms('"+uri+"','popup',"+GetE('txtPopupWidth').value+","+GetE('txtPopupHeight').value+")";
+ return ret; //void(window.open('" + uri + "'," + sWindowName + ",'" + sFeatures + "'))" ) ;
+}
+
+//#### The OK button was hit.
+
+function BuildUrlByType()
+{
+ switch ( GetE('cmbLinkType').value )
+ {
+
+ case 'internal' :
+ if (LinkTypeID())
+ sUri = GetE('cmbImternalPagName').value
+ else
+ sUri = ServerPath+GetE('cmbImternalPagName').value;
+ //sUri = GetE('cmbLinkProtocol').value + sUri ;
+ //alert(sUri);
+ var cmbAnchorName = GetE('cmbAnchorName').value
+ if (cmbAnchorName.length > 0)
+ sUri = sUri+'#'+cmbAnchorName
+
+ if( GetE('cmbTarget').value == 'popup' )
+ sUri = BuildPopupUri( sUri ) ;
+ break ;
+
+ case 'Doc' :
+ sUri = GetE('fileUrl').value ;
+
+ if ( sUri.length == 0 )
+ {
+ alert( FCKLang.DlnLnkMsgNoUrl ) ;
+ return false ;
+ }
+
+ //sUri = sUri ;
+
+ if( GetE('cmbTarget').value == 'popup' )
+ sUri = BuildPopupUri( sUri ) ;
+
+ break ;
+
+ case 'external' :
+ sUri = GetE('txtUrl').value ;
+
+ if ( sUri.length == 0 )
+ {
+ alert( FCKLang.DlnLnkMsgNoUrl ) ;
+ return false ;
+ }
+
+ sUri = GetE('cmbLinkProtocol').value + sUri ;
+
+ if( GetE('cmbTarget').value == 'popup' )
+ sUri = BuildPopupUri( 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 ;
+ }
+ return sUri;
+}
+
+function Ok()
+{
+ var sUri = BuildUrlByType();
+ if (sUri == false)
+ return false;
+
+ if (window.location.search.substr(1) == 'from') {
+ updateDataArray();
+ window.location.href='dialog/fck_image.html?create';
+ return ;
+ }
+
+ if ( oLink )
+ oLink.href = sUri ;
+ else
+ {
+ oLink = oEditor.FCK.CreateLink( sUri ) ;
+ if ( ! oLink )
+ return true ;
+ }
+
+ if( GetE('cmbTarget').value != 'popup' )
+ SetAttribute( oLink, 'target', GetE('cmbTarget').value ) ;
+ else
+ SetAttribute( oLink, 'target', null ) ;
+
+ if (GetE('txtAlt')) {
+ SetAttribute( oLink, 'alt', GetE('txtAlt').value) ;
+ SetAttribute( oLink, 'title', GetE('txtAlt').value) ;
+ }
+ SetAttribute( oLink, 'label', GetE('cmbLinkType').value)
+ /*
+ if ( oEditor.FCKBrowserInfo.IsIE )
+ oLink.style.cssText = GetE('txtAttStyle').value ;
+ else
+ SetAttribute( oLink, 'style', GetE('txtAttStyle').value ) ;
+*/
+ return true ;
+}
+
+function show_props(obj, objName) {
+ var result = "";
+ for (var i in obj) {
+ result = objName + "." + i + " = " + obj[i] + " \n";
+ alert(result);
+ }
+ //return result;
+ }
+
+function BrowseServer(field)
+{
+ // Set the browser window feature
+ urlField = field;
+ var iWidth = oEditor.FCKConfig.ImageBrowserWindowWidth ;
+ var iHeight = oEditor.FCKConfig.ImageBrowserWindowHeight ;
+
+
+ var iLeft = (screen.width - iWidth) / 2 ;
+ var iTop = (screen.height - iHeight) / 2 ;
+
+ var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
+ sOptions += ",width=" + iWidth ;
+ sOptions += ",height=" + iHeight ;
+ sOptions += ",left=" + iLeft ;
+ sOptions += ",top=" + iTop ;
+
+ // Open the browser window.
+ var oWindow = window.open( oEditor.FCKConfig.FilesBrowserURL, "FCKBrowseWindow", sOptions ) ;
+
+}
+
+function SetUrl( url, width, height, alt, fsize )
+{
+ GetE(urlField).value = url ;
+
+ if ( alt )
+ GetE('txtAlt').value = alt;
+}
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/dialog/fck_link/fck_link.js
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php
===================================================================
--- branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php (revision 6800)
@@ -0,0 +1,62 @@
+<?php
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: config.php
+ * Configuration file for the File Manager Connector for PHP.
+ *
+ * Version: 2.0 RC3
+ * Modified: 2005-02-08 12:01:53
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+ini_set('display_errors', 0);
+global $Config ;
+// Path to user files relative to the document root.
+// SECURITY TIP: Uncomment the following line to set a fixed path.
+define('K3_FULL_PATH', dirname(realpath(__FILE__)));
+define('K3_BASE_PATH', str_replace('/cmseditor/editor/filemanager/browser/default/connectors/php', '', ereg_replace($_SERVER['DOCUMENT_ROOT'], '', K3_FULL_PATH) ) );
+$kernel3_config = $_SERVER['DOCUMENT_ROOT'].K3_BASE_PATH."/config/config.php";
+if (file_exists($kernel3_config)) {
+ define('FULL_PATH', K3_FULL_PATH);
+ define('BASE_PATH', K3_BASE_PATH);
+ include_once($kernel3_config);
+ $Config['UserFilesPathNoBase'] = '/templates/UserFiles/' ;
+ $Config['UserFilesPath'] = BASE_PATH.'/templates/UserFiles/';
+
+ if (defined('SID_TYPE'))
+ $Config['validate_type'] = SID_TYPE;
+ else
+ $Config['validate_type'] = 'admin';
+
+}
+else {
+ $fp = realpath(dirname(__FILE__).'/../../../../../../../../../');
+ define('FULL_PATH', $fp);
+ define('DEBUG_MODE', 0);
+ define('REL_PATH', 'admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php');
+ $kernel4_startup = $fp."/core/kernel/startup.php";
+ $Config['K4Mode'] = 1;
+ include_once($kernel4_startup);
+ $Config['validate_type'] = 'admin';
+}
+
+$Config['AllowedExtensions']['Files'] = array('jpg','gif','jpeg','png','swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg','zip','rar','arj','gz','tar','doc','pdf','ppt','rdp','swf','swt','txt','vsd','xls','csv','odt') ;
+$Config['DeniedExtensions']['Files'] = array('php','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg') ;
+$Config['AllowedExtensions']['Images'] = array('jpg','gif','jpeg','png', 'bmp') ;
+$Config['DeniedExtensions']['Images'] = array('php','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg');
+$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
+$Config['DeniedExtensions']['Flash'] = array('php','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg') ;
+$Config['AllowedExtensions']['Media'] = array('asf','asx','avi','wav','wax','wma','wm','wmv','m3u','mp2v','mpg','mpeg','m1v','mp2','mp3','mpa','mpe','mpv2','mp4','mid','midi','rmi','qt','aif','aifc','aiff','mov','flv','rm','svcd','swf','vcd') ;
+$Config['DeniedExtensions']['Media'] = array('php','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg');
+$Config['AllowedExtensions']['Documents'] = array('doc','pdf','ppt','rdp','swf','swt','txt','vsd','xls','csv','zip','odt') ;
+$Config['DeniedExtensions']['Documents'] = array('php','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg');
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.18.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.18
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

Event Timeline