From f0ea59bc8873461e060032f69d46032a97b68331 Mon Sep 17 00:00:00 2001 From: svncommit Date: Wed, 8 Nov 2006 02:23:06 +0000 Subject: upgrade to TinyMCE v2.0.8 --- program/js/tiny_mce/utils/editable_selects.js | 4 +- program/js/tiny_mce/utils/form_utils.js | 26 +-- program/js/tiny_mce/utils/mclayer.js | 6 +- program/js/tiny_mce/utils/mctabs.js | 4 +- program/js/tiny_mce/utils/validate.js | 235 ++++++++++++++++++++++---- 5 files changed, 219 insertions(+), 56 deletions(-) (limited to 'program/js/tiny_mce/utils') diff --git a/program/js/tiny_mce/utils/editable_selects.js b/program/js/tiny_mce/utils/editable_selects.js index 81c99eb5c..5f300b49b 100644 --- a/program/js/tiny_mce/utils/editable_selects.js +++ b/program/js/tiny_mce/utils/editable_selects.js @@ -1,7 +1,5 @@ /** - * $RCSfile: editable_selects.js,v $ - * $Revision: 1.1 $ - * $Date: 2006/04/10 09:30:19 $ + * $Id: editable_selects.js 18 2006-06-29 14:11:23Z spocke $ * * Makes select boxes editable. * diff --git a/program/js/tiny_mce/utils/form_utils.js b/program/js/tiny_mce/utils/form_utils.js index f1e935809..c502943d2 100644 --- a/program/js/tiny_mce/utils/form_utils.js +++ b/program/js/tiny_mce/utils/form_utils.js @@ -1,7 +1,5 @@ /** - * $RCSfile: form_utils.js,v $ - * $Revision: 1.11 $ - * $Date: 2006/04/07 15:53:12 $ + * $Id: form_utils.js 43 2006-08-08 16:10:07Z spocke $ * * Various form utilitiy functions. * @@ -9,18 +7,20 @@ * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. */ +var themeBaseURL = tinyMCE.baseURL + '/themes/' + tinyMCE.getParam("theme"); + function getColorPickerHTML(id, target_form_element) { - var html = ""; + var h = ""; - html += ''; - html += ''; + h += ''; + h += ''; - return html; + return h; } function pickColor(e, target_form_element) { @@ -57,7 +57,7 @@ function getBrowserHTML(id, target_form_element, type, prefix) { var html = ""; html += ''; - html += ' parseInt(v)) + st = this.mark(f, n); + } + } + + return st; + }, + + hasClass : function(n, c, d) { + return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className); + }, + + getNum : function(n, c) { + c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0]; + c = c.replace(/[^0-9]/g, ''); + + return c; + }, -function validateString(form_name, element_name) { - return (document.forms[form_name].elements[element_name].value.length > 0); -} + addClass : function(n, c, b) { + var o = this.removeClass(n, c); + n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c; + }, -function validateSelection(form_name, element_name) { - return (document.forms[form_name].elements[element_name].selectedIndex > 0); -} + removeClass : function(n, c) { + c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' '); + return n.className = c != ' ' ? c : ''; + }, -function validateCheckBox(form_name, element_name) { - return document.forms[form_name].elements[element_name].checked; -} + tags : function(f, s) { + return f.getElementsByTagName(s); + }, -function validateCleanString(form_name, element_name) { - return testRegExp(form_name, element_name, '^[A-Za-z0-9_]+$'); -} + mark : function(f, n) { + var s = this.settings; -function validateEmail(form_name, element_name) { - return testRegExp(form_name, element_name, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$'); -} + this.addClass(n, s.invalid_cls); + this.markLabels(f, n, s.invalid_cls); -function validateAbsUrl(form_name, element_name) { - return testRegExp(form_name, element_name, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+$'); -} + return false; + }, -function validateNumber(form_name, element_name, allow_blank) { - return (!allow_blank && value == '') ? false : testRegExp(form_name, element_name, '^-?[0-9]*\\.?[0-9]*$'); -} + markLabels : function(f, n, ic) { + var nl, i; -function validateSize(form_name, element_name,) { - return testRegExp(form_name, element_name, '^[0-9]+(px|%)?$'); -} + nl = this.tags(f, "label"); + for (i=0; i