Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [454] trunk/themes/default/templates/pfcgui.js.tpl.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-04-19 16:32:08
|
Revision: 454 Author: kerphi Date: 2006-04-19 09:31:59 -0700 (Wed, 19 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=454&view=rev Log Message: ----------- fix a prb with tab image src attribute Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-04-19 12:11:17 UTC (rev 453) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-04-19 16:31:59 UTC (rev 454) @@ -255,13 +255,10 @@ var img = $('<?php echo $prefix; ?>tabimg'+tabid); if (img) { - var src = ''; if (tabtype == 'ch') - src = '<?php echo $c->getFileUrlFromTheme('images/ch-active.gif'); ?>'; + img.src = '<?php echo $c->getFileUrlFromTheme('images/ch-active.gif'); ?>'; if (tabtype == 'pv') - src = '<?php echo $c->getFileUrlFromTheme('images/pv-active.gif'); ?>'; - preloadImages(src); - img.src = src; + img.src = '<?php echo $c->getFileUrlFromTheme('images/pv-active.gif'); ?>'; } }, @@ -275,13 +272,10 @@ var img = $('<?php echo $prefix; ?>tabimg'+tabid); if (img) { - var src = ''; if (tabtype == 'ch') - src = '<?php echo $c->getFileUrlFromTheme('images/ch.gif'); ?>'; + img.src = '<?php echo $c->getFileUrlFromTheme('images/ch.gif'); ?>'; if (tabtype == 'pv') - src = '<?php echo $c->getFileUrlFromTheme('images/pv.gif'); ?>'; - preloadImages(src); - img.src = src; + img.src = '<?php echo $c->getFileUrlFromTheme('images/pv.gif'); ?>'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-04-26 08:43:41
|
Revision: 474 Author: kerphi Date: 2006-04-26 01:43:35 -0700 (Wed, 26 Apr 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=474&view=rev Log Message: ----------- Bug fix: leaving a channel didn't clear the chat area correctly so when coming back, double messages appears (thanks to nemako for the bug report http://www.phpfreechat.net/forum/viewtopic.php?id=265). Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-04-25 13:00:45 UTC (rev 473) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-04-26 08:43:35 UTC (rev 474) @@ -155,6 +155,10 @@ tabparent_t.removeChild(tab_t); tabparent_c.removeChild(tab_c); + // empty the chat div content + var div_chat = this.getChatContentFromTabId(tabid); + div_chat.innerHTML = ''; + // remove the tab from the list var tabpos = this.tabids.indexOf(tabid); var name = this.tabs[tabpos]; @@ -241,7 +245,7 @@ $('<?php echo $prefix; ?>channels_list').appendChild(li_title); $('<?php echo $prefix; ?>channels_content').appendChild(div_content); - + return tabid; }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-25 11:44:38
|
Revision: 503 Author: kerphi Date: 2006-05-25 04:44:26 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=503&view=rev Log Message: ----------- Hide the created content when a new tab is created in order to be hidden when a background tab is created Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-24 15:48:55 UTC (rev 502) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-25 11:44:26 UTC (rev 503) @@ -232,7 +232,7 @@ li_div.appendChild(a2); var div_content = document.createElement('div'); - //div_content.style.display = 'none'; + div_content.style.display = 'none'; div_content.setAttribute('id', '<?php echo $prefix; ?>channel_content'+tabid); Element.addClassName(div_content, '<?php echo $prefix; ?>content'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-28 11:52:28
|
Revision: 516 Author: kerphi Date: 2006-05-28 04:52:22 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=516&view=rev Log Message: ----------- typo Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-28 11:51:19 UTC (rev 515) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-28 11:52:22 UTC (rev 516) @@ -126,7 +126,7 @@ sc = document.createElement('div'); sc.setAttribute('id', '<?php echo $prefix; ?>smileys_'+tabid); Element.addClassName(sc, '<?php echo $prefix; ?>smileys'); - // I set the border style here because seting it in the CSS is not taken in account + // I set the border style here because setting it in the CSS is not take into account sc.style.borderTop = "1px solid #555"; var div = document.createElement('div'); div.style.padding = "5px"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:50:46
|
Revision: 537 Author: kerphi Date: 2006-05-31 07:50:34 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=537&view=rev Log Message: ----------- Bug fix: the <:o) smiley was broken (more generally all smiley s using html special characters) Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:30:55 UTC (rev 536) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:50:34 UTC (rev 537) @@ -136,11 +136,11 @@ s.setAttribute('src','<?php echo $s_file; ?>'); s.setAttribute('alt','<?php echo $s_str[0]; ?>'); s.setAttribute('title','<?php echo $s_str[0]; ?>'); - s.setAttribute('onclick','pfc.insertSmiley(\'<?php echo $s_str[0]; ?>\');'); + s.setAttribute('onclick','pfc.insertSmiley(String(\'<?php echo $s_str[0]; ?>\').unescapeHTML());'); div.appendChild(s); <?php } ?> sc.appendChild(div); - + this.smileycontent[tabid] = sc; return sc; }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-06-16 13:59:42
|
Revision: 596 Author: kerphi Date: 2006-06-16 06:59:34 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=596&view=rev Log Message: ----------- Bug fix: when new messages were received in a background tab, the corresponding scrollbar was not scrolled as expected. Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-16 12:13:17 UTC (rev 595) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-16 13:59:34 UTC (rev 596) @@ -18,6 +18,7 @@ this.chatcontent = $H(); this.onlinecontent = $H(); this.scrollpos = $H(); + this.elttoscroll = $H(); }, /** @@ -25,7 +26,12 @@ */ scrollDown: function(tabid, elttoscroll) { - if (this.getTabId() != tabid) return; /* do nothing if this is not the current tab or it will reset the scrollbar position to 0 */ + if (this.getTabId() != tabid) + { + if (!this.elttoscroll[tabid]) this.elttoscroll[tabid] = Array(); + this.elttoscroll[tabid].push(elttoscroll); + return; + } var content = this.getChatContentFromTabId(tabid); content.scrollTop += elttoscroll.offsetHeight+2; this.scrollpos[tabid] = content.scrollTop; @@ -38,7 +44,7 @@ setTabById: function(tabid) { - // first of all save the scroll post of the visible tab + // first of all save the scroll pos of the visible tab var content = this.getChatContentFromTabId(this.current_tab_id); this.scrollpos[this.current_tab_id] = content.scrollTop; @@ -46,7 +52,7 @@ this.current_tab = ''; this.current_tab_id = ''; var tab_to_show = null; - // try to fine the tab to select and select it! + // try to fine the tab to select and select it! for (var i=0; i<this.tabids.length; i++) { var tabtitle = $('<?php echo $prefix; ?>channel_title'+this.tabids[i]); @@ -69,6 +75,16 @@ // show the new selected tab tab_to_show.style.display = 'block'; + + // scroll the new posted message + if (this.elttoscroll[tabid]) + { + // on by one + for (var i=0; i<this.elttoscroll[tabid].length; i++) + this.scrollDown(tabid,this.elttoscroll[tabid][i]); + this.elttoscroll[tabid] = Array(); + } + // restore the scroll pos var content = this.getChatContentFromTabId(tabid); content.scrollTop = this.scrollpos[tabid]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-06-16 20:26:34
|
Revision: 605 Author: kerphi Date: 2006-06-16 13:26:28 -0700 (Fri, 16 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=605&view=rev Log Message: ----------- Bug fix: the scrollbar was not correctly updated Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-16 18:47:36 UTC (rev 604) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-16 20:26:28 UTC (rev 605) @@ -75,9 +75,13 @@ // show the new selected tab tab_to_show.style.display = 'block'; + + // restore the scroll pos + var content = this.getChatContentFromTabId(tabid); + content.scrollTop = this.scrollpos[tabid]; // scroll the new posted message - if (this.elttoscroll[tabid]) + if (this.elttoscroll[tabid].length > 0) { // on by one for (var i=0; i<this.elttoscroll[tabid].length; i++) @@ -85,10 +89,6 @@ this.elttoscroll[tabid] = Array(); } - // restore the scroll pos - var content = this.getChatContentFromTabId(tabid); - content.scrollTop = this.scrollpos[tabid]; - this.unnotifyTab(tabid); }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-06-27 19:58:16
|
Revision: 628 Author: kerphi Date: 2006-06-27 12:58:06 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=628&view=rev Log Message: ----------- Bug fix: after two click on channels tabs, the page was reloaded Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-25 21:49:35 UTC (rev 627) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-27 19:58:06 UTC (rev 628) @@ -204,7 +204,7 @@ Element.addClassName(a1, '<?php echo $prefix; ?>tabtitle'); a1.appendChild(img); a1.appendChild(document.createTextNode(name)); - a1.setAttribute('href', ''); + a1.setAttribute('href', '#'); a1.pfc_tabid = tabid; a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;} li_div.appendChild(a1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 14:58:07
|
Revision: 538 Author: kerphi Date: 2006-05-31 07:58:00 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=538&view=rev Log Message: ----------- Bug fix: when someone posted a message on a none active tab, the scrollbar was reset. Now it is just not updated (better than nothing). Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:50:34 UTC (rev 537) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 14:58:00 UTC (rev 538) @@ -27,6 +27,7 @@ */ scrollDown: function(tabid, elttoscroll) { + if (this.getTabId() != tabid) return; /* do nothing if this is not the current tab or it will reset the scrollbar position to 0 */ var content = this.getChatContentFromTabId(tabid); content.scrollTop += elttoscroll.offsetHeight+2; this.scrollpos[tabid] = content.scrollTop; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-05-31 15:40:18
|
Revision: 540 Author: kerphi Date: 2006-05-31 08:40:12 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=540&view=rev Log Message: ----------- Behavior improvements: when leaving a room, a pop up ask if the user really want to quit. And the current tab stay active when a none active tab is removed. Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 15:23:17 UTC (rev 539) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-05-31 15:40:12 UTC (rev 540) @@ -19,7 +19,6 @@ this.onlinecontent = $H(); this.smileycontent = $H(); this.scrollpos = $H(); - // this.tabprefixs = Array(); }, /** @@ -166,8 +165,8 @@ this.tabids = this.tabids.without(this.tabids[tabpos]); this.tabs = this.tabs.without(this.tabs[tabpos]); this.tabtypes = this.tabtypes.without(this.tabtypes[tabpos]); - // this.tabprefixs = this.tabprefixs.without(this.tabprefixs[tabpos]); - tabpos--; if (tabpos<0) tabpos = 0; + tabpos = this.tabids.indexOf(this.getTabId()); + if (tabpos<0) tabpos = 0; this.setTabById(this.tabids[tabpos]); return name; }, @@ -198,7 +197,6 @@ this.tabs.push(name); this.tabids.push(tabid); this.tabtypes.push(type); - // this.tabprefixs.push(prefix); var li_title = document.createElement('li'); li_title.setAttribute('id', '<?php echo $prefix; ?>channel_title'+tabid); @@ -223,7 +221,10 @@ var a2 = document.createElement('a'); a2.pfc_tabid = tabid; - a2.onclick = function(){pfc.sendRequest('/leave', this.pfc_tabid); return false;} + a2.onclick = function(){ + var res = confirm('<?php echo _pfc("Do you really want to leave this room ?"); ?>'); + if (res == true) pfc.sendRequest('/leave', this.pfc_tabid); return false; + } a2.alt = this.i18n._('Close this tab'); a2.title = a2.alt; Element.addClassName(a2, '<?php echo $prefix; ?>tabclose'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-06-28 13:18:41
|
Revision: 632 Author: kerphi Date: 2006-06-28 06:18:35 -0700 (Wed, 28 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=632&view=rev Log Message: ----------- fix a javascript warning Modified Paths: -------------- trunk/themes/default/templates/pfcgui.js.tpl.php Modified: trunk/themes/default/templates/pfcgui.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-27 20:11:04 UTC (rev 631) +++ trunk/themes/default/templates/pfcgui.js.tpl.php 2006-06-28 13:18:35 UTC (rev 632) @@ -81,7 +81,8 @@ content.scrollTop = this.scrollpos[tabid]; // scroll the new posted message - if (this.elttoscroll[tabid].length > 0) + if (this.elttoscroll[tabid] && + this.elttoscroll[tabid].length > 0) { // on by one for (var i=0; i<this.elttoscroll[tabid].length; i++) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |