From ff2944538564a7eb40cf778b47838eb6a03f3c9d Mon Sep 17 00:00:00 2001 From: "Janus B. Kristensen" Date: Thu, 25 Sep 2008 10:39:51 +0000 Subject: [PATCH] - Replace nasty javascript generated HTML buttons with normal links and CSS buttons. - Fix CSS compatibility issues towards IE6-series of browsers - Buttons will now light up when hovering over them with the mouse svn path=/trunk/boinc/; revision=16047 --- html/inc/forum.inc | 2 +- html/inc/util.inc | 13 ++----------- html/user/white.css | 32 +++++++++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/html/inc/forum.inc b/html/inc/forum.inc index 181ba843fa..72b6911681 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -529,7 +529,7 @@ function show_post( $url = "pm.php?action=new&userid=".$user->id; $name = $user->name; - show_button($url, "Send message", "Send $name a private message"); + show_button($url, "Send message", "Send $name a private message"); echo "Joined: ", gmdate('M j y', $user->create_time), "
"; if (!isset($user->nposts)) { diff --git a/html/inc/util.inc b/html/inc/util.inc index ce553e7e3a..20432aee9f 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -685,17 +685,8 @@ function current_url() { return $url; } -function show_button($url, $text, $desc) { - $text_esc = addslashes($text); // for javascript - $desc_esc = addslashes($desc); - echo " - - - "; +function show_button($url, $text, $desc, $class="button") { + echo "".$text.""; } function show_image($src, $title, $alt, $height=null) { diff --git a/html/user/white.css b/html/user/white.css index ffe3dc6699..624893b0a5 100644 --- a/html/user/white.css +++ b/html/user/white.css @@ -121,23 +121,45 @@ td.friend { tr.message { background-color: #e0e0e0; } -input, select, textarea{ +input, select, textarea, .button { border: 1px solid #d8d8d8; -moz-border-radius: 5px; -webkit-border-radius: 5px; - padding: 2px; + padding: 2px 4px; font-size: 12px; } input[type="button"], input[type="submit"], input.btn { - padding: 2px 4px; margin: 2px 0px; + background: #d4d0c8; + margin-right: 0.5em; color: #203C66; border: 1px solid #a8a8a8; font-size: 12px; font-weight: normal; } +/* IE6 doesn't understand [type=XXXX] so we factor this out into its own */ +.button { + margin: 2px 0px; + background: #d4d0c8; + margin-right: 0.5em; + color: #203C66; + border: 1px solid #a8a8a8; + font-size: 0.9em; + font-weight: normal; + line-height: 2em; +} + +.button:hover { + background: #edece8; + text-decoration:none; +} + +input[type="button"]:hover, input[type="submit"]:hover, input.btn:hover, .forum_toplinks a:hover { + background: #edece8; +} + img { border: 0px; } img.userimg { border: 0px; } @@ -285,6 +307,10 @@ blockquote.postbody { word-wrap: break-word; } +.forum_toplinks td { + vertical-align: middle; +} + span.page_title { font-size: 24px; margin: 20px;