Ticket #439: 439_3.patch
File 439_3.patch, 10.2 KB (added by , 15 years ago) |
---|
-
_whatsnew.html
37 37 <p> 38 38 New Features and Improvements:</p> 39 39 <ul> 40 <li></li> 40 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/439">#439</a>] Added a new 41 right-click menu open for opening links in the editor.</li> 41 42 </ul> 42 43 <p> 43 44 Fixed Bugs:</p> -
editor/_source/commandclasses/fck_othercommands.js
300 300 var state = FCK.GetNamedCommandState( this.Name ) ; 301 301 302 302 // Check that it isn't an anchor 303 if ( state == FCK_TRISTATE_OFF && FCK.EditMode == FCK_EDITMODE_WYSIWYG)303 if ( state == FCK_TRISTATE_OFF ) 304 304 { 305 305 var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; 306 306 var bIsAnchor = ( oLink && oLink.name.length > 0 && oLink.href.length == 0 ) ; … … 311 311 return state ; 312 312 } 313 313 314 FCKVisitLinkCommand = function() 315 { 316 this.Name = 'VisitLink'; 317 } 318 FCKVisitLinkCommand.prototype = 319 { 320 GetState : function() 321 { 322 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) 323 return FCK_TRISTATE_DISABLED ; 324 var state = FCK.GetNamedCommandState( 'Unlink' ) ; 325 326 if ( state == FCK_TRISTATE_OFF ) 327 { 328 var el = FCKSelection.MoveToAncestorNode( 'A' ) ; 329 if ( !el.href ) 330 state = FCK_TRISTATE_DISABLED ; 331 } 332 333 return state ; 334 }, 335 336 Execute : function() 337 { 338 var el = FCKSelection.MoveToAncestorNode( 'A' ) ; 339 var url = el.getAttribute( '_fcksavedurl' ) || el.getAttribute( 'href', 2 ) ; 340 341 // Check if it's a full URL. 342 // If not full URL, we'll need to apply the BaseHref setting. 343 if ( ! /:\/\//.test( url ) ) 344 { 345 var baseHref = FCKConfig.BaseHref ; 346 var parentWindow = FCK.GetInstanceObject( 'parent' ) ; 347 if ( !baseHref ) 348 { 349 baseHref = parentWindow.document.location.href ; 350 baseHref = baseHref.substring( 0, baseHref.lastIndexOf( '/' ) + 1 ) ; 351 } 352 353 if ( /^\//.test( url ) ) 354 { 355 try 356 { 357 baseHref = baseHref.match( /^.*:\/\/+[^\/]+/ )[0] ; 358 } 359 catch ( e ) 360 { 361 baseHref = parentWindow.document.location.protocol + '://' + parentWindow.parent.document.location.host ; 362 } 363 } 364 365 url = baseHref + url ; 366 } 367 368 if ( !window.open( url, '_blank' ) ) 369 alert( FCKLang.VisitLinkBlocked ) ; 370 } 371 } ; 372 314 373 // FCKSelectAllCommand 315 374 var FCKSelectAllCommand = function() 316 375 { -
editor/_source/internals/fck_contextmenu.js
131 131 if ( bInsideLink ) 132 132 menu.AddItem( 'Link', FCKLang.EditLink , 34 ) ; 133 133 menu.AddItem( 'Unlink' , FCKLang.RemoveLink , 35 ) ; 134 menu.AddSeparator() ; 135 menu.AddItem( 'VisitLink', FCKLang.VisitLink, 34 ) ; 134 136 } 135 137 }} ; 136 138 -
editor/_source/internals/fckcommands.js
51 51 case 'Templates' : oCommand = new FCKDialogCommand( 'Templates' , FCKLang.DlgTemplatesTitle , 'dialog/fck_template.html' , 380, 450 ) ; break ; 52 52 case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 300 ) ; break ; 53 53 case 'Unlink' : oCommand = new FCKUnlinkCommand() ; break ; 54 case 'VisitLink' : oCommand = new FCKVisitLinkCommand() ; break ; 54 55 case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 160 ) ; break ; 55 56 case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ; 56 57 case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 160 ) ; break ; -
editor/lang/en-au.js
44 44 InsertLinkLbl : "Link", 45 45 InsertLink : "Insert/Edit Link", 46 46 RemoveLink : "Remove Link", 47 VisitLink : "Open Link", 47 48 Anchor : "Insert/Edit Anchor", 48 49 AnchorDelete : "Remove Anchor", 49 50 InsertImageLbl : "Image", … … 157 158 NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", 158 159 BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", 159 160 DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", 161 VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", 160 162 161 163 // Dialogs 162 164 DlgBtnOK : "OK", -
editor/lang/en-ca.js
44 44 InsertLinkLbl : "Link", 45 45 InsertLink : "Insert/Edit Link", 46 46 RemoveLink : "Remove Link", 47 VisitLink : "Open Link", 47 48 Anchor : "Insert/Edit Anchor", 48 49 AnchorDelete : "Remove Anchor", 49 50 InsertImageLbl : "Image", … … 157 158 NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", 158 159 BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", 159 160 DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", 161 VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", 160 162 161 163 // Dialogs 162 164 DlgBtnOK : "OK", -
editor/lang/en-uk.js
44 44 InsertLinkLbl : "Link", 45 45 InsertLink : "Insert/Edit Link", 46 46 RemoveLink : "Remove Link", 47 VisitLink : "Open Link", 47 48 Anchor : "Insert/Edit Anchor", 48 49 AnchorDelete : "Remove Anchor", 49 50 InsertImageLbl : "Image", … … 157 158 NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", 158 159 BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", 159 160 DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", 161 VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", 160 162 161 163 // Dialogs 162 164 DlgBtnOK : "OK", -
editor/lang/en.js
44 44 InsertLinkLbl : "Link", 45 45 InsertLink : "Insert/Edit Link", 46 46 RemoveLink : "Remove Link", 47 VisitLink : "Open Link", 47 48 Anchor : "Insert/Edit Anchor", 48 49 AnchorDelete : "Remove Anchor", 49 50 InsertImageLbl : "Image", … … 157 158 NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", 158 159 BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", 159 160 DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", 161 VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", 160 162 161 163 // Dialogs 162 164 DlgBtnOK : "OK", -
editor/lang/zh-cn.js
44 44 InsertLinkLbl : "超链接", 45 45 InsertLink : "插入/编辑超链接", 46 46 RemoveLink : "取消超链接", 47 VisitLink : "打开超链接", 47 48 Anchor : "插入/编辑锚点链接", 48 49 AnchorDelete : "清除锚点链接", 49 50 InsertImageLbl : "图象", … … 157 158 NoActiveX : "浏览器安全设置限制了本编辑器的某些功能。您必须启用安全设置中的“运行 ActiveX 控件和插件”,否则将出现某些错误并缺少功能。", 158 159 BrowseServerBlocked : "无法打开资源浏览器,请确认是否启用了禁止弹出窗口。", 159 160 DialogBlocked : "无法打开对话框窗口,请确认是否启用了禁止弹出窗口或网页对话框(IE)。", 161 VisitLinkBlocked : "无法打开新窗口,请确认是否启用了禁止弹出窗口或网页对话框(IE)。", 160 162 161 163 // Dialogs 162 164 DlgBtnOK : "确定", -
editor/lang/zh.js
44 44 InsertLinkLbl : "超連結", 45 45 InsertLink : "插入/編輯超連結", 46 46 RemoveLink : "移除超連結", 47 VisitLink : "開啟超連結", 47 48 Anchor : "插入/編輯錨點", 48 49 AnchorDelete : "移除錨點", 49 50 InsertImageLbl : "影像", … … 157 158 NoActiveX : "瀏覽器的安全性設定限制了本編輯器的某些功能。您必須啟用安全性設定中的「執行ActiveX控制項與外掛程式」項目,否則本編輯器將會出現錯誤並缺少某些功能", 158 159 BrowseServerBlocked : "無法開啟資源瀏覽器,請確定所有快顯視窗封鎖程式是否關閉", 159 160 DialogBlocked : "無法開啟對話視窗,請確定所有快顯視窗封鎖程式是否關閉", 161 VisitLinkBlocked : "無法開啟新視窗,請確定所有快顯視窗封鎖程式是否關閉", 160 162 161 163 // Dialogs 162 164 DlgBtnOK : "確定",