mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user