- Replace nasty javascript generated HTML <input> 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
This commit is contained in:
Janus B. Kristensen 2008-09-25 10:39:51 +00:00
parent a9d346b20e
commit ff29445385
3 changed files with 32 additions and 15 deletions

View File

@ -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&nbsp;message", "Send $name a private message");
echo "Joined: ", gmdate('M j y', $user->create_time), "<br>";
if (!isset($user->nposts)) {

View File

@ -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 "
<script>
document.write('<input onClick=\"document.location.href=\'$url\'\" class=\"btn\" type=\"button\" value=\"$text_esc\" title=\"$desc_esc\">')
</script>
<noscript>
<a href=\"$url\" title=\"$desc\">$text</a>
</noscript>
";
function show_button($url, $text, $desc, $class="button") {
echo "<a href=\"".$url."\" title=\"".addslashes($desc)."\" class=\"".$class."\">".$text."</a>";
}
function show_image($src, $title, $alt, $height=null) {

View File

@ -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;