Index: branches/RC/core/editor/editor/plugins/MyLink/fck_link.js =================================================================== diff -u -r10974 -r11852 --- branches/RC/core/editor/editor/plugins/MyLink/fck_link.js (.../fck_link.js) (revision 10974) +++ branches/RC/core/editor/editor/plugins/MyLink/fck_link.js (.../fck_link.js) (revision 11852) @@ -54,15 +54,15 @@ updateDataArray(); window.location.href = '../editor/plugins/MyImage/fck_image.html?from'; } - + dialog.SetAutoSize( true ) ; } function updateDataArray() { - + if (!window.parent.parentData) { window.parent.parentData = new Array(); } @@ -162,7 +162,7 @@ // Fill the Anchor Names and Ids combos. // - + // Load the selected link information (if any). LoadSelection() ; //LoadAnchorNamesAndIds(1,first_real_url); @@ -236,32 +236,32 @@ //alert(GetE('cmbAnchorName').options[j].value + ' == ' + aAnchors[i].name); if (GetE('cmbAnchorName').options[j].value == aAnchors[i].name) { - AddAnchor = false; + AddAnchor = false; } - } - if (AddAnchor) { + } + if (AddAnchor) { FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; } } } } - if (count_real_anchors > 0) - { + if (count_real_anchors > 0) + { bHasAnchors = true; for ( var i = 0 ; i < GetE('cmbAnchorName').length ; i++ ) { if (anchor_ == GetE('cmbAnchorName').options[i].value) GetE('cmbAnchorName').options[i].selected=1; } - - - + + + } else { bHasAnchors = false ; } ShowE( 'divSelAnchor' , bHasAnchors ) ; ShowE( 'divNoAnchor' , !bHasAnchors ) ; - + } function LoadAnchorNamesAndIds(local,load_url) @@ -283,17 +283,17 @@ 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) ; if (bHasAnchors) { FCKTools.AddSelectOption( GetE('cmbAnchorName'), '', '' ) ; @@ -303,23 +303,23 @@ var sName = aAnchors[i].name ; if ( sName && sName.length > 0 ) { FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; - } + } } - } + } } if (load_url) { window.frames["frmInternal"].document.location.href = ServerPath + load_url + GetAdmin(); } - - if (count_real_anchors > 0) { + + if (count_real_anchors > 0) { bHasAnchors = true; for ( var i = 0 ; i < GetE('cmbAnchorName').length ; i++ ) { if (anchor_ == GetE('cmbAnchorName').options[i].value) GetE('cmbAnchorName').options[i].selected=1; } - + } else { bHasAnchors = false ; } @@ -331,7 +331,7 @@ { if ( !oLink ) { SetLinkType('internal'); - + return ; } @@ -400,11 +400,11 @@ } if (sType != 'email') { if (sHRef.match(/@@[0-9]+@@/)) { - sType = 'internal' ; + sType = 'internal' ; } else { var oldsType = GetAttribute( oLink, 'label', '' ); - + id = oLink.getAttribute( 'id' , 2 ); if (!id && !oldsType) { sType = 'external'; @@ -441,7 +441,7 @@ else GetE('txtAlt').value = ''; } - + GetE('txtAttId').value = oLink.id ; // GetE('txtAlt').value = oLink.alt ; // GetE('txtAttName').value = oLink.name ; @@ -490,7 +490,7 @@ */ if (!linkType) { linkType = 'internal'; - + } ShowE('divLinkTypeInternal' , (linkType == 'internal') ) ; ShowE('divLinkTypeExternal' , (linkType == 'external') ) ; @@ -510,10 +510,10 @@ } if (linkType != 'internal') { ShowE( 'divNoAnchor', 0 ) ; - } - + } - if(GetE('cmbTarget')) + + if(GetE('cmbTarget')) { if (GetE('cmbTarget').value == 'popup' ) { ShowE('divPopupSize',1); @@ -524,13 +524,13 @@ if ( linkType == 'internal' ) { LoadResources(); - + } if ( linkType == 'email') window.parent.SetAutoSize( true ) ; - - dialog.SetAutoSize(); - + + dialog.SetAutoSize(); + } @@ -558,16 +558,16 @@ GetE('cmbImternalPagName').options[0] = new Option('', ''); for ( var j = 0 ; j < oNodes.length ; j++ ) { - var i = j + 1; + var i = j + 1; var sCmsPage = oNodes[j].attributes.getNamedItem('path').value ; var sCmsId = oNodes[j].attributes.getNamedItem('st_id').value ; - + var real_url = false; if (sCmsPage == '@@'+sCmsId+'@@') { real_url = oNodes[j].attributes.getNamedItem('real_url').value ; links_path[i] = real_url; } - + var sTitle = oNodes[j].attributes.getNamedItem('title').value ; ServerPath = oNodes[j].attributes.getNamedItem('serverpath').value; GetE('cmbImternalPagName').options[i] = new Option(sTitle, sCmsPage); @@ -597,8 +597,8 @@ { return '&admin=1'; } - + function ChangeInternalUrl(url,obj) { if(url.match(/@@[0-9]+@@/) ) { @@ -738,7 +738,7 @@ { switch ( GetE('cmbLinkType').value ) { - + case 'internal' : sUri = GetE('cmbImternalPagName').value; //sUri = GetE('cmbLinkProtocol').value + sUri ; @@ -776,11 +776,11 @@ alert( FCKLang.DlnLnkMsgNoUrl ) ; return false ; } - + sUri = GetE('cmbLinkProtocol').value + sUri ; - break; - + break; + case 'email' : sUri = GetE('txtEMailAddress').value ; @@ -893,8 +893,8 @@ if (GetE('txtAttId').value == '') { GetE('txtAttId').value = 'Doc_|_' + Math.round((99977562 - 10016486) * Math.random()); } - SetAttribute( oLink, 'id', GetE('txtAttId').value) ; - } + SetAttribute( oLink, 'id', GetE('txtAttId').value) ; + } } // Select the (first) link. oEditor.FCKSelection.SelectNode( aLinks[0] ); @@ -910,19 +910,19 @@ var sUri, sInnerHtml ; oEditor.FCKUndo.SaveUndoStep() ; - + if (window.location.search.substr(1) == 'from') { // updateDataArray(); // window.location.href = '../editor/plugins/MyImage/fck_image.html?create'; // return ; } - + return BuildUrlByType(); } function BrowseServer() { - OpenFileBrowser( FCKConfig.BaseUrl + FCKConfig.DocumentsBrowserURL, FCKConfig.DocumentsBrowserWindowWidth, FCKConfig.DocumentsBrowserWindowHeight ) ; + OpenFileBrowser( FCKConfig.DocumentsBrowserURL, FCKConfig.DocumentsBrowserWindowWidth, FCKConfig.DocumentsBrowserWindowHeight ) ; } function SetUrl( url )