Changeset 443
- Timestamp:
- 2007-07-13 11:38:44 (17 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/dialog/fck_link/fck_link.js
r388 r443 27 27 var FCKConfig = oEditor.FCKConfig ; 28 28 var FCKRegexLib = oEditor.FCKRegexLib ; 29 var FCKTools = oEditor.FCKTools ; 29 30 30 31 //#### Dialog Tabs … … 182 183 } 183 184 184 var aIds = oEditor.FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ;185 var aIds = FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ; 185 186 186 187 bHasAnchors = ( aAnchors.length > 0 || aIds.length > 0 ) ; … … 190 191 var sName = aAnchors[i].name ; 191 192 if ( sName && sName.length > 0 ) 192 oEditor.FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ;193 FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; 193 194 } 194 195 195 196 for ( i = 0 ; i < aIds.length ; i++ ) 196 197 { 197 oEditor.FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ;198 FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ; 198 199 } 199 200 … … 224 225 225 226 // Accesible popups, the popup data is in the onclick attribute 226 if ( !oPopupMatch ) { 227 if ( !oPopupMatch ) 228 { 227 229 var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; 228 oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; 229 if( oPopupMatch ) 230 { 231 GetE( 'cmbTarget' ).value = 'popup' ; 232 FillPopupFields( oPopupMatch[1], oPopupMatch[2] ) ; 233 SetTarget( 'popup' ) ; 230 if ( onclick ) 231 { 232 // Decode the protected string 233 onclick = FCKTools.DecodeHex( onclick ) ; 234 235 oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; 236 if( oPopupMatch ) 237 { 238 GetE( 'cmbTarget' ).value = 'popup' ; 239 FillPopupFields( oPopupMatch[1], oPopupMatch[2] ) ; 240 SetTarget( 'popup' ) ; 241 } 234 242 } 235 243 } … … 348 356 GetE('tdTargetFrame').style.display = ( targetType == 'popup' ? 'none' : '' ) ; 349 357 GetE('tdPopupName').style.display = 350 GetE('tablePopupFeatures').style.display = ( targetType == 'popup' ? '' : 'none' ) ;358 GetE('tablePopupFeatures').style.display = ( targetType == 'popup' ? '' : 'none' ) ; 351 359 352 360 switch ( targetType ) … … 550 558 SetAttribute( oLink, '_fcksavedurl', sUri ) ; 551 559 560 var onclick; 552 561 // Accesible popups 553 562 if( GetE('cmbTarget').value == 'popup' ) 554 563 { 555 SetAttribute( oLink, 'onclick_fckprotectedatt', " onclick=\"" + BuildOnClickPopup() + "\"") ; 564 onclick = BuildOnClickPopup() ; 565 // Encode the attribute 566 onclick = FCKTools.EncodeToHex( " onclick=\"" + onclick + "\"" ) ; 567 SetAttribute( oLink, 'onclick_fckprotectedatt', onclick ) ; 556 568 } 557 569 else … … 559 571 // Check if the previous onclick was for a popup: 560 572 // In that case remove the onclick handler. 561 var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; 562 if( oRegex.OnClickPopup.test( onclick ) ) 563 SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; 573 onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; 574 if ( onclick ) 575 { 576 // Decode the protected string 577 onclick = FCKTools.DecodeHex( onclick ) ; 578 579 if( oRegex.OnClickPopup.test( onclick ) ) 580 SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; 581 } 564 582 } 565 583