summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/themes/advanced/jscripts
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2007-05-24 03:49:19 +0000
committersvncommit <devs@roundcube.net>2007-05-24 03:49:19 +0000
commit2c633703e97eb6e7aa7ba840ef86b1fc1bd98ada (patch)
tree39cf2cada6948a447985436c1d6f7f2b512cba20 /program/js/tiny_mce/themes/advanced/jscripts
parent597c09cf972ffb3c4e86adfcd79aa86b0258d3a8 (diff)
upgrade to TinyMCE v2.1.1.1
Diffstat (limited to 'program/js/tiny_mce/themes/advanced/jscripts')
-rw-r--r--program/js/tiny_mce/themes/advanced/jscripts/color_picker.js13
-rw-r--r--program/js/tiny_mce/themes/advanced/jscripts/link.js8
2 files changed, 10 insertions, 11 deletions
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/color_picker.js b/program/js/tiny_mce/themes/advanced/jscripts/color_picker.js
index 358d6d706..00fc823de 100644
--- a/program/js/tiny_mce/themes/advanced/jscripts/color_picker.js
+++ b/program/js/tiny_mce/themes/advanced/jscripts/color_picker.js
@@ -153,7 +153,7 @@ function generateWebColors() {
for (i=0; i<colors.length; i++) {
h += '<td bgcolor="' + colors[i] + '">'
- + '<a href="javascript:selectColor();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');">'
+ + '<a href="javascript:insertAction();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');">'
+ '<img border="0" src="images/spacer.gif" width="10" height="10" title="' + colors[i] + '" alt="' + colors[i] + '" /></a></td>';
if ((i+1) % 18 == 0)
h += '</tr><tr>';
@@ -173,22 +173,13 @@ function generateNamedColors() {
for (n in named) {
v = named[n];
- h += '<a href="javascript:selectColor();" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '"><!-- IE --></a>'
+ h += '<a href="javascript:insertAction();" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '"><!-- IE --></a>'
}
el.innerHTML = h;
el.className = 'generated';
}
-function selectColor() {
- var color = document.getElementById("color").value;
-
- if(window.opener)
- window.opener.tinyMCE.execInstanceCommand(tinyMCE.getWindowArg('editor_id'),tinyMCE.getWindowArg('command'),false,color);
-
- window.close();
-}
-
function dechex(n) {
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
}
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/link.js b/program/js/tiny_mce/themes/advanced/jscripts/link.js
index e80f2a436..e195497e1 100644
--- a/program/js/tiny_mce/themes/advanced/jscripts/link.js
+++ b/program/js/tiny_mce/themes/advanced/jscripts/link.js
@@ -50,6 +50,14 @@ function init() {
}
}
+function checkPrefix(n) {
+ if (Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCE.getLang('lang_is_email')))
+ n.value = 'mailto:' + n.value;
+
+ if (/^\s*www./i.test(n.value) && confirm(tinyMCE.getLang('lang_is_external')))
+ n.value = 'http://' + n.value;
+}
+
function insertLink() {
var href = document.forms[0].href.value;
var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value;