rem: SetAttribute( oLink, 'name'		, GetE('txtAttName').value ) ; 
add: SetAttribute( oLink, 'name'		, GetE('txtAttName').value ) ; 
context: function Ok(){	var sUri, sInnerHtml ;	switch ( GetE('cmbLinkType').value )	{		case 'url' :			sUri = GetE('txtUrl').value ;			if ( sUri.length == 0 )			{				alert( FCKLang.DlnLnkMsgNoUrl ) ;				return false ;			}			sUri = GetE('cmbLinkProtocol').value + sUri ;			if( GetE('cmbTarget').value == 'popup' )			{				// Check the window name, according to http://www.w3.org/TR/html4/types.html#type-frame-target (IE throw erros with spaces).				if ( /(^[^a-zA-Z])|(\s)/.test( GetE('txtPopupName').value ) )				{					alert( FCKLang.DlnLnkMsgInvPopName ) ;					return false ;				}								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 ;		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 ;	}	// No link selected, so try to create one.	if ( !oLink )		oLink = oEditor.FCK.CreateLink( sUri ) ;		if ( oLink )		sInnerHtml = oLink.innerHTML ;		// Save the innerHTML (IE changes it if it is like an URL).	else	{		// If no selection, use the uri as the link text (by dom, 2006-05-26)		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.		oLink = oEditor.FCK.CreateElement( 'a' ) ;	}	oEditor.FCKUndo.SaveUndoStep() ;	oLink.href = sUri ;	SetAttribute( oLink, '_fcksavedurl', sUri ) ;	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 ) ;	// Advances Attributes	SetAttribute( oLink, 'id'		, GetE('txtAttId').value ) ;	SetAttribute( oLink, 'name'		, GetE('txtAttName').value ) ;		// No IE. Set but doesnt't update the outerHTML.	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 )	{		SetAttribute( oLink, 'className', GetE('txtAttClasses').value ) ;		oLink.style.cssText = GetE('txtAttStyle').value ;	}	else	{		SetAttribute( oLink, 'class', GetE('txtAttClasses').value ) ;		SetAttribute( oLink, 'style', GetE('txtAttStyle').value ) ;	}	// Select the link.	oEditor.FCKSelection.SelectNode(oLink);		return true ;}
meta: 8533	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8533/30774da157017224af5d9a1b55d04bf21f55a840/fck_link.js/clean/library/src/webapp/editor/FCKeditor/editor/dialog/fck_link/fck_link.js