summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/themes/advanced/jscripts
diff options
context:
space:
mode:
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;