Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30028
Modified Files:
serendipity_admin_comments.inc.php
Log Message:
Make comment administration sexy:
- Add tabindex to each checkbox
- If a comment is marked for deletion (checkbox checked) we highlight it
Index: serendipity_admin_comments.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_comments.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- serendipity_admin_comments.inc.php 14 Aug 2004 15:03:46 -0000 1.12
+++ serendipity_admin_comments.inc.php 14 Aug 2004 22:28:58 -0000 1.13
@@ -169,7 +169,17 @@
}
}
}
+function highlightComment(id, checkvalue) {
+ var comment = document.getElementById(id);
+ if (checkvalue) {
+ comment.style.borderColor = '#FF0000';
+ comment.style.borderWidth = 2;
+ } else {
+ comment.style.borderColor = '';
+ comment.style.borderWidth = '';
+ }
+}
</script>
<form action="" method="GET" style="margin: 0">
<input type="hidden" name="serendipity[adminModule]" value="comments">
@@ -212,6 +222,7 @@
<?php
$i = 0;
foreach ($sql as $rs) {
+ $i++;
if (empty($rs['author'])) {
$rs['author'] = ANONYMOUS;
}
@@ -240,10 +251,10 @@
</td>
</tr>
<tr>
- <td class="serendipity_admin_list_item <?php echo $class ?>" style="padding: 3px">
+ <td class="serendipity_admin_list_item <?php echo $class ?>" style="padding: 3px" id="comment_<?php echo $rs['id'] ?>">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
- <td rowspan="2" width="20" align="center"><input type="checkbox" name="serendipity[delete][<?php echo $rs['id'] ?>]" value="<?php echo $rs['entry_id'] ?>"></td>
+ <td rowspan="2" width="20" align="center"><input type="checkbox" name="serendipity[delete][<?php echo $rs['id'] ?>]" value="<?php echo $rs['entry_id'] ?>" onclick="highlightComment('comment_<?php echo $rs['id'] ?>', this.checked)" tabindex="<?php echo $i ?>"></td>
<td width="250"><strong><?php echo AUTHOR ?></strong>: <?php echo $rs['author'] ?></td>
<td><strong><?php echo EMAIL ?></strong>: <?php echo $rs['email'] ?></td>
</tr>
|