summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/themes/advanced/js/link.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-04-20 19:11:10 +0000
committerthomascube <thomas@roundcube.net>2011-04-20 19:11:10 +0000
commita9251be2f09fb5f18a85d201c67668c70980efe3 (patch)
tree59d8e5e6de86e4bcde237f2b5793eccb98a7ca87 /program/js/tiny_mce/themes/advanced/js/link.js
parent164b45964edc699db9e049dddd91e9de07635fcd (diff)
Update to TinyMCE 3.4.2 to fix errors in IE9v0.5.2@4679
Diffstat (limited to 'program/js/tiny_mce/themes/advanced/js/link.js')
-rw-r--r--program/js/tiny_mce/themes/advanced/js/link.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/program/js/tiny_mce/themes/advanced/js/link.js b/program/js/tiny_mce/themes/advanced/js/link.js
index f67a5bc82..53ff409e7 100644
--- a/program/js/tiny_mce/themes/advanced/js/link.js
+++ b/program/js/tiny_mce/themes/advanced/js/link.js
@@ -31,7 +31,7 @@ var LinkDialog = {
},
update : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor, e, b;
+ var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
tinyMCEPopup.restoreSelection();
e = ed.dom.getParent(ed.selection.getNode(), 'A');
@@ -39,7 +39,6 @@ var LinkDialog = {
// Remove element if there is no href
if (!f.href.value) {
if (e) {
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
b = ed.selection.getBookmark();
ed.dom.remove(e, 1);
ed.selection.moveToBookmark(b);
@@ -49,19 +48,17 @@ var LinkDialog = {
}
}
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
-
// Create new anchor elements
if (e == null) {
ed.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1});
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
tinymce.each(ed.dom.select("a"), function(n) {
if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
e = n;
ed.dom.setAttribs(e, {
- href : f.href.value,
+ href : href,
title : f.linktitle.value,
target : f.target_list ? getSelectValue(f, "target_list") : null,
'class' : f.class_list ? getSelectValue(f, "class_list") : null
@@ -70,7 +67,7 @@ var LinkDialog = {
});
} else {
ed.dom.setAttribs(e, {
- href : f.href.value,
+ href : href,
title : f.linktitle.value,
target : f.target_list ? getSelectValue(f, "target_list") : null,
'class' : f.class_list ? getSelectValue(f, "class_list") : null