Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [683] trunk/src/client/pfcclient.js
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-08-19 08:25:15
|
Revision: 683 Author: kerphi Date: 2006-08-19 01:25:08 -0700 (Sat, 19 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=683&view=rev Log Message: ----------- Bug fix: don't notify the tabs when old message are posted (when history is shown at first load) Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-08-18 22:09:53 UTC (rev 682) +++ trunk/src/client/pfcclient.js 2006-08-19 08:25:08 UTC (rev 683) @@ -670,12 +670,14 @@ line += '</div>'; // notify the hidden tab a message has been received - if (cmd == 'send' || cmd == 'me') - { - var tabid = recipientid; - if (this.gui.getTabId() != tabid) - this.gui.notifyTab(tabid); - } + // don't notify anything if this is old messages + if (oldmsg == 0) + if (cmd == 'send' || cmd == 'me') + { + var tabid = recipientid; + if (this.gui.getTabId() != tabid) + this.gui.notifyTab(tabid); + } if (msg_html[recipientid] == null) msg_html[recipientid] = line; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-08-25 19:37:13
|
Revision: 701 Author: kerphi Date: 2006-08-25 12:37:08 -0700 (Fri, 25 Aug 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=701&view=rev Log Message: ----------- [en] Bug fix: nicknames colors list were not correctly reloaded when al lwas assigned. [fr] Bug fix?\194?\160: la liste des couleurs des pseudonymes n'?\195?\169tait pas correctement recharg?\195?\169e lorsqu'elle ?\195?\169tait vide. Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-08-25 15:23:26 UTC (rev 700) +++ trunk/src/client/pfcclient.js 2006-08-25 19:37:08 UTC (rev 701) @@ -956,7 +956,7 @@ */ reloadColorList: function() { - this.colorlist = pfc_nickname_color_list; + this.colorlist = $A(pfc_nickname_color_list); }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-09-03 17:28:42
|
Revision: 731 http://svn.sourceforge.net/phpfreechat/?rev=731&view=rev Author: kerphi Date: 2006-09-03 10:28:36 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Bug fix: on mozilla if the user cancel the bbcode prompt popup, a js error occurs Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-03 16:22:24 UTC (rev 730) +++ trunk/src/client/pfcclient.js 2006-09-03 17:28:36 UTC (rev 731) @@ -1206,6 +1206,7 @@ if (startPos == endPos && promptifselempty) { text = prompt(this.res.getLabel('Enter the text to format'),''); + if (text == null) text = ""; extralength = text.length; } if (text.length > 0 || !promptifselempty) @@ -1220,6 +1221,7 @@ else { var text = prompt(this.res.getLabel('Enter the text to format'),''); + if (text == null) text = ""; if (text.length > 0 || !promptifselempty) { msgfield.value += open + text + close; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <ke...@us...> - 2006-09-10 16:11:08
|
Revision: 745 http://svn.sourceforge.net/phpfreechat/?rev=745&view=rev Author: kerphi Date: 2006-09-10 09:11:02 -0700 (Sun, 10 Sep 2006) Log Message: ----------- [en] Bug fix: the % charactere was not allowed in the url format. [fr] Bug fix : le caractere % n'?\195?\169tait pas authoris?\195?\169 dans les urls ecrites sur le chat. Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-10 16:10:16 UTC (rev 744) +++ trunk/src/client/pfcclient.js 2006-09-10 16:11:02 UTC (rev 745) @@ -845,7 +845,7 @@ var rx = null; // parse urls - var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\/\\?\\=\\&\\-\\_\\#:;]*)([^\\"]|$)','ig'); + var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\/\\?\\=\\&\\-\\_\\#:;%]*)([^\\"]|$)','ig'); var ttt = msg.split(rx_url); if (ttt.length > 1 && !navigator.appName.match("Explorer|Konqueror") && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-09-12 13:13:08
|
Revision: 754 http://svn.sourceforge.net/phpfreechat/?rev=754&view=rev Author: kerphi Date: 2006-09-12 06:12:59 -0700 (Tue, 12 Sep 2006) Log Message: ----------- Bug fix: the windows notifier counter was not reset when the window was reactivated Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-12 07:48:17 UTC (rev 753) +++ trunk/src/client/pfcclient.js 2006-09-12 13:12:59 UTC (rev 754) @@ -63,7 +63,7 @@ this.detectactivity = new DetectActivity(this.el_container); // restore the window title when user come back to the active zone - if (pfc_notify_window) this.detectactivity.onunactivate = this.gui.unnotifyWindow; + if (pfc_notify_window) this.detectactivity.onunactivate = this.gui.unnotifyWindow.bindAsEventListener(this.gui); /* the events callbacks */ Event.observe(this.el_words, 'keypress', this.callbackWords_OnKeypress.bindAsEventListener(this), false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-09-19 06:51:22
|
Revision: 769 http://svn.sourceforge.net/phpfreechat/?rev=769&view=rev Author: kerphi Date: 2006-09-18 23:51:13 -0700 (Mon, 18 Sep 2006) Log Message: ----------- fix a js syntax error Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-18 20:49:50 UTC (rev 768) +++ trunk/src/client/pfcclient.js 2006-09-19 06:51:13 UTC (rev 769) @@ -1025,7 +1025,7 @@ applyNickColor: function(root, nick, color) { - var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ hex_md5(_to_utf8(nick)), '') + var nicktochange = this.getElementsByClassName(root, 'pfc_nick_'+ hex_md5(_to_utf8(nick)), ''); for(var i = 0; nicktochange.length > i; i++) nicktochange[i].style.color = color; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-04 09:34:59
|
Revision: 818 http://svn.sourceforge.net/phpfreechat/?rev=818&view=rev Author: kerphi Date: 2006-10-04 02:34:53 -0700 (Wed, 04 Oct 2006) Log Message: ----------- [en] Bug fix: complete nicknames function was broken [15min] [fr] Bug fix : la completion des pseudonymes ne fonctionnait plus [15min] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-04 09:28:29 UTC (rev 817) +++ trunk/src/client/pfcclient.js 2006-10-04 09:34:53 UTC (rev 818) @@ -69,7 +69,9 @@ if (pfc_notify_window) this.detectactivity.onunactivate = this.gui.unnotifyWindow.bindAsEventListener(this.gui); /* the events callbacks */ - Event.observe(this.el_words, 'keypress', this.callbackWords_OnKeypress.bindAsEventListener(this), false); + this.el_words.onkeypress = this.callbackWords_OnKeypress.bindAsEventListener(this); +// don't use this line because when doing completeNick the "return false" doesn't work (focus is lost) +// Event.observe(this.el_words, 'keypress', this.callbackWords_OnKeypress.bindAsEventListener(this), false); Event.observe(this.el_words, 'keydown', this.callbackWords_OnKeydown.bindAsEventListener(this), false); Event.observe(this.el_words, 'focus', this.callbackWords_OnFocus.bindAsEventListener(this), false); Event.observe(this.el_handle, 'keydown', this.callbackHandle_OnKeydown.bindAsEventListener(this), false); @@ -535,7 +537,7 @@ if (nick_src != '') { var tabid = this.gui.getTabId(); - var n_list = this.nicklist[tabid]; + var n_list = this.chanmeta[tabid]['users']['nick']; for (var i=0; i<n_list.length; i++) { var nick = n_list[i]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-16 18:00:49
|
Revision: 833 http://svn.sourceforge.net/phpfreechat/?rev=833&view=rev Author: kerphi Date: 2006-10-16 11:00:41 -0700 (Mon, 16 Oct 2006) Log Message: ----------- [en] Optimize the /update command : a new update command is not sent since the last response is not received. [30min] [fr] Optimisation de la commande /update : une nouvelle command /update n'est pas envoy?\195?\169 tant que la r?\195?\169ponse du pr?\195?\169cedent n'est pas re?\195?\167u. [30min] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-16 17:31:18 UTC (rev 832) +++ trunk/src/client/pfcclient.js 2006-10-16 18:00:41 UTC (rev 833) @@ -311,6 +311,7 @@ { if (resp == "ok") { + this.canupdatenexttime = true; } } else if (cmd == "version") @@ -845,7 +846,12 @@ clearTimeout(this.timeout); if (start) { - var res = this.sendRequest('/update'); + var res = true; + if (this.canupdatenexttime) + { + res = this.sendRequest('/update'); + this.canupdatenexttime = false; // don't update since the 'ok' response is received + } // adjust the refresh_delay if the connection was lost if (res == false) { this.refresh_delay = this.refresh_delay * 2; } // setup the next update This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-19 07:22:16
|
Revision: 836 http://svn.sourceforge.net/phpfreechat/?rev=836&view=rev Author: kerphi Date: 2006-10-19 00:21:18 -0700 (Thu, 19 Oct 2006) Log Message: ----------- fix a problem when update command returns false. Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-17 08:06:31 UTC (rev 835) +++ trunk/src/client/pfcclient.js 2006-10-19 07:21:18 UTC (rev 836) @@ -309,10 +309,7 @@ } else if (cmd == "update") { - if (resp == "ok") - { - this.canupdatenexttime = true; - } + this.canupdatenexttime = true; } else if (cmd == "version") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-25 12:13:26
|
Revision: 843 http://svn.sourceforge.net/phpfreechat/?rev=843&view=rev Author: kerphi Date: 2006-10-25 05:13:20 -0700 (Wed, 25 Oct 2006) Log Message: ----------- [en] Bug fix: sometimes the nicknames list was blank [2h30] [fr] Bug fix : quelques fois la liste des pseudo n'?\195?\169tait pas affich?\195?\169 [2h30] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-25 11:26:01 UTC (rev 842) +++ trunk/src/client/pfcclient.js 2006-10-25 12:13:20 UTC (rev 843) @@ -475,22 +475,34 @@ getAllUserMeta: function(nickid) { - return this.usermeta[nickid]; + if (nickid && this.usermeta[nickid]) + return this.usermeta[nickid]; + else + return null; }, getUserMeta: function(nickid, key) { - return this.usermeta[nickid][key]; + if (nickid && key && this.usermeta[nickid] && this.usermeta[nickid][key]) + return this.usermeta[nickid][key]; + else + return ''; }, getAllChanMeta: function(chanid) { - return this.chanmeta[chanid]; + if (chanid && this.chanmeta[chanid]) + return this.chanmeta[chanid]; + else + return null; }, getChanMeta: function(chanid, key) { - return this.chanmeta[chanid][key]; + if (chanid && key && this.chanmeta[chanid] && this.chanmeta[chanid][key]) + return this.chanmeta[chanid][key]; + else + return ''; }, doSendMessage: function() @@ -901,7 +913,6 @@ for (var i=0; i<nickidlst.length; i++) { var nickid = nickidlst[i]; - var li = this.buildNickItem(nickid); li.setAttribute('class', 'pfc_nickitem_'+nickid); li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE6 @@ -1018,6 +1029,7 @@ { var nick = this.getUserMeta(nickid, 'nick'); var isadmin = this.getUserMeta(nickid, 'isadmin'); + if (isadmin == '') isadmin = false; var li = document.createElement('li'); var img = document.createElement('img'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-26 08:24:02
|
Revision: 844 http://svn.sourceforge.net/phpfreechat/?rev=844&view=rev Author: kerphi Date: 2006-10-26 01:23:57 -0700 (Thu, 26 Oct 2006) Log Message: ----------- [en] The nicknames in the list are clickable for opening the whois box. [10min] [fr] Les pseudonymes de la liste sont maintenant clickables et ouvrent la boite whois. [10min] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-25 12:13:20 UTC (rev 843) +++ trunk/src/client/pfcclient.js 2006-10-26 08:23:57 UTC (rev 844) @@ -1030,19 +1030,15 @@ var nick = this.getUserMeta(nickid, 'nick'); var isadmin = this.getUserMeta(nickid, 'isadmin'); if (isadmin == '') isadmin = false; + var li = document.createElement('li'); + li.style.borderBottom = '1px solid #AAA'; - var img = document.createElement('img'); - if (isadmin) - img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); - else - img.setAttribute('src', this.res.getFileUrl('images/user.gif')); - img.style.marginRight = '5px'; - img.setAttribute('class', 'pfc_nickbutton'); - img.setAttribute('className', 'pfc_nickbutton'); // for IE6 - img.pfc_nick = nick; - img.pfc_nickid = nickid; - img.onclick = function(evt){ + var a = document.createElement('a'); + a.setAttribute('href','#'); + a.pfc_nick = nick; + a.pfc_nickid = nickid; + a.onclick = function(evt){ var d = pfc.getNickWhoisBox(this.pfc_nickid); document.body.appendChild(d); d.style.display = 'block'; @@ -1052,22 +1048,29 @@ d.style.top = (mousePosY(evt)-5)+'px'; return false; } - li.appendChild(img); + li.appendChild(a); - + + var img = document.createElement('img'); + if (isadmin) + img.setAttribute('src', this.res.getFileUrl('images/user-admin.gif')); + else + img.setAttribute('src', this.res.getFileUrl('images/user.gif')); + img.style.marginRight = '5px'; + img.setAttribute('class', 'pfc_nickbutton'); + img.setAttribute('className', 'pfc_nickbutton'); // for IE6 + a.appendChild(img); + // nobr is not xhtml valid but it's a workeround // for IE which doesn't support 'white-space: pre' css rule var nobr = document.createElement('nobr'); var span = document.createElement('span'); span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid); span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE6 - span.pfc_nick = nick; - span.pfc_nickid = nickid; - span.onclick = function(){pfc.insert_text(this.pfc_nick+", ","",false); return false;} span.appendChild(document.createTextNode(nick)); nobr.appendChild(span); - li.appendChild(nobr); - li.style.borderBottom = '1px solid #AAA'; + a.appendChild(nobr); + return li; }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-11-15 07:40:54
|
Revision: 875 http://svn.sourceforge.net/phpfreechat/?rev=875&view=rev Author: kerphi Date: 2006-11-14 23:40:50 -0800 (Tue, 14 Nov 2006) Log Message: ----------- [en] Fix a url parsing bug : the ~ character was ignored. (thanks to firebane) [15min] [fr] R?\195?\169soud un probl?\195?\168me de parsing des urls ayant le caract?\195?\168re ~ (merci ?\195?\160 firebane) [15min] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-11-15 07:30:57 UTC (rev 874) +++ trunk/src/client/pfcclient.js 2006-11-15 07:40:50 UTC (rev 875) @@ -1117,7 +1117,7 @@ var rx = null; // parse urls - var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\/\\?\\=\\&\\-\\_\\#:;%]*)([^\\"]|$)','ig'); + var rx_url = new RegExp('(^|[^\\"])([a-z]+\:\/\/[a-z0-9.\\~\\/\\?\\=\\&\\-\\_\\#:;%]*)([^\\"]|$)','ig'); var ttt = msg.split(rx_url); if (ttt.length > 1 && !navigator.appName.match("Explorer|Konqueror") && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-11-28 16:52:45
|
Revision: 879 http://svn.sourceforge.net/phpfreechat/?rev=879&view=rev Author: kerphi Date: 2006-11-28 08:52:37 -0800 (Tue, 28 Nov 2006) Log Message: ----------- [en] Hide the isadmin user metadata from the whois box. This parameter is useless because of the glod shield icon. [15min] [fr] Cache le param?\195?\168tre isadmin dans la boite whois car le bouclier en or suffit amplement pour montrer que l'utilisateur est administrateur. [15min] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-11-27 17:36:52 UTC (rev 878) +++ trunk/src/client/pfcclient.js 2006-11-28 16:52:37 UTC (rev 879) @@ -1014,6 +1014,7 @@ var k = um_keys[i]; var v = um[k]; if (v && k != 'nickid' + && k != 'isadmin' // useless because of the gold shield icon && k != 'floodtime' && k != 'flood_nbmsg' && k != 'flood_nbchar' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-11-29 17:26:18
|
Revision: 883 http://svn.sourceforge.net/phpfreechat/?rev=883&view=rev Author: kerphi Date: 2006-11-29 09:26:09 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Bug fix: correct the sound button label order and refresh the button at startup Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-11-29 16:33:12 UTC (rev 882) +++ trunk/src/client/pfcclient.js 2006-11-29 17:26:09 UTC (rev 883) @@ -125,6 +125,7 @@ this.refresh_loginlogout(); this.refresh_minimize_maximize(); this.refresh_Smileys(); + this.refresh_sound(); this.refresh_nickmarker(); }, @@ -1412,13 +1413,13 @@ if (this.issoundenable) { snd_icon.src = this.res.getFileUrl('images/sound-on.gif'); - snd_icon.alt = this.res.getLabel('Play sound'); + snd_icon.alt = this.res.getLabel('Mute sound'); snd_icon.title = snd_icon.alt; } else { snd_icon.src = this.res.getFileUrl('images/sound-off.gif'); - snd_icon.alt = this.res.getLabel('Mute sound'); + snd_icon.alt = this.res.getLabel('Play sound'); snd_icon.title = snd_icon.alt; } }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-12-07 14:48:43
|
Revision: 891 http://svn.sourceforge.net/phpfreechat/?rev=891&view=rev Author: kerphi Date: 2006-12-07 06:38:34 -0800 (Thu, 07 Dec 2006) Log Message: ----------- bug fix: the max_displayed_lines feature was broken because the tab id was ignored so messages could disapear in other tabs. Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-12-06 22:45:30 UTC (rev 890) +++ trunk/src/client/pfcclient.js 2006-12-07 14:38:34 UTC (rev 891) @@ -776,7 +776,7 @@ handleComingRequest: function( cmds ) { var msg_html = $H(); - var max_msgid = 0; + var max_msgid = $H(); //alert(cmds.inspect()); @@ -795,7 +795,7 @@ // format and post message var line = ''; - line += '<div id="pfc_msg'+ id +'" class="pfc_cmd_'+ cmd +' pfc_message'; + line += '<div id="pfc_msg_'+recipientid+'_'+id+'" class="pfc_cmd_'+ cmd +' pfc_message'; line += (id % 2 == 0) ? ' pfc_evenmsg' : ' pfc_oddmsg'; if (oldmsg == 1) line += ' pfc_oldmsg'; line += '">'; @@ -840,7 +840,8 @@ msg_html[recipientid] += line; // remember the max message id in order to clean old lines - if (max_msgid < id) max_msgid = id; + if (!max_msgid[recipientid]) max_msgid[recipientid] = 0; + if (max_msgid[recipientid] < id) max_msgid[recipientid] = id; } // loop on all recipients and post messages @@ -861,22 +862,23 @@ // finaly append this to the message list recipientdiv.appendChild(m); this.gui.scrollDown(tabid, m); + + // delete the old messages from the client (save some memory) + var limit_msgid = max_msgid[recipientid] - pfc_max_displayed_lines; + var elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); + while (elt) + { + // delete this element to save browser memory + if (is_ff) + elt.innerHTML = ''; + else + // this code don't work in FF, why ? don't know .. + elt.parentElement.removeChild(elt); + limit_msgid--; + elt = $('pfc_msg_'+recipientid+'_'+limit_msgid); + } } - // delete the old messages from the client (save some memory) - var limit_msgid = max_msgid - pfc_max_displayed_lines; - var elt = $('pfc_msg'+limit_msgid); - while (elt) - { - // delete this element to save browser memory - if (is_ff) - elt.innerHTML = ''; - else - // this code don't work in FF, why ? don't know .. - elt.parentElement.removeChild(elt); - limit_msgid--; - elt = $('pfc_msg'+limit_msgid); - } }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |