diff options
| author | hukl <contact@smyck.org> | 2009-09-09 12:07:57 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-09 12:07:57 +0200 |
| commit | a6292dd0fecd4482fe863ed849d126b5281b1a8a (patch) | |
| tree | 7c4c32e1a3448c5d1995a236ed01c731018da13d /public/javascripts/tiny_mce/themes/advanced/js/link.js | |
| parent | 83fe1b1abd7d7bb85679be3f1341e5c88db0ae83 (diff) | |
huge tiny_mce update - now using the tiny_mce jquery build which allows tiny_mce to be initialized via jquery - great!
Diffstat (limited to 'public/javascripts/tiny_mce/themes/advanced/js/link.js')
| -rw-r--r--[-rwxr-xr-x] | public/javascripts/tiny_mce/themes/advanced/js/link.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/public/javascripts/tiny_mce/themes/advanced/js/link.js b/public/javascripts/tiny_mce/themes/advanced/js/link.js index 2974878..f67a5bc 100755..100644 --- a/public/javascripts/tiny_mce/themes/advanced/js/link.js +++ b/public/javascripts/tiny_mce/themes/advanced/js/link.js | |||
| @@ -53,6 +53,7 @@ var LinkDialog = { | |||
| 53 | 53 | ||
| 54 | // Create new anchor elements | 54 | // Create new anchor elements |
| 55 | if (e == null) { | 55 | if (e == null) { |
| 56 | ed.getDoc().execCommand("unlink", false, null); | ||
| 56 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); | 57 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); |
| 57 | 58 | ||
| 58 | tinymce.each(ed.dom.select("a"), function(n) { | 59 | tinymce.each(ed.dom.select("a"), function(n) { |
| @@ -62,8 +63,8 @@ var LinkDialog = { | |||
| 62 | ed.dom.setAttribs(e, { | 63 | ed.dom.setAttribs(e, { |
| 63 | href : f.href.value, | 64 | href : f.href.value, |
| 64 | title : f.linktitle.value, | 65 | title : f.linktitle.value, |
| 65 | target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, | 66 | target : f.target_list ? getSelectValue(f, "target_list") : null, |
| 66 | 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null | 67 | 'class' : f.class_list ? getSelectValue(f, "class_list") : null |
| 67 | }); | 68 | }); |
| 68 | } | 69 | } |
| 69 | }); | 70 | }); |
| @@ -71,8 +72,8 @@ var LinkDialog = { | |||
| 71 | ed.dom.setAttribs(e, { | 72 | ed.dom.setAttribs(e, { |
| 72 | href : f.href.value, | 73 | href : f.href.value, |
| 73 | title : f.linktitle.value, | 74 | title : f.linktitle.value, |
| 74 | target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, | 75 | target : f.target_list ? getSelectValue(f, "target_list") : null, |
| 75 | 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null | 76 | 'class' : f.class_list ? getSelectValue(f, "class_list") : null |
| 76 | }); | 77 | }); |
| 77 | } | 78 | } |
| 78 | 79 | ||
| @@ -92,7 +93,7 @@ var LinkDialog = { | |||
| 92 | if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) | 93 | if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) |
| 93 | n.value = 'mailto:' + n.value; | 94 | n.value = 'mailto:' + n.value; |
| 94 | 95 | ||
| 95 | if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) | 96 | if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) |
| 96 | n.value = 'http://' + n.value; | 97 | n.value = 'http://' + n.value; |
| 97 | }, | 98 | }, |
| 98 | 99 | ||
