[Phpfreechat-svn] SF.net SVN: phpfreechat: [1115] trunk/data/public/js/pfcclient.js
Status: Beta
Brought to you by:
kerphi
|
From: <gpi...@us...> - 2007-08-11 06:41:58
|
Revision: 1115
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1115&view=rev
Author: gpinzone
Date: 2007-08-10 23:41:57 -0700 (Fri, 10 Aug 2007)
Log Message:
-----------
Replace spaces in nick text with to help with completion of nicknames that contain spaces.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-08-11 00:22:37 UTC (rev 1114)
+++ trunk/data/public/js/pfcclient.js 2007-08-11 06:41:57 UTC (rev 1115)
@@ -591,19 +591,12 @@
return false;
},
- reverse: function(inp)
- {
- var outp = '';
-
- for (var i = 0; i < inp.length; i++)
- outp = inp.charAt(i) + outp;
-
- return outp;
- },
-
/**
* Try to complete a nickname like on IRC when pressing the TAB key
* Nicks with spaces may not work under certain circumstances
+ * Replacing standards spaces with alternate spaces (e.g., ) helps
+ * Gecko browsers convert the to regular spaces
+ * TODO: Move cursor to end of line after nick completion in Konqueror and Webkit browsers
* Note: IRC does not allow nicks with spaces
*/
completeNick: function()
@@ -621,6 +614,8 @@
for (var i = 0; i < n_list.length; i++)
{
var nick_tmp = n_list[i];
+ // replace spaces in nicks with
+ nick_tmp = nick_tmp.replace(/ /g, '\240');
if (nick_tmp.indexOf(nick_src) == 0)
{
if (! nick_match)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|