{\r
var item = elements.getItem( i );\r
if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )\r
- {\r
anchors.push( editor.restoreRealElement( item ) );\r
- }\r
}\r
\r
for ( i = 0 ; i < realAnchors.count() ; i++ )\r
return 'String.fromCharCode(' + encodedChars.join( ',' ) + ')';\r
}\r
\r
+ var commonLang = editor.lang.common,\r
+ linkLang = editor.lang.link;\r
+\r
return {\r
- title : editor.lang.link.title,\r
+ title : linkLang.title,\r
minWidth : 350,\r
minHeight : 230,\r
contents : [\r
{\r
id : 'info',\r
- label : editor.lang.link.info,\r
- title : editor.lang.link.info,\r
+ label : linkLang.info,\r
+ title : linkLang.info,\r
elements :\r
[\r
{\r
id : 'linkType',\r
type : 'select',\r
- label : editor.lang.link.type,\r
+ label : linkLang.type,\r
'default' : 'url',\r
items :\r
[\r
- [ editor.lang.link.toUrl, 'url' ],\r
- [ editor.lang.link.toAnchor, 'anchor' ],\r
- [ editor.lang.link.toEmail, 'email' ]\r
+ [ linkLang.toUrl, 'url' ],\r
+ [ linkLang.toAnchor, 'anchor' ],\r
+ [ linkLang.toEmail, 'email' ]\r
],\r
onChange : linkTypeChanged,\r
setup : function( data )\r
{\r
id : 'protocol',\r
type : 'select',\r
- label : editor.lang.common.protocol,\r
+ label : commonLang.protocol,\r
'default' : 'http://',\r
items :\r
[\r
[ 'https://\u200E', 'https://' ],\r
[ 'ftp://\u200E', 'ftp://' ],\r
[ 'news://\u200E', 'news://' ],\r
- [ editor.lang.link.other , '' ]\r
+ [ linkLang.other , '' ]\r
],\r
setup : function( data )\r
{\r
{\r
type : 'text',\r
id : 'url',\r
- label : editor.lang.common.url,\r
+ label : commonLang.url,\r
required: true,\r
onLoad : function ()\r
{\r
if ( this.getDialog().fakeObj ) // Edit Anchor.\r
return true;\r
\r
- var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noUrl );\r
+ var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noUrl );\r
return func.apply( this );\r
},\r
setup : function( data )\r
id : 'browse',\r
hidden : 'true',\r
filebrowser : 'info:url',\r
- label : editor.lang.common.browseServer\r
+ label : commonLang.browseServer\r
}\r
]\r
},\r
{\r
type : 'fieldset',\r
id : 'selectAnchorText',\r
- label : editor.lang.link.selectAnchor,\r
+ label : linkLang.selectAnchor,\r
setup : function( data )\r
{\r
if ( data.anchors.length > 0 )\r
type : 'select',\r
id : 'anchorName',\r
'default' : '',\r
- label : editor.lang.link.anchorName,\r
+ label : linkLang.anchorName,\r
style : 'width: 100%;',\r
items :\r
[\r
type : 'select',\r
id : 'anchorId',\r
'default' : '',\r
- label : editor.lang.link.anchorId,\r
+ label : linkLang.anchorId,\r
style : 'width: 100%;',\r
items :\r
[\r
type : 'html',\r
id : 'noAnchors',\r
style : 'text-align: center;',\r
- html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( editor.lang.link.noAnchors ) + '</div>',\r
+ html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( linkLang.noAnchors ) + '</div>',\r
// Focus the first element defined in above html.\r
focus : true,\r
setup : function( data )\r
{\r
type : 'text',\r
id : 'emailAddress',\r
- label : editor.lang.link.emailAddress,\r
+ label : linkLang.emailAddress,\r
required : true,\r
validate : function()\r
{\r
dialog.getValueOf( 'info', 'linkType' ) != 'email' )\r
return true;\r
\r
- var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noEmail );\r
+ var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noEmail );\r
return func.apply( this );\r
},\r
setup : function( data )\r
{\r
type : 'text',\r
id : 'emailSubject',\r
- label : editor.lang.link.emailSubject,\r
+ label : linkLang.emailSubject,\r
setup : function( data )\r
{\r
if ( data.email )\r
{\r
type : 'textarea',\r
id : 'emailBody',\r
- label : editor.lang.link.emailBody,\r
+ label : linkLang.emailBody,\r
rows : 3,\r
'default' : '',\r
setup : function( data )\r
},\r
{\r
id : 'target',\r
- label : editor.lang.link.target,\r
- title : editor.lang.link.target,\r
+ label : linkLang.target,\r
+ title : linkLang.target,\r
elements :\r
[\r
{\r
{\r
type : 'select',\r
id : 'linkTargetType',\r
- label : editor.lang.common.target,\r
+ label : commonLang.target,\r
'default' : 'notSet',\r
style : 'width : 100%;',\r
'items' :\r
[\r
- [ editor.lang.common.notSet, 'notSet' ],\r
- [ editor.lang.link.targetFrame, 'frame' ],\r
- [ editor.lang.link.targetPopup, 'popup' ],\r
- [ editor.lang.common.targetNew, '_blank' ],\r
- [ editor.lang.common.targetTop, '_top' ],\r
- [ editor.lang.common.targetSelf, '_self' ],\r
- [ editor.lang.common.targetParent, '_parent' ]\r
+ [ commonLang.notSet, 'notSet' ],\r
+ [ linkLang.targetFrame, 'frame' ],\r
+ [ linkLang.targetPopup, 'popup' ],\r
+ [ commonLang.targetNew, '_blank' ],\r
+ [ commonLang.targetTop, '_top' ],\r
+ [ commonLang.targetSelf, '_self' ],\r
+ [ commonLang.targetParent, '_parent' ]\r
],\r
onChange : targetChanged,\r
setup : function( data )\r
{\r
type : 'text',\r
id : 'linkTargetName',\r
- label : editor.lang.link.targetFrameName,\r
+ label : linkLang.targetFrameName,\r
'default' : '',\r
setup : function( data )\r
{\r
[\r
{\r
type : 'fieldset',\r
- label : editor.lang.link.popupFeatures,\r
+ label : linkLang.popupFeatures,\r
children :\r
[\r
{\r
{\r
type : 'checkbox',\r
id : 'resizable',\r
- label : editor.lang.link.popupResizable,\r
+ label : linkLang.popupResizable,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
},\r
{\r
type : 'checkbox',\r
id : 'status',\r
- label : editor.lang.link.popupStatusBar,\r
+ label : linkLang.popupStatusBar,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
{\r
type : 'checkbox',\r
id : 'location',\r
- label : editor.lang.link.popupLocationBar,\r
+ label : linkLang.popupLocationBar,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
{\r
type : 'checkbox',\r
id : 'toolbar',\r
- label : editor.lang.link.popupToolbar,\r
+ label : linkLang.popupToolbar,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
{\r
type : 'checkbox',\r
id : 'menubar',\r
- label : editor.lang.link.popupMenuBar,\r
+ label : linkLang.popupMenuBar,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
{\r
type : 'checkbox',\r
id : 'fullscreen',\r
- label : editor.lang.link.popupFullScreen,\r
+ label : linkLang.popupFullScreen,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
{\r
type : 'checkbox',\r
id : 'scrollbars',\r
- label : editor.lang.link.popupScrollBars,\r
+ label : linkLang.popupScrollBars,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
{\r
type : 'checkbox',\r
id : 'dependent',\r
- label : editor.lang.link.popupDependent,\r
+ label : linkLang.popupDependent,\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
\r
type : 'text',\r
widths : [ '30%', '70%' ],\r
labelLayout : 'horizontal',\r
- label : editor.lang.link.popupWidth,\r
+ label : linkLang.popupWidth,\r
id : 'width',\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
type : 'text',\r
labelLayout : 'horizontal',\r
widths : [ '55%', '45%' ],\r
- label : editor.lang.link.popupLeft,\r
+ label : linkLang.popupLeft,\r
id : 'left',\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
type : 'text',\r
labelLayout : 'horizontal',\r
widths : [ '30%', '70%' ],\r
- label : editor.lang.link.popupHeight,\r
+ label : linkLang.popupHeight,\r
id : 'height',\r
setup : setupPopupParams,\r
commit : commitPopupParams\r
{\r
type : 'text',\r
labelLayout : 'horizontal',\r
- label : editor.lang.link.popupTop,\r
+ label : linkLang.popupTop,\r
widths : [ '55%', '45%' ],\r
id : 'top',\r
setup : setupPopupParams,\r
},\r
{\r
id : 'upload',\r
- label : editor.lang.link.upload,\r
- title : editor.lang.link.upload,\r
+ label : linkLang.upload,\r
+ title : linkLang.upload,\r
hidden : true,\r
filebrowser : 'uploadButton',\r
elements :\r
{\r
type : 'file',\r
id : 'upload',\r
- label : editor.lang.common.upload,\r
+ label : commonLang.upload,\r
style: 'height:40px',\r
size : 29\r
},\r
{\r
type : 'fileButton',\r
id : 'uploadButton',\r
- label : editor.lang.common.uploadSubmit,\r
+ label : commonLang.uploadSubmit,\r
filebrowser : 'info:url',\r
'for' : [ 'upload', 'upload' ]\r
}\r
},\r
{\r
id : 'advanced',\r
- label : editor.lang.link.advanced,\r
- title : editor.lang.link.advanced,\r
+ label : linkLang.advanced,\r
+ title : linkLang.advanced,\r
elements :\r
[\r
{\r
{\r
type : 'text',\r
id : 'advId',\r
- label : editor.lang.link.id,\r
+ label : linkLang.id,\r
setup : setupAdvParams,\r
commit : commitAdvParams\r
},\r
{\r
type : 'select',\r
id : 'advLangDir',\r
- label : editor.lang.link.langDir,\r
+ label : linkLang.langDir,\r
'default' : '',\r
style : 'width:110px',\r
items :\r
[\r
- [ editor.lang.common.notSet, '' ],\r
- [ editor.lang.link.langDirLTR, 'ltr' ],\r
- [ editor.lang.link.langDirRTL, 'rtl' ]\r
+ [ commonLang.notSet, '' ],\r
+ [ linkLang.langDirLTR, 'ltr' ],\r
+ [ linkLang.langDirRTL, 'rtl' ]\r
],\r
setup : setupAdvParams,\r
commit : commitAdvParams\r
type : 'text',\r
id : 'advAccessKey',\r
width : '80px',\r
- label : editor.lang.link.acccessKey,\r
+ label : linkLang.acccessKey,\r
maxLength : 1,\r
setup : setupAdvParams,\r
commit : commitAdvParams\r
[\r
{\r
type : 'text',\r
- label : editor.lang.link.name,\r
+ label : linkLang.name,\r
id : 'advName',\r
setup : setupAdvParams,\r
commit : commitAdvParams\r
},\r
{\r
type : 'text',\r
- label : editor.lang.link.langCode,\r
+ label : linkLang.langCode,\r
id : 'advLangCode',\r
width : '110px',\r
'default' : '',\r
},\r
{\r
type : 'text',\r
- label : editor.lang.link.tabIndex,\r
+ label : linkLang.tabIndex,\r
id : 'advTabIndex',\r
width : '80px',\r
maxLength : 5,\r
[\r
{\r
type : 'text',\r
- label : editor.lang.link.advisoryTitle,\r
+ label : linkLang.advisoryTitle,\r
'default' : '',\r
id : 'advTitle',\r
setup : setupAdvParams,\r
},\r
{\r
type : 'text',\r
- label : editor.lang.link.advisoryContentType,\r
+ label : linkLang.advisoryContentType,\r
'default' : '',\r
id : 'advContentType',\r
setup : setupAdvParams,\r
[\r
{\r
type : 'text',\r
- label : editor.lang.link.cssClasses,\r
+ label : linkLang.cssClasses,\r
'default' : '',\r
id : 'advCSSClasses',\r
setup : setupAdvParams,\r
},\r
{\r
type : 'text',\r
- label : editor.lang.link.charset,\r
+ label : linkLang.charset,\r
'default' : '',\r
id : 'advCharset',\r
setup : setupAdvParams,\r
[\r
{\r
type : 'text',\r
- label : editor.lang.link.styles,\r
+ label : linkLang.styles,\r
'default' : '',\r
id : 'advStyles',\r
setup : setupAdvParams,\r
\r
onclickList.push( featureList.join( ',' ), '\'); return false;' );\r
attributes[ '_cke_pa_onclick' ] = onclickList.join( '' );\r
+\r
+ // Add the "target" attribute. (#5074)\r
+ removeAttributes.push( 'target' );\r
}\r
else\r
{\r
{\r
var linkType = this.getContentElement( 'info', 'linkType' ),\r
urlField;\r
- if ( linkType && linkType.getValue( ) == 'url' )\r
+ if ( linkType && linkType.getValue() == 'url' )\r
{\r
urlField = this.getContentElement( 'info', 'url' );\r
urlField.select();\r