TinyMCE 3.05 from azaozz. fixes #6195

git-svn-id: https://develop.svn.wordpress.org/trunk@7270 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-12 22:47:11 +00:00
parent 71827ccadf
commit af1a108e7e
27 changed files with 146 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
/**
* $Id: form_utils.js 614 2008-02-20 17:57:57Z spocke $
* $Id: form_utils.js 673 2008-03-06 13:26:20Z spocke $
*
* Various form utilitiy functions.
*
@@ -170,7 +170,7 @@ function convertHexToRGB(col) {
}
function trimSize(size) {
return size.replace(new RegExp('[^0-9%]', 'gi'), '');
return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
}
function getCSSSize(size) {
@@ -179,7 +179,11 @@ function getCSSSize(size) {
if (size == "")
return "";
return size.indexOf('%') != -1 ? size : size + "px";
// Add px
if (/^[0-9]+$/.test(size))
size += 'px';
return size;
}
function getStyle(elm, attrib, style) {

View File

@@ -1,5 +1,5 @@
/**
* $Id: validate.js 520 2008-01-07 16:30:32Z spocke $
* $Id: validate.js 673 2008-03-06 13:26:20Z spocke $
*
* Various form validation methods.
*
@@ -31,7 +31,7 @@ var Validator = {
},
isSize : function(s) {
return this.test(s, '^[0-9]+(px|%)?$');
return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
},
isId : function(s) {