espiceland: branch 2.0 r5166 - /branches/2.0/config/js/object.customs.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Apr 1 11:26:11 CDT 2011


Author: espiceland
Date: Fri Apr  1 11:26:07 2011
New Revision: 5166

URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5166
Log:
This has to be another instance of function definition.

Modified:
    branches/2.0/config/js/object.customs.js

Modified: branches/2.0/config/js/object.customs.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/object.customs.js?view=diff&rev=5166&r1=5165&r2=5166
==============================================================================
--- branches/2.0/config/js/object.customs.js (original)
+++ branches/2.0/config/js/object.customs.js Fri Apr  1 11:26:07 2011
@@ -322,7 +322,12 @@
 }
 
 String.prototype.trim = function(){ // alias to strip
-	return this.strip();
+	/* Thanks to Steve Levithan (http://stevenlevithan.com) for this code */
+	var str = this.replace(/^\s\s*/, ''),
+		ws = /\s/,
+		i = str.length;
+	while (ws.test(str.charAt(--i)));
+	return str.slice(0, i+1);
 };
 
 String.prototype.withOut = function(k){




More information about the asterisk-gui-commits mailing list