Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [435] trunk/themes/default/templates/pfcclient.js.tpl.php
Status: Beta
Brought to you by:
kerphi
[Phpfreechat-svn] SF.net SVN: phpfreechat: [435] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-04-16 17:01:06
|
Revision: 435 Author: kerphi Date: 2006-04-16 10:00:59 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=435&view=rev Log Message: ----------- new command : rehash Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [437] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-04-16 20:46:46
|
Revision: 437 Author: kerphi Date: 2006-04-16 13:46:40 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=437&view=rev Log Message: ----------- makes nickname colorization working Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-16 20:09:13 UTC (rev 436) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-16 20:46:40 UTC (rev 437) @@ -530,10 +530,20 @@ var recipientid = cmds[mid][4]; var cmd = cmds[mid][5]; var param = cmds[mid][6]; - //var fromtoday = cmds[mid][6]; //var oldmsg = cmds[mid][7]; + + // check the nickname is in the list or not + var nickfound = false; + for(var i = 0; i < this.nicklist[recipientid].length && !nickfound; i++) + { + if (this.nicklist[recipientid][i] == sender) + nickfound = true; + } + var nickcolor = ''; + if (nickfound) nickcolor = this.getAndAssignNickColor(sender); + // format and post message var line = ''; line += '<div id="<?php echo $prefix; ?>msg'+ id +'" class="<?php echo $prefix; ?>'+ cmd +' <?php echo $prefix; ?>message'; @@ -548,7 +558,7 @@ line += ' <span class="<?php echo $prefix; ?>nick">'; line += '‹'; line += '<span '; - // if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; + if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; line += 'class="<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(sender)) +'">'; line += sender; line += '</span>'; @@ -682,7 +692,7 @@ nickdiv.replaceChild(ul,fc); else nickdiv.appendChild(ul,fc); - this.colorizeNicks(nickdiv); + this.colorizeNicks(tabid,nickdiv); }, test: function(evt) @@ -884,16 +894,14 @@ /** * apply nicknames color to the root childs */ - colorizeNicks: function(root) + colorizeNicks: function(tabid, root) { - /* - for(var i = 0; i < this.nicklist.length; i++) + for(var i = 0; i < this.nicklist[tabid].length; i++) { - var cur_nick = this.nicklist[i]; + var cur_nick = this.nicklist[tabid][i]; var cur_color = this.getAndAssignNickColor(cur_nick); this.applyNickColor(root, cur_nick, cur_color); } - */ }, /** @@ -957,11 +965,11 @@ */ applyNickColor: function(root, nick, color) { - /* + var nicktochange = this.getElementsByClassName(root, '<?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nick)), '') for(var i = 0; nicktochange.length > i; i++) nicktochange[i].style.color = color; - */ + }, /** @@ -1017,8 +1025,8 @@ nickmarker_icon.src = "<?php echo $c->getFileUrlFromTheme('images/color-on.gif'); ?>"; nickmarker_icon.alt = this.i18n._('hide_nickname_color'); nickmarker_icon.title = nickmarker_icon.alt; - this.colorizeNicks(root); - this.colorizeNicks($('<?php echo $prefix; ?>online')); + // this.colorizeNicks(root); + // this.colorizeNicks($('<?php echo $prefix; ?>online')); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [458] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-04-19 19:58:51
|
Revision: 458 Author: kerphi Date: 2006-04-19 12:58:43 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=458&view=rev Log Message: ----------- Bug fix: IE doesn't support white-space:pre CSS rule, a workaround is to use <nobr> element. This is not XHTML complient but it's just a workeround for this crappy IE... (thanks to Rhialto for the tip) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-19 19:54:05 UTC (rev 457) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-19 19:58:43 UTC (rev 458) @@ -678,7 +678,12 @@ li.appendChild(img); } - li.appendChild(document.createTextNode(nicks[i])); + + // 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'); + nobr.appendChild(document.createTextNode(nicks[i])); + li.appendChild(nobr); li.style.borderBottom = '1px solid #AAA'; ul.appendChild(li); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [462] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-04-20 20:26:43
|
Revision: 462 Author: kerphi Date: 2006-04-20 13:26:36 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=462&view=rev Log Message: ----------- Clicking on the nickname in the user list, write the nickname + ', ' to the text input area (thanks to void). Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-20 19:54:00 UTC (rev 461) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-20 20:26:36 UTC (rev 462) @@ -682,7 +682,11 @@ // 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'); - nobr.appendChild(document.createTextNode(nicks[i])); + var span = document.createElement('span'); + span.pfc_nick = nicks[i]; + span.onclick = function(){pfc.insert_text(this.pfc_nick+", ",""); return false;} + span.appendChild(document.createTextNode(nicks[i])); + nobr.appendChild(span); li.appendChild(nobr); li.style.borderBottom = '1px solid #AAA'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [476] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-04-26 17:48:37
|
Revision: 476 Author: kerphi Date: 2006-04-26 10:48:32 -0700 (Wed, 26 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=476&view=rev Log Message: ----------- Bug fix: It seems there is a little bug with the icon before my name in the user box (user.gif instead of user-me.gif). When I enter the channel the first time, I have a user.gif icon before my name, if I refresh the windows I have the normal user-me.gif icon.... It seems that the test does not work the first time. (thx to nemako for the bug report) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-26 17:32:59 UTC (rev 475) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-26 17:48:32 UTC (rev 476) @@ -262,9 +262,11 @@ echo "this.sendRequest('/privmsg', '".addslashes($pv["name"])."');\n"; ?> } + if (resp == "ok" || resp == "notchanged" || resp == "changed" || resp == "connected") { this.el_handle.value = param; + this.nickname = param; } else if (resp == "isused") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [558]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-08 19:58:31
|
Revision: 558 Author: kerphi Date: 2006-06-08 12:58:15 -0700 (Thu, 08 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=558&view=rev Log Message: ----------- Bug fix: replace the UP/DOWN key by PAGEUP/PAGEDOWN for the commands history Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-08 19:45:18 UTC (rev 557) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-08 19:58:15 UTC (rev 558) @@ -439,7 +439,7 @@ */ callbackWords_OnKeypress: function(evt) { - var code = (evt.which) ? evt.which : evt.keyCode + var code = (evt.which) ? evt.which : evt.keyCode; if (code == Event.KEY_TAB) /* tab key */ { /* FF & Konqueror workaround : ignore TAB key here */ @@ -486,7 +486,7 @@ w.value = ''; return false; } - else if (code == Event.KEY_UP) /* up key */ + else if (code == 33) /* page up key */ { // write the last command in the history if (this.cmdhistory.length>0) @@ -500,7 +500,7 @@ w.value = this.cmdhistory[this.cmdhistoryid]; } } - else if (code == Event.KEY_DOWN) /* down key */ + else if (code == 34) /* page down key */ { // write the next command in the history if (this.cmdhistory.length>0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [560]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-09 09:16:41
|
Revision: 560 Author: kerphi Date: 2006-06-09 02:16:36 -0700 (Fri, 09 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=560&view=rev Log Message: ----------- notify the unactive tab only on new received messages Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-09 08:43:34 UTC (rev 559) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-09 09:16:36 UTC (rev 560) @@ -699,6 +699,14 @@ line += '<span class="<?php echo $prefix; ?>words">'+ this.parseMessage(param) +'</span> '; 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); + } + if (msg_html[recipientid] == null) msg_html[recipientid] = line; else @@ -711,9 +719,6 @@ { var recipientid = keys[i]; var tabid = recipientid; - - if (this.gui.getTabId() != tabid) - this.gui.notifyTab(tabid); // create the tab if it doesn't exists yet var recipientdiv = this.gui.getChatContentFromTabId(tabid); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [656]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-07-17 14:20:58
|
Revision: 656 Author: kerphi Date: 2006-07-17 07:20:51 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=656&view=rev Log Message: ----------- Bug fix: https://sourceforge.net/support/tracker.php?aid=1523826 Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-07-17 08:56:18 UTC (rev 655) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-07-17 14:20:51 UTC (rev 656) @@ -1470,4 +1470,4 @@ }; -<?php include($c->getFileUrlFromTheme('templates/pfcclient-custo.js.tpl.php')); ?> +<?php include($c->getFilePathFromTheme('templates/pfcclient-custo.js.tpl.php')); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [477] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-04-26 17:49:25
|
Revision: 477 Author: kerphi Date: 2006-04-26 10:49:18 -0700 (Wed, 26 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=477&view=rev Log Message: ----------- Typo Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-26 17:48:32 UTC (rev 476) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-04-26 17:49:18 UTC (rev 477) @@ -663,7 +663,7 @@ img.title = img.alt; img.style.marginRight = '5px'; var a = document.createElement('a'); - a.setAttribute('href', 'opo'); + a.setAttribute('href', ''); a.pfc_nick = nicks[i]; a.onclick = function(){pfc.sendRequest('/privmsg', this.pfc_nick); return false;} a.appendChild(img); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [534] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-05-31 14:12:26
|
Revision: 534 Author: kerphi Date: 2006-05-31 07:12:20 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=534&view=rev Log Message: ----------- Bug fix: the nickname colorization on/off swapper was broken Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-30 09:19:40 UTC (rev 533) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 14:12:20 UTC (rev 534) @@ -618,17 +618,6 @@ var param = cmds[mid][6]; //var fromtoday = cmds[mid][6]; //var oldmsg = cmds[mid][7]; - - - // check the nickname is in the list or not - var nickfound = false; - for(var i = 0; i < this.nicklist[recipientid].length && !nickfound; i++) - { - if (this.nicklist[recipientid][i] == sender) - nickfound = true; - } - var nickcolor = ''; - if (nickfound) nickcolor = this.getAndAssignNickColor(sender); // format and post message var line = ''; @@ -644,7 +633,6 @@ line += ' <span class="<?php echo $prefix; ?>nick">'; line += '‹'; line += '<span '; - if (nickcolor != '') line += 'style="color: ' + nickcolor + '" '; line += 'onclick="pfc.insert_text(\'' + sender + ', \',\'\')" '; line += 'class="<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(sender)) +'">'; line += sender; @@ -683,6 +671,7 @@ // finaly append this to the message list recipientdiv.appendChild(m); this.gui.scrollDown(tabid, m); + this.colorizeNicks(m); } }, @@ -737,10 +726,7 @@ var ul = document.createElement('ul'); for (var i=0; i<nicks.length; i++) { - var li = document.createElement('li'); - Element.addClassName(li, '<?php echo $prefix; ?>nickmarker'); - Element.addClassName(li, '<?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nicks[i]))); - + var li = document.createElement('li'); if (nicks[i] != this.nickname) { // this is someone -> create a privmsg link @@ -775,6 +761,8 @@ span.pfc_nick = nicks[i]; span.onclick = function(){pfc.insert_text(this.pfc_nick+", ",""); return false;} span.appendChild(document.createTextNode(nicks[i])); + Element.addClassName(span, '<?php echo $prefix; ?>nickmarker'); + Element.addClassName(span, '<?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nicks[i]))); nobr.appendChild(span); li.appendChild(nobr); li.style.borderBottom = '1px solid #AAA'; @@ -786,7 +774,7 @@ nickdiv.replaceChild(ul,fc); else nickdiv.appendChild(ul,fc); - this.colorizeNicks(tabid,nickdiv); + this.colorizeNicks(nickdiv); }, /** @@ -902,9 +890,9 @@ /** * parse messages and append it to the message list */ +/* parseAndPost: function(msgs) { - /* var msgdiv = $('<?php echo $prefix; ?>chat'); var msgids = Array(); @@ -976,22 +964,23 @@ this.refresh_nickmarker(root); this.refresh_clock(root); } - */ }, +*/ /** * apply nicknames color to the root childs */ - colorizeNicks: function(tabid, root) + colorizeNicks: function(root) { - for(var i = 0; i < this.nicklist[tabid].length; i++) + var nicklist = this.getElementsByClassName(root, '<?php echo $prefix; ?>nickmarker', ''); + for(var i = 0; i < nicklist.length; i++) { - var cur_nick = this.nicklist[tabid][i]; + var cur_nick = nicklist[i].innerHTML; var cur_color = this.getAndAssignNickColor(cur_nick); - this.applyNickColor(root, cur_nick, cur_color); + nicklist[i].style.color = cur_color; } }, - + /** * Initialize the color array used to colirize the nicknames */ @@ -1107,14 +1096,13 @@ refresh_nickmarker: function(root) { var nickmarker_icon = $('<?php echo $prefix; ?>nickmarker'); - if (!root) root = $('<?php echo $prefix; ?>chat'); + if (!root) root = $('<?php echo $prefix; ?>channels_content'); if (this.nickmarker) { nickmarker_icon.src = "<?php echo $c->getFileUrlFromTheme('images/color-on.gif'); ?>"; nickmarker_icon.alt = this.i18n._('hide_nickname_color'); nickmarker_icon.title = nickmarker_icon.alt; - // this.colorizeNicks(root); - // this.colorizeNicks($('<?php echo $prefix; ?>online')); + this.colorizeNicks(root); } else { @@ -1124,15 +1112,9 @@ var elts = this.getElementsByClassName(root, '<?php echo $prefix; ?>nickmarker', ''); for(var i = 0; elts.length > i; i++) { - /* this is not supported in konqueror =>>> elts[i].removeAttribute('style');*/ + // this is not supported in konqueror =>>> elts[i].removeAttribute('style'); elts[i].style.color = ''; } - var elts = this.getElementsByClassName($('<?php echo $prefix; ?>online'), '<?php echo $prefix; ?>nickmarker', ''); - for(var i = 0; elts.length > i; i++) - { - /* this is not supported in konqueror =>>> elts[i].removeAttribute('style');*/ - elts[i].style.color = ''; - } } }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [535] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-05-31 14:19:40
|
Revision: 535 Author: kerphi Date: 2006-05-31 07:19:35 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=535&view=rev Log Message: ----------- Bug fix: the show/hide clock button switcher was broken Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 14:12:20 UTC (rev 534) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 14:19:35 UTC (rev 535) @@ -668,10 +668,11 @@ // create a dummy div to avoid konqueror bug when setting nickmarkers var m = document.createElement('div'); m.innerHTML = msg_html[recipientid]; + this.colorizeNicks(m); + this.refresh_clock(m); // finaly append this to the message list recipientdiv.appendChild(m); this.gui.scrollDown(tabid, m); - this.colorizeNicks(m); } }, @@ -1069,14 +1070,12 @@ showClass: function(root, clsName, clsIgnore, show) { - /* var elts = this.getElementsByClassName(root, clsName, clsIgnore); for(var i = 0; elts.length > i; i++) if (show) elts[i].style.display = 'inline'; else elts[i].style.display = 'none'; - */ }, @@ -1122,7 +1121,6 @@ /** * Date/Hour show/hide */ - /* clock_swap: function() { if (this.clock) { @@ -1136,7 +1134,7 @@ refresh_clock: function( root ) { var clock_icon = $('<?php echo $prefix; ?>clock'); - if (!root) root = $('<?php echo $prefix; ?>chat'); + if (!root) root = $('<?php echo $prefix; ?>channels_content'); if (this.clock) { clock_icon.src = "<?php echo $c->getFileUrlFromTheme('images/clock-on.gif'); ?>"; @@ -1154,9 +1152,8 @@ this.showClass(root, '<?php echo $prefix; ?>heure', '<?php echo $prefix; ?>invisible', false); } // browser automaticaly scroll up misteriously when showing the dates - $('<?php echo $prefix; ?>chat').scrollTop += 30; + // $('<?php echo $prefix; ?>chat').scrollTop += 30; }, - */ /** * Connect/disconnect button This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [539] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-05-31 15:23:22
|
Revision: 539 Author: kerphi Date: 2006-05-31 08:23:17 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=539&view=rev Log Message: ----------- Bug fix: the show/hide smiley and online boxes switcher was broken Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 14:58:00 UTC (rev 538) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-05-31 15:23:17 UTC (rev 539) @@ -201,6 +201,8 @@ this.channels.push(name); this.channelids.push(tabid); */ + this.refresh_Smileys(); + this.refresh_WhosOnline(); } else alert(cmd + "-"+resp+"-"+param); @@ -216,7 +218,8 @@ // do not switch to the new created tab // keep it in the background // this.gui.setTabById(tabid); - alert("ccc"); + this.refresh_Smileys(); + this.refresh_WhosOnline(); } else alert(cmd + "-"+resp+"-"+param); @@ -1312,7 +1315,19 @@ }, refresh_Smileys: function() { - var content = $('<?php echo $prefix; ?>smileys'); + // first of all : show/hide the smiley box + var root = $('<?php echo $prefix; ?>channels_content'); + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>smileys', ''); + for(var i = 0; i < contentlist.length; i++) + { + var content = contentlist[i]; + if (this.showsmileys) + content.style.display = 'block'; + else + content.style.display = 'none'; + } + + // then switch the button icon var btn = $('<?php echo $prefix; ?>showHideSmileysbtn'); if (this.showsmileys) { @@ -1322,7 +1337,6 @@ btn.alt = this.i18n._('hidesmiley'); btn.title = btn.alt; } - content.style.display = 'block'; } else { @@ -1332,7 +1346,6 @@ btn.alt = this.i18n._('showsmiley'); btn.title = btn.alt; } - content.style.display = 'none'; } this.refresh_Chat(); this.refresh_OnlineAndSmileys(); @@ -1357,7 +1370,19 @@ }, refresh_WhosOnline: function() { - var content = $('<?php echo $prefix; ?>online'); + // first of all : show/hide the nickname list box + var root = $('<?php echo $prefix; ?>channels_content'); + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>online', ''); + for(var i = 0; i < contentlist.length; i++) + { + var content = contentlist[i]; + if (this.showwhosonline) + content.style.display = 'block'; + else + content.style.display = 'none'; + } + + // then refresh the button icon var btn = $('<?php echo $prefix; ?>showHideWhosOnlineBtn'); if (!btn) return; if (this.showwhosonline) @@ -1365,14 +1390,12 @@ btn.src = "<?php echo $c->getFileUrlFromTheme('images/online-on.gif'); ?>"; btn.alt = this.i18n._('hideonline'); btn.title = btn.alt; - content.style.display = 'block'; } else { btn.src = "<?php echo $c->getFileUrlFromTheme('images/online-off.gif'); ?>"; btn.alt = this.i18n._('showonline'); btn.title = btn.alt; - content.style.display = 'none'; } this.refresh_Chat(); this.refresh_OnlineAndSmileys(); @@ -1383,30 +1406,42 @@ */ refresh_OnlineAndSmileys: function() { - var onlinediv = $('<?php echo $prefix; ?>online'); - var smileysdiv = $('<?php echo $prefix; ?>smileys'); var style = $H(); - - if (this.showwhosonline) + var root = $('<?php echo $prefix; ?>channels_content'); + + // resize the smiley area + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>smileys', ''); + for(var i = 0; i < contentlist.length; i++) { - style['height'] = ''; - Element.setStyle(smileysdiv, style); + var smileydiv = contentlist[i]; + if (this.showwhosonline) + { + style['height'] = ''; + Element.setStyle(smileydiv, style); + } + else + { + style['height'] = '100%'; + Element.setStyle(smileydiv, style); + } } - else + + // resize the nickname list area + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>online', ''); + for(var i = 0; i < contentlist.length; i++) { - style['height'] = '100%'; - Element.setStyle(smileysdiv, style); + var onlinediv = contentlist[i]; + if (this.showsmileys) + { + style['height'] = ''; + Element.setStyle(onlinediv, style); + } + else + { + style['height'] = '100%'; + Element.setStyle(onlinediv, style); + } } - if (this.showsmileys) - { - style['height'] = ''; - Element.setStyle(onlinediv, style); - } - else - { - style['height'] = '100%'; - Element.setStyle(onlinediv, style); - } // for IE7 CSS refresh // if fixes the smiley and online boxes resize problem on IE6 @@ -1418,18 +1453,24 @@ */ refresh_Chat: function() { - var chatdiv = $('<?php echo $prefix; ?>chat'); - var style = $H(); - if (!this.showwhosonline && !this.showsmileys) + // resize all the tabs content + var root = $('<?php echo $prefix; ?>channels_content'); + var contentlist = this.getElementsByClassName(root, '<?php echo $prefix; ?>chat', ''); + for(var i = 0; i < contentlist.length; i++) { - style['width'] = '100%'; - Element.setStyle(chatdiv, style); + var chatdiv = contentlist[i]; + var style = $H(); + if (!this.showwhosonline && !this.showsmileys) + { + style['width'] = '100%'; + Element.setStyle(chatdiv, style); + } + else + { + style['width'] = ''; + Element.setStyle(chatdiv, style); + } } - else - { - style['width'] = ''; - Element.setStyle(chatdiv, style); - } } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [544] trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-01 17:58:51
|
Revision: 544 Author: kerphi Date: 2006-06-01 09:50:57 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=544&view=rev Log Message: ----------- Add a client side command history. As a classic terminal, use UP and DOWN key to navigate in the history. (doesn't works on IE6) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-01 15:48:01 UTC (rev 543) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-01 16:50:57 UTC (rev 544) @@ -13,6 +13,12 @@ /* user description */ this.nickname = '<?php echo $u->nick; ?>'; + // this array contains all the sent command + // used the up and down key to navigate in the history + // (doesn't work on IE6) + this.cmdhistory = Array(); + this.cmdhistoryid = -1; + this.cmdhistoryissearching = false; /* this.channels = Array(); @@ -425,17 +431,24 @@ callbackWords_OnKeypress: function(evt) { var code = (evt.which) ? evt.which : evt.keyCode - if (code == 9) /* tab key */ + if (code == Event.KEY_TAB) /* tab key */ { /* FF & Konqueror workaround : ignore TAB key here */ /* do the nickname completion work like on IRC */ this.completeNick(); return false; /* do not leave the tab key default behavior */ } - else if (code == 13) /* enter key */ + else if (code == Event.KEY_RETURN) /* enter key */ { var w = this.el_words; var wval = w.value; + + // append the string to the history + this.cmdhistory.push(wval); + this.cmdhistoryid = this.cmdhistory.length; + this.cmdhistoryissearching = false; + + // send the string to the server re = new RegExp("^(\/[a-z0-9]+)( (.*)|)"); if (wval.match(re)) { @@ -464,6 +477,34 @@ w.value = ''; return false; } + else if (code == Event.KEY_UP) /* up key */ + { + // write the last command in the history + if (this.cmdhistory.length>0) + { + var w = this.el_words; + if (this.cmdhistoryissearching == false && w.value != "") + this.cmdhistory.push(w.value); + this.cmdhistoryissearching = true; + this.cmdhistoryid = this.cmdhistoryid-1; + if (this.cmdhistoryid<0) this.cmdhistoryid = this.cmdhistory.length-1; + w.value = this.cmdhistory[this.cmdhistoryid]; + } + } + else if (code == Event.KEY_DOWN) /* down key */ + { + // write the next command in the history + if (this.cmdhistory.length>0) + { + var w = this.el_words; + if (this.cmdhistoryissearching == false && w.value != "") + this.cmdhistory.push(w.value); + this.cmdhistoryissearching = true; + this.cmdhistoryid = this.cmdhistoryid+1; + if (this.cmdhistoryid>=this.cmdhistory.length) this.cmdhistoryid = 0; + w.value = this.cmdhistory[this.cmdhistoryid]; + } + } else { /* allow other keys */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [545]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-07 20:11:35
|
Revision: 545 Author: kerphi Date: 2006-06-05 07:08:56 -0700 (Mon, 05 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=545&view=rev Log Message: ----------- Bug fix: add slashes to thetranslated strings in the javascript code Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-01 16:50:57 UTC (rev 544) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-05 14:08:56 UTC (rev 545) @@ -93,21 +93,21 @@ // the i18n translations this.i18n = new pfcI18N(); - this.i18n.setLabel('hide_nickname_color', '<?php echo _pfc("Hide nickname marker"); ?>'); - this.i18n.setLabel('show_nickname_color', '<?php echo _pfc("Show nickname marker"); ?>'); - this.i18n.setLabel('hide_clock', '<?php echo _pfc("Hide dates and hours"); ?>'); - this.i18n.setLabel('show_clock', '<?php echo _pfc("Show dates and hours"); ?>'); - this.i18n.setLabel('logout', '<?php echo _pfc("Disconnect"); ?>'); - this.i18n.setLabel('login', '<?php echo _pfc("Connect"); ?>'); - this.i18n.setLabel('maximize', '<?php echo _pfc("Magnify"); ?>'); - this.i18n.setLabel('minimize', '<?php echo _pfc("Cut down"); ?>'); - this.i18n.setLabel('hidesmiley', '<?php echo _pfc("Hide smiley box"); ?>'); - this.i18n.setLabel('showsmiley', '<?php echo _pfc("Show smiley box"); ?>'); - this.i18n.setLabel('hideonline', '<?php echo _pfc("Hide online users box"); ?>'); - this.i18n.setLabel('showonline', '<?php echo _pfc("Show online users box"); ?>'); - this.i18n.setLabel('enter_nickname', '<?php echo _pfc("Please enter your nickname"); ?>'); - this.i18n.setLabel('Private message', '<?php echo _pfc("Private message"); ?>'); - this.i18n.setLabel('Close this tab', '<?php echo _pfc("Close this tab"); ?>'); + this.i18n.setLabel('hide_nickname_color', '<?php echo addslashes(_pfc("Hide nickname marker")); ?>'); + this.i18n.setLabel('show_nickname_color', '<?php echo addslashes(_pfc("Show nickname marker")); ?>'); + this.i18n.setLabel('hide_clock', '<?php echo addslashes(_pfc("Hide dates and hours")); ?>'); + this.i18n.setLabel('show_clock', '<?php echo addslashes(_pfc("Show dates and hours")); ?>'); + this.i18n.setLabel('logout', '<?php echo addslashes(_pfc("Disconnect")); ?>'); + this.i18n.setLabel('login', '<?php echo addslashes(_pfc("Connect")); ?>'); + this.i18n.setLabel('maximize', '<?php echo addslashes(_pfc("Magnify")); ?>'); + this.i18n.setLabel('minimize', '<?php echo addslashes(_pfc("Cut down")); ?>'); + this.i18n.setLabel('hidesmiley', '<?php echo addslashes(_pfc("Hide smiley box")); ?>'); + this.i18n.setLabel('showsmiley', '<?php echo addslashes(_pfc("Show smiley box")); ?>'); + this.i18n.setLabel('hideonline', '<?php echo addslashes(_pfc("Hide online users box")); ?>'); + this.i18n.setLabel('showonline', '<?php echo addslashes(_pfc("Show online users box")); ?>'); + this.i18n.setLabel('enter_nickname', '<?php echo addslashes(_pfc("Please enter your nickname")); ?>'); + this.i18n.setLabel('Private message', '<?php echo addslashes(_pfc("Private message")); ?>'); + this.i18n.setLabel('Close this tab', '<?php echo addslashes(_pfc("Close this tab")); ?>'); // the graphical user interface this.gui = new pfcGui(this.i18n); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [561]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-09 11:21:11
|
Revision: 561 Author: kerphi Date: 2006-06-09 04:21:03 -0700 (Fri, 09 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=561&view=rev Log Message: ----------- disable the commands history because the key code are in conflict with other keys Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-09 09:16:36 UTC (rev 560) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-09 11:21:03 UTC (rev 561) @@ -486,7 +486,7 @@ w.value = ''; return false; } - else if (code == 33) /* page up key */ + else if (code == 33 && false) // page up key { // write the last command in the history if (this.cmdhistory.length>0) @@ -500,7 +500,7 @@ w.value = this.cmdhistory[this.cmdhistoryid]; } } - else if (code == 34) /* page down key */ + else if (code == 34 && false) // page down key { // write the next command in the history if (this.cmdhistory.length>0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [578]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-14 16:27:58
|
Revision: 578 Author: kerphi Date: 2006-06-14 09:27:46 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=578&view=rev Log Message: ----------- Bug fix: channels were not joined in the correct order (last channel in the parameter array mus be the last joined channel and the active one) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-14 15:40:38 UTC (rev 577) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-14 16:27:46 UTC (rev 578) @@ -157,18 +157,6 @@ else { this.sendRequest('/nick', this.nickname); - - // now join channels comming from sessions - // or the default one - <?php - if (count($u->channels) == 0) - foreach($c->channels as $ch) - echo "this.sendRequest('/join', '".addslashes($ch)."');\n"; - foreach($u->channels as $ch) - echo "this.sendRequest('/join', '".addslashes($ch["name"])."');\n"; - foreach($u->privmsg as $pv) - echo "this.sendRequest('/privmsg', '".addslashes($pv["name"])."');\n"; - ?> } // give focus the the input text box if wanted @@ -300,16 +288,26 @@ } else if (cmd == "nick") { - if (resp == "connected") + if (resp == "connected" || resp == "notchanged") { // now join channels comming from sessions // or the default one <?php if (count($u->channels) == 0) - foreach($c->channels as $ch) - echo "this.sendRequest('/join', '".addslashes($ch)."');\n"; - foreach($u->channels as $ch) - echo "this.sendRequest('/join', '".addslashes($ch["name"])."');\n"; + // the last joined channel must be the last entry in the parameter list + for($i=0; $i<count($c->channels); $i++) + { + $ch = $c->channels[$i]; + $cmd = $i < count($c->channels)-1 ? "/join2" : "/join"; + echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; + } + // the last joined channel must be the last entry in the parameter list + for($i=0; $i<count($u->channels); $i++) + { + $ch = $u->channels[$i]; + $cmd = $i < count($u->channels)-1 ? "/join2" : "/join"; + echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; + } foreach($u->privmsg as $pv) echo "this.sendRequest('/privmsg', '".addslashes($pv["name"])."');\n"; ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [580]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-14 16:49:13
|
Revision: 580 Author: kerphi Date: 2006-06-14 09:48:57 -0700 (Wed, 14 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=580&view=rev Log Message: ----------- Bug fix: the /me and /notice display italic style was broken Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-14 16:38:26 UTC (rev 579) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-14 16:48:57 UTC (rev 580) @@ -672,7 +672,7 @@ // format and post message var line = ''; - line += '<div id="<?php echo $prefix; ?>msg'+ id +'" class="<?php echo $prefix; ?>'+ cmd +' <?php echo $prefix; ?>message'; + line += '<div id="<?php echo $prefix; ?>msg'+ id +'" class="<?php echo $prefix; ?>cmd_'+ cmd +' <?php echo $prefix; ?>message'; if (oldmsg == 1) line += ' <?php echo $prefix; ?>oldmsg'; line += '">'; line += '<span class="<?php echo $prefix; ?>date'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [582]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-15 10:09:14
|
Revision: 582 Author: kerphi Date: 2006-06-15 03:09:09 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=582&view=rev Log Message: ----------- Bug fix: when reloading the page, the previously joined channels were not joined again as expected. Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-15 09:45:32 UTC (rev 581) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-15 10:09:09 UTC (rev 582) @@ -304,7 +304,7 @@ // the last joined channel must be the last entry in the parameter list for($i=0; $i<count($u->channels); $i++) { - $ch = $u->channels[$i]; + $ch = $u->channels[$i]["name"]; $cmd = $i < count($u->channels)-1 ? "/join2" : "/join"; echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [584]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-15 11:56:49
|
Revision: 584 Author: kerphi Date: 2006-06-15 04:56:43 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=584&view=rev Log Message: ----------- Bug fix: when reloading the page, the previously joined channels were not joined again as expected. (second try) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-15 11:50:12 UTC (rev 583) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-15 11:56:43 UTC (rev 584) @@ -302,11 +302,13 @@ echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; } // the last joined channel must be the last entry in the parameter list - for($i=0; $i<count($u->channels); $i++) + $i = 0; + foreach($u->channels as $ch) { - $ch = $u->channels[$i]["name"]; + $ch = $ch["name"]; $cmd = $i < count($u->channels)-1 ? "/join2" : "/join"; echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; + $i++; } foreach($u->privmsg as $pv) echo "this.sendRequest('/privmsg', '".addslashes($pv["name"])."');\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [598]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-16 14:20:46
|
Revision: 598 Author: kerphi Date: 2006-06-16 07:20:29 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=598&view=rev Log Message: ----------- Bug fix: when clicking on the chat window to give focus to the input zone, ignore other button than left button. Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 14:11:49 UTC (rev 597) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 14:20:29 UTC (rev 598) @@ -568,13 +568,15 @@ }, callbackContainer_OnMousedown: function(evt) { - this.isdraging = false; + if (evt.button == 0) + this.isdraging = false; }, callbackContainer_OnMouseup: function(evt) { - if (!this.isdraging) - if (this.el_words && !this.minmax_status) - this.el_words.focus(); + if (evt.button == 0) + if (!this.isdraging) + if (this.el_words && !this.minmax_status) + this.el_words.focus(); }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [600]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-16 15:10:01
|
Revision: 600 Author: kerphi Date: 2006-06-16 08:09:56 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=600&view=rev Log Message: ----------- code cleaning Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 14:45:47 UTC (rev 599) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 15:09:56 UTC (rev 600) @@ -332,29 +332,6 @@ if (resp == "ok") { } - else if (resp == "cmdtoplay") - { - if (param[0] == "privmsg2") - { - // do not open the same tab twice - // (it's not necessary to speak to the server if the tab is allready open) - // so we check if the wanted privmsg tab exists or not - var index = this.privmsgs.indexOf(param[1]); - if (index == -1) - { - // it doesn't exists, create it in the background - this.sendRequest("/"+param[0],param[1]); - } - } - else if (param[0] == "leave") - { - this.sendRequest("/"+param[0],param[1]); - } - else - this.sendRequest("/"+param[0],param[1]); - } - // else - // alert(cmd + "-"+resp+"-"+param); } else if (cmd == "rehash") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [603]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-16 16:54:45
|
Revision: 603 Author: kerphi Date: 2006-06-16 09:12:08 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=603&view=rev Log Message: ----------- Bug fix: the button position index was wrong on IE, so the autofocus feature was broken Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 15:12:59 UTC (rev 602) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 16:12:08 UTC (rev 603) @@ -1,3 +1,7 @@ +var is_ie = navigator.appName.match("Explorer"); +var is_khtml = navigator.appName.match("Konqueror") || navigator.appVersion.match("KHTML"); +var is_ff = navigator.appName.match("Netscape"); + /** * This class is the client part of phpFreeChat * (depends on prototype library) @@ -545,12 +549,12 @@ }, callbackContainer_OnMousedown: function(evt) { - if (evt.button == 0) + if ( (is_ie && evt.button == 1) || (is_ff && evt.button == 0) ) this.isdraging = false; }, callbackContainer_OnMouseup: function(evt) { - if (evt.button == 0) + if ( (is_ie && evt.button == 1) || (is_ff && evt.button == 0) ) if (!this.isdraging) if (this.el_words && !this.minmax_status) this.el_words.focus(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [606]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-06-16 20:30:32
|
Revision: 606 Author: kerphi Date: 2006-06-16 13:30:27 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=606&view=rev Log Message: ----------- Bug fix: the focus on click feature was broken for konqueror Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 20:26:28 UTC (rev 605) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-16 20:30:27 UTC (rev 606) @@ -549,12 +549,12 @@ }, callbackContainer_OnMousedown: function(evt) { - if ( (is_ie && evt.button == 1) || (is_ff && evt.button == 0) ) + if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) this.isdraging = false; }, callbackContainer_OnMouseup: function(evt) { - if ( (is_ie && evt.button == 1) || (is_ff && evt.button == 0) ) + if ( ((is_ie || is_khtml) && evt.button == 1) || (is_ff && evt.button == 0) ) if (!this.isdraging) if (this.el_words && !this.minmax_status) this.el_words.focus(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [643]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-07-05 16:06:25
|
Revision: 643 Author: kerphi Date: 2006-07-05 09:06:18 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=643&view=rev Log Message: ----------- Bug fix: "connect_at_startup" and "start_minimized" options were broken Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-07-04 15:54:40 UTC (rev 642) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-07-05 16:06:18 UTC (rev 643) @@ -48,7 +48,7 @@ var cookie = getCookie('<?php echo $prefix; ?>minmax_status'); if (cookie != null) this.minmax_status = (cookie == 'true'); - + cookie = getCookie('<?php echo $prefix; ?>nickmarker'); this.nickmarker = (cookie == 'true'); if (cookie == '' || cookie == null) @@ -131,6 +131,10 @@ ?> } this.smileys = $H(smileys); + + // refresh the gui + this.refresh_loginlogout(); + this.refresh_minimize_maximize(); }, /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Phpfreechat-svn] SF.net SVN: phpfreechat: [647]
trunk/themes/default/templates/pfcclient.js.tpl.php
From: <ke...@us...> - 2006-07-07 07:37:24
|
Revision: 647 Author: kerphi Date: 2006-07-07 00:37:19 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=647&view=rev Log Message: ----------- Bug fix: the nickname list borders were badly displayed on IE6 Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-07-07 07:09:22 UTC (rev 646) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-07-07 07:37:19 UTC (rev 647) @@ -1424,6 +1424,7 @@ content.style.display = 'block'; else content.style.display = 'none'; + content.style.zIndex = '100'; // for IE6, force the nickname list borders to be shown } // then refresh the button icon @@ -1458,17 +1459,11 @@ var style = $H(); if (!this.showwhosonline) { - style['width'] = '100%'; - chatdiv.setAttribute('style', 'width:100%'); - chatdiv.setAttribute('cssText', 'width:100%'); // for IE6 - // Element.setStyle(chatdiv, style); + chatdiv.style.width = '100%'; } else { - style['width'] = ''; - chatdiv.setAttribute('style', ''); - chatdiv.setAttribute('cssText', ''); // for IE6 - // Element.setStyle(chatdiv, style); + chatdiv.style.width = ''; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |