[Phpfreechat-svn] SF.net SVN: phpfreechat: [790] trunk
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-09-23 10:22:59
|
Revision: 790 http://svn.sourceforge.net/phpfreechat/?rev=790&view=rev Author: kerphi Date: 2006-09-23 03:22:37 -0700 (Sat, 23 Sep 2006) Log Message: ----------- [en] BBCode colors are now more flexible : I just added a transparent image with variable background colors. [45min] [fr] Les couleurs BBCode sont maintenant plus flexibles : J'ai ajout?\195?\169 une image transparente avec un fond de couleur variable. [45min] Modified Paths: -------------- trunk/src/client/chat.js.tpl.php trunk/src/client/pfcclient.js trunk/src/client/pfcgui.js Added Paths: ----------- trunk/themes/default/images/color_transparent.gif Removed Paths: ------------- trunk/themes/default/images/color_000000.gif trunk/themes/default/images/color_000055.gif trunk/themes/default/images/color_0000FF.gif trunk/themes/default/images/color_008000.gif trunk/themes/default/images/color_008080.gif trunk/themes/default/images/color_00FF00.gif trunk/themes/default/images/color_00FFFF.gif trunk/themes/default/images/color_7F7F7F.gif trunk/themes/default/images/color_800000.gif trunk/themes/default/images/color_800080.gif trunk/themes/default/images/color_D2D2D2.gif trunk/themes/default/images/color_FF0000.gif trunk/themes/default/images/color_FF00FF.gif trunk/themes/default/images/color_FF5500.gif trunk/themes/default/images/color_FFFF00.gif trunk/themes/default/images/color_FFFFFF.gif Modified: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-09-23 09:37:09 UTC (rev 789) +++ trunk/src/client/chat.js.tpl.php 2006-09-23 10:22:37 UTC (rev 790) @@ -118,12 +118,9 @@ 'images/bt_del.gif', 'images/bt_mail.gif', 'images/bt_color.gif', + 'images/color_transparent.gif', ); -// convert bbcode color value list to a bbcode color url list -function get_bbcode_color_url($v) { return 'images/color_'.substr($v,1).'.gif'; } -$bbcode_clist = array_map("get_bbcode_color_url", $bbcode_colorlist); -$fileurl_to_load = array_merge($fileurl_to_load, $bbcode_clist); foreach($fileurl_to_load as $f) { echo "pfc.res.setFileUrl('".$f."',pfc_proxy_url+'".$c->getFileUrlByProxy($f,false)."');\n"; Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-23 09:37:09 UTC (rev 789) +++ trunk/src/client/pfcclient.js 2006-09-23 10:22:37 UTC (rev 790) @@ -1257,13 +1257,16 @@ /* clear any existing borders on the color buttons */ var colorbtn = this.getElementsByClassName($('pfc_colorlist'), 'pfc_color', ''); for(var i = 0; colorbtn.length > i; i++) + { colorbtn[i].style.border = 'none'; + colorbtn[i].style.padding = '0'; + } /* assign the new border style to the selected button */ this.current_text_color = color; setCookie('pfc_current_text_color', this.current_text_color); var idname = 'pfc_color_' + color; - $(idname).style.border = '1px solid #666'; + $(idname).style.border = '1px solid #555'; $(idname).style.padding = '1px'; // assigne the new color to the input text box Modified: trunk/src/client/pfcgui.js =================================================================== --- trunk/src/client/pfcgui.js 2006-09-23 09:37:09 UTC (rev 789) +++ trunk/src/client/pfcgui.js 2006-09-23 10:22:37 UTC (rev 790) @@ -596,15 +596,16 @@ for (var i=0 ; i<clist_v.length ; i++) { var bbc = clist_v[i]; - var img = document.createElement('img'); - img.bbc = bbc; - img.setAttribute('class', 'pfc_color'); - img.setAttribute('className', 'pfc_color'); // for IE6 - img.setAttribute('id', 'pfc_color_'+bbc); - img.setAttribute('src', pfc.res.getFileUrl('images/color_'+bbc+'.gif')); - img.setAttribute('alt', bbc); - img.onclick = function(){ pfc.switch_text_color(this.bbc); } - clist.appendChild(img); + var elt = document.createElement('img'); + elt.bbc = bbc; + elt.setAttribute('class', 'pfc_color'); + elt.setAttribute('className', 'pfc_color'); // for IE6 + elt.setAttribute('id', 'pfc_color_'+bbc); + elt.style.backgroundColor = '#'+bbc; + elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif')); + elt.setAttribute('alt', bbc); + elt.onclick = function(){ pfc.switch_text_color(this.bbc); } + clist.appendChild(elt); } // error box : <p id="pfc_errors"> Deleted: trunk/themes/default/images/color_000000.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_000055.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_0000FF.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_008000.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_008080.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_00FF00.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_00FFFF.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_7F7F7F.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_800000.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_800080.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_D2D2D2.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_FF0000.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_FF00FF.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_FF5500.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_FFFF00.gif =================================================================== (Binary files differ) Deleted: trunk/themes/default/images/color_FFFFFF.gif =================================================================== (Binary files differ) Added: trunk/themes/default/images/color_transparent.gif =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/color_transparent.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |