X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Ftools.js;h=2492beb2a16a63539e9b2119d341bf063d199d51;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=9407fd70f715f05092d723980d742a08f12ffe1a;hpb=055b6b0792ce7dc53d47af606b367c04b927c2ab;p=ckeditor.git
diff --git a/_source/core/tools.js b/_source/core/tools.js
index 9407fd7..2492beb 100644
--- a/_source/core/tools.js
+++ b/_source/core/tools.js
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
@@ -346,19 +346,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
},
/**
- * Replace characters can't be represented through CSS Selectors string
- * by CSS Escape Notation where the character escape sequence consists
- * of a backslash character (\) followed by the orginal characters.
- * Ref: http://www.w3.org/TR/css3-selectors/#grammar
- * @param cssSelectText
- * @return the escaped selector text.
- */
- escapeCssSelector : function( cssSelectText )
- {
- return cssSelectText.replace( /[\s#:.,$*^\[\]()~=+>]/g, '\\$&' );
- },
-
- /**
* Gets a unique number for this CKEDITOR execution session. It returns
* progressive numbers starting at 1.
* @function
@@ -377,6 +364,20 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
})(),
/**
+ * Gets a unique ID for CKEditor's interface elements. It returns a
+ * string with the "cke_" prefix and a progressive number.
+ * @function
+ * @returns {String} A unique ID.
+ * @example
+ * alert( CKEDITOR.tools.getNextId() ); // "cke_1" (e.g.)
+ * alert( CKEDITOR.tools.getNextId() ); // "cke_2"
+ */
+ getNextId : function()
+ {
+ return 'cke_' + this.getNextNumber();
+ },
+
+ /**
* Creates a function override.
* @param {Function} originalFunction The function to be overridden.
* @param {Function} functionBuilder A function that returns the new
@@ -637,7 +638,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
{
return functions.push( function()
{
- fn.apply( scope || this, arguments );
+ return fn.apply( scope || this, arguments );
}) - 1;
},