[Phpfreechat-svn] SF.net SVN: phpfreechat: [916] trunk
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2007-01-05 12:58:00
|
Revision: 916 http://svn.sourceforge.net/phpfreechat/?rev=916&view=rev Author: kerphi Date: 2007-01-05 04:57:52 -0800 (Fri, 05 Jan 2007) Log Message: ----------- code cleaning (themes styles) Modified Paths: -------------- trunk/data/public/js/pfcclient.js trunk/data/public/js/pfcgui.js trunk/themes/default/chat.html.tpl.php trunk/themes/default/chat.js.tpl.php trunk/themes/default/style.css Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/data/public/js/pfcclient.js 2007-01-05 12:57:52 UTC (rev 916) @@ -858,7 +858,7 @@ var recipientdiv = this.gui.getChatContentFromTabId(tabid); // create a dummy div to avoid konqueror bug when setting nickmarkers - var m = document.createElement('span'); + var m = document.createElement('div'); // do not setup a inline element (ex: span) because the element height will be wrong on FF2 -> scrollDown(..) will be broken m.innerHTML = msg_html[recipientid]; this.colorizeNicks(m); this.refresh_clock(m); @@ -950,7 +950,7 @@ updateNickListBox: function(chanid) { var nickidlst = this.chanmeta[chanid]['users']['nickid']; - var nickdiv = this.gui.getOnlineContentFromTabId(chanid).firstChild; + var nickdiv = this.gui.getOnlineContentFromTabId(chanid); var ul = document.createElement('ul'); ul.setAttribute('class', 'pfc_nicklist'); ul.setAttribute('className', 'pfc_nicklist'); // IE6 @@ -1077,7 +1077,6 @@ if (isadmin == '') isadmin = false; var li = document.createElement('li'); - li.style.borderBottom = '1px solid #AAA'; var a = document.createElement('a'); a.setAttribute('href','#'); Modified: trunk/data/public/js/pfcgui.js =================================================================== --- trunk/data/public/js/pfcgui.js 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/data/public/js/pfcgui.js 2007-01-05 12:57:52 UTC (rev 916) @@ -47,7 +47,6 @@ // the next line seems to help with IE6 scroll on the first load // http://sourceforge.net/tracker/index.php?func=detail&aid=1568264&group_id=158880&atid=809601 var dudVar = content.scrollTop; - content.scrollTop += elttoscroll.offsetHeight+2; this.scrollpos[tabid] = content.scrollTop; }, @@ -158,11 +157,6 @@ // I set the border style here because seting it in the CSS is not taken in account // oc.style.borderLeft = "1px solid #555"; oc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page) - - // Create a dummy div to add padding - var div = document.createElement('div'); - div.style.padding = "5px"; - oc.appendChild(div); this.onlinecontent[tabid] = oc; return oc; Modified: trunk/themes/default/chat.html.tpl.php =================================================================== --- trunk/themes/default/chat.html.tpl.php 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/chat.html.tpl.php 2007-01-05 12:57:52 UTC (rev 916) @@ -10,16 +10,21 @@ <div id="pfc_input_container"> - <table style="margin:0; padding:0; border-collapse:collapse;"> + <table style="margin:0;padding:0;border-collapse:collapse;"> <tbody> <tr> <td class="pfc_td1"> + <p id="pfc_handle" + title="<?php echo _pfc("Enter your nickname here"); ?>" + onclick="pfc.askNick('')"><?php echo $u->nick; ?></p> + </td> + <td class="pfc_td2"> <input type="text" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len; ?>"/> </td> - <td class="pfc_td2"> + <td class="pfc_td3"> <input type="button" id="pfc_send" value="<?php echo _pfc("Send"); ?>" @@ -39,12 +44,6 @@ title="<?php echo _pfc("PHP FREE CHAT [powered by phpFreeChat-%s]", $version); ?>" /> </a> - <p id="pfc_handle" - title="<?php echo _pfc("Enter your nickname here"); ?>" - onclick="pfc.askNick('')"> - <?php echo $u->nick; ?> - </p> - <div class="pfc_btn"> <img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" alt="" title="" Modified: trunk/themes/default/chat.js.tpl.php =================================================================== --- trunk/themes/default/chat.js.tpl.php 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/chat.js.tpl.php 2007-01-05 12:57:52 UTC (rev 916) @@ -116,45 +116,39 @@ <div id="pfc_container"> - <div style="width:250px;background-color:#FFF;border:1px solid #000;padding:10px;position:relative;margin:auto"> - <p style="padding:0 0 10px 0;margin:0;text-align:center;"> + <p style="padding:0;margin:0;text-align:center;"> <img src="http://img327.imageshack.us/img327/8071/indicatormediumgb6.gif" alt="" style="float:left;margin:0;"/> - Chat loading ...<br style="margin:0"/>Please wait + <?php echo _pfc("Chat loading ..."); ?><br style="margin:0"/><?php echo _pfc("Please wait"); ?> </p> </div> <div id="pfc_notloading" style="width:270px;background-color:#FFF;color:#000;border:1px solid #000;text-align:center;margin:5px auto 0 auto;font-size:10px;background-image:url('http://img402.imageshack.us/img402/3766/stopcc3.gif');background-repeat:no-repeat;background-position:center center;"> - <noscript> -<p><?php echo _pfc("JavaScript appears to be either disabled or unsupported by your browser. This web application requires JavaScript to work properly. Please enable JavaScript in your browser settings, or upgrade to a browser with JavaScript support and try again."); ?></p> +<p><?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","JavaScript"); ?> <?php echo _pfc("This web application requires %s to work properly.","JavaScript"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","JavaScript","JavaScript"); ?></p> </noscript> -<p> -<script type="text/javascript"> +<p><script type="text/javascript"> + // <![CDATA[ if (!browserSupportsCookies()) - document.write('<?php echo _pfc("Cookies appear to be either disabled or unsupported by your browser. This web application requires Cookies to function properly. Please enable Cookies in your browser settings or upgrade to a browser with Cookie support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Cookies"); ?> <?php echo _pfc("This web application requires %s to work properly.","Cookies"); ?> <?php echo _pfc("Please enable %s in your browser settings, or upgrade to a browser with %s support and try again.","Cookies","Cookies"); ?>'); else if (!browserSupportsAjax()) - document.write('<?php echo _pfc("Your browser does not appear to support Ajax technology. This web application requires Ajax to function properly. Please upgrade to a browser with Ajax support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","Ajax"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("Please upgrade to a browser with %s support and try again.","Ajax"); ?>'); else if (!ActiveXEnabledOrUnnecessary()) - document.write('<?php echo _pfc("ActiveX appears to be disabled in your browser. This web application requires Ajax technology to function properly. In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."); ?>'); + document.write('<?php echo _pfc("%s appears to be either disabled or unsupported by your browser.","ActiveX"); ?> <?php echo _pfc("This web application requires %s to work properly.","Ajax"); ?> <?php echo _pfc("In Internet Explorer versions earlier than 7.0, Ajax is implemented using ActiveX. Please enable ActiveX in your browser security settings or upgrade to a browser with Ajax support and try again."); ?>'); else { $('pfc_notloading').style.display = 'none'; pfc_isready = true; } -</script> -</p> - + // ]]> +</script></p> <a href="http://www.phpfreechat.net" style="text-align:center"><img src="http://www.phpfreechat.net/pub/logo_80x15.gif" alt="PHP FREE CHAT [powered by phpFreeChat-<?php echo $version ?>]" /></a> +</div> <!-- pfc_notloading --> -</div> +</div> <!-- pfc_container --> -</div> - -</div> - <?php if ($debug) { ?> <div id="pfc_debug"></div> <?php } ?> Modified: trunk/themes/default/style.css =================================================================== --- trunk/themes/default/style.css 2007-01-04 19:21:26 UTC (rev 915) +++ trunk/themes/default/style.css 2007-01-05 12:57:52 UTC (rev 916) @@ -61,7 +61,7 @@ } ul#pfc_channels_list li img { margin: 0; padding: 0; - vertical-align: middle; + vertical-align: bottom; } ul#pfc_channels_list li div { margin: 0; padding: 0; @@ -72,12 +72,13 @@ border-left: 1px solid #555; border-bottom: 1px solid #555; background-color: #DDD; + vertical-align: bottom; } ul#pfc_channels_list li.selected div { background-color: #FFF; border-bottom: 1px solid #FFF; color: #000; - font-weight: bold; + font-weight: bold; } ul#pfc_channels_list li > div:hover { background-color: #FFF; @@ -115,6 +116,9 @@ overflow: auto; word-wrap: break-word; } +div.pfc_chat div { + margin: 0; padding: 0; border: none; +} div.pfc_online { margin: 0; padding: 0; @@ -134,22 +138,30 @@ background-repeat: repeat-y; } div.pfc_online ul { - margin: 0; padding: 0; + margin: 4px; padding: 0; list-style-type: none; - margin-left: 8px; - margin-right: 8px; -} -div.pfc_online li { - margin: 0; padding: 0; - font-weight: bold; font-size: 90%; - /* bottom borders are drawn by the javascript routines */ + font-weight: bold; } -ul.pfc_nicklist li img { +ul.pfc_nicklist li { + margin: 0 0 5px 0; padding: 0; + border-bottom: 1px solid #AAA; +} +ul.pfc_nicklist img { + vertical-align: middle; /* fix icon position problem in IE6 */ +} +ul.pfc_nicklist a { + text-decoration: none; +} +ul.pfc_nicklist nobr span { margin: 0; padding: 0; + display: inline; + text-decoration: none; } + + h2#pfc_title { margin:0; padding:0; border: none; font-size: 110%; @@ -200,12 +212,13 @@ div#pfc_input_container input { margin: 0; padding: 0; } -div#pfc_input_container td.pfc_td1 { +div#pfc_input_container td.pfc_td2 { padding-right: 5px; width: 100%; } input#pfc_words { + margin: 0; padding: 0; border: #555 solid 1px; background-color: #FAFAFA; width: 100%; @@ -217,16 +230,15 @@ } input#pfc_send { + margin: 0; padding: 0; display: block; padding: 2px; - margin-left: 5px; border: 1px solid #555; background-color: #CCC; font-size: 10px; - height: 21px; vertical-align: bottom; font-size: 0.7em; - height: 1.8em; + height: 1.9em; cursor: pointer; } @@ -239,14 +251,13 @@ margin: 0; padding: 0; display: inline; cursor: pointer; - border: 1px solid #555; - padding: 2px 10px 2px 10px; + margin-right: 5px; color: black; - margin-bottom: 5px; font-weight: bold; - background-color: #EEE; + /*background-color: #EEE;*/ font-size: 70%; /* these two line fix a display problem in IE6 : */ - vertical-align: middle; /* the nickname box bottom border is hidden without these lines */ + vertical-align: top; + white-space: pre; } a#pfc_logo { @@ -263,18 +274,11 @@ margin: 0; padding: 0; display: inline; cursor: pointer; - margin-right: 5px; } div.pfc_btn img { - margin: 0; padding: 0; - vertical-align: middle; - /* doesn't work */ - /* border: 1px solid #393;*/ /* same as container color */ + margin: 0; padding: 0; border: none; + vertical-align: middle; } -div.pfc_btn img:hover { - /* doesn't work */ - /* border: 1px solid #000;*/ -} div#pfc_bbcode_container { margin: 4px 0 4px 0; padding: 0; @@ -373,11 +377,6 @@ text-decoration: none; } -ul.pfc_nicklist span.pfc_nickmarker { -} -ul.pfc_nicklist a { - text-decoration: none; -} img.pfc_nickbutton { cursor: pointer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |