[Phpfreechat-svn] SF.net SVN: phpfreechat: [743] trunk/src/client/pfcclient.js
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-09-08 21:46:48
|
Revision: 743 http://svn.sourceforge.net/phpfreechat/?rev=743&view=rev Author: kerphi Date: 2006-09-08 14:46:42 -0700 (Fri, 08 Sep 2006) Log Message: ----------- Bug fix: the nickname TAB completion was broken. [fr] Bug fix : la completion a l'aide de la touche TAB des pseudonymes ne fonctionnait plus. Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-08 21:23:04 UTC (rev 742) +++ trunk/src/client/pfcclient.js 2006-09-08 21:46:42 UTC (rev 743) @@ -58,7 +58,7 @@ this.el_words = $('pfc_words'); this.el_handle = $('pfc_handle'); this.el_container = $('pfc_container'); - this.el_online = $('pfc_online'); +// this.el_online = $('pfc_online'); this.el_errors = $('pfc_errors'); /* the events callbacks */ @@ -392,11 +392,12 @@ var nick_src = w.value.substring(w.value.lastIndexOf(' ')+1,w.value.length); if (nick_src != '') { - var ul_online = this.el_online.firstChild; - for (var i=0; i<ul_online.childNodes.length; i++) + var tabid = this.gui.getTabId(); + var n_list = this.nicklist[tabid]; + for (var i=0; i<n_list.length; i++) { - var nick = ul_online.childNodes[i].innerHTML; - if (indexOf(nick, nick_src) == 0) + var nick = n_list[i]; + if (nick.indexOf(nick_src) == 0) w.value = w.value.replace(nick_src, nick); } } @@ -497,7 +498,7 @@ { if (!this.isconnected) return false; this.clearError(Array(this.el_words)); - var code = (evt.which) ? evt.which : event.keyCode + var code = (evt.which) ? evt.which : evt.keyCode if (code == 9) /* tab key */ { /* IE workaround : ignore TAB key here */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |