Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat:[1251] trunk/data/public/js/pfcclient.js
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2008-09-12 09:37:35
|
Revision: 1251 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1251&view=rev Author: kerphi Date: 2008-09-12 09:37:45 +0000 (Fri, 12 Sep 2008) Log Message: ----------- The notice and the me command have to be differentiated client side. Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2008-09-11 12:47:11 UTC (rev 1250) +++ trunk/data/public/js/pfcclient.js 2008-09-12 09:37:45 UTC (rev 1251) @@ -966,7 +966,9 @@ line += '›'; line += '</span> '; } - if (cmd == 'notice' || cmd == 'me') + if (cmd == 'notice') + line += '<span class="pfc_words">* ' + this.parseMessage(param) +'</span> '; + else if (cmd == 'me') line += '<span class="pfc_words">* '+ sender.escapeHTML() + ' ' + this.parseMessage(param) +'</span> '; else line += '<span class="pfc_words">'+ this.parseMessage(param) +'</span> '; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2008-11-10 09:40:18
|
Revision: 1253 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1253&view=rev Author: kerphi Date: 2008-11-10 09:40:09 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Bug fix: fix a parsing problem with bbcode [color] tag on konqueror browser (sourceforge patch #2234430) Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2008-09-12 12:26:17 UTC (rev 1252) +++ trunk/data/public/js/pfcclient.js 2008-11-10 09:40:09 UTC (rev 1253) @@ -1524,11 +1524,11 @@ rx = new RegExp('\\[email=([A-z0-9][\\w.-]*@[A-z0-9][\\w\\-\\.]+\\.[A-z0-9]{2,6})\\](.+?)\\[\/email\\]','ig'); msg = msg.replace(rx, '<a href="mailto: $1">$2</a>'); */ - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); + rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})\\](.+?)\\[\/color\\]','ig'); msg = msg.replace(rx, '<span style="color: $1">$2</span>'); // parse bbcode colors twice because the current_text_color is a bbcolor // so it's possible to have a bbcode color imbrication - rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})](.+?)\\[\/color\\]','ig'); + rx = new RegExp('\\[color=([a-zA-Z]+|\\#?[0-9a-fA-F]{6}|\\#?[0-9a-fA-F]{3})\\](.+?)\\[\/color\\]','ig'); msg = msg.replace(rx, '<span style="color: $1">$2</span>'); // try to parse smileys This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2008-12-01 17:16:32
|
Revision: 1256 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1256&view=rev Author: kerphi Date: 2008-12-01 17:16:29 +0000 (Mon, 01 Dec 2008) Log Message: ----------- Opimization: build the whoisbox only on demand (thanks to Ivan Kravets aka x-man) Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2008-11-25 19:06:50 UTC (rev 1255) +++ trunk/data/public/js/pfcclient.js 2008-12-01 17:16:29 UTC (rev 1256) @@ -438,7 +438,6 @@ { this.setUserMeta(nickid, param); this.updateNickBox(nickid); - this.updateNickWhoisBox(nickid); } if (cmd == "whois") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2009-04-25 11:58:31
|
Revision: 1262 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1262&view=rev Author: kerphi Date: 2009-04-25 11:58:21 +0000 (Sat, 25 Apr 2009) Log Message: ----------- Makes more flexible the users list customization (example: change the little icon, modify the nicknames styles) Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2009-04-25 11:09:31 UTC (rev 1261) +++ trunk/data/public/js/pfcclient.js 2009-04-25 11:58:21 UTC (rev 1262) @@ -1398,6 +1398,26 @@ this.nickwhoisbox.set(nickid, div); }, + buildNickItem_create_image: function(nickid) + { + var className = (! is_ie) ? 'class' : 'className'; + var isadmin = this.getUserMeta(nickid, 'isadmin'); + 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(className, 'pfc_nickbutton'); + return img; + }, + + buildNickItem_modify_nick_style: function(nickid, span) + { + // this method can be overloaded to change the nick style (color, font ...) + // example: span.style.color = 'red'; + }, + buildNickItem: function(nickid) { var className = (! is_ie) ? 'class' : 'className'; @@ -1424,14 +1444,8 @@ } 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(className, 'pfc_nickbutton'); - a.appendChild(img); + var img = this.buildNickItem_create_image(nickid); + if (img) a.appendChild(img); // nobr is not xhtml valid but it's a workeround // for IE which doesn't support 'white-space: pre' css rule @@ -1439,6 +1453,7 @@ var span = document.createElement('span'); span.setAttribute(className, 'pfc_nickmarker pfc_nick_'+nickid); span.innerHTML = nick.escapeHTML(); + this.buildNickItem_modify_nick_style(nickid, span); nobr.appendChild(span); a.appendChild(nobr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2010-04-23 08:59:25
|
Revision: 1275 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1275&view=rev Author: kerphi Date: 2010-04-23 08:59:19 +0000 (Fri, 23 Apr 2010) Log Message: ----------- Add a security on the delay calculation based on the ping value for slow connections Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2010-04-13 11:19:11 UTC (rev 1274) +++ trunk/data/public/js/pfcclient.js 2010-04-23 08:59:19 UTC (rev 1275) @@ -1047,6 +1047,10 @@ if (d < delay) continue; if (lastact > limit) delay = d; } + + // a security for very slow connections + if (this.ping*2 > delay) delay = this.ping*2; + return delay; }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2010-09-03 21:59:32
|
Revision: 1276 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1276&view=rev Author: kerphi Date: 2010-09-03 21:59:26 +0000 (Fri, 03 Sep 2010) Log Message: ----------- Fix nick auto complete bug (thanks to lackattack) Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2010-04-23 08:59:19 UTC (rev 1275) +++ trunk/data/public/js/pfcclient.js 2010-09-03 21:59:26 UTC (rev 1276) @@ -649,7 +649,7 @@ if (nick_src != '') { var tabid = this.gui.getTabId(); - var n_list = this.getChanMeta(tabid, 'users')['nick']; + var n_list = this.getChanMeta(tabid, 'users').get('nick'); var nick_match = false; for (var i = 0; i < n_list.length; i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |