Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14932
Modified Files:
serendipity_functions.inc.php
Log Message:
Attempt to pimp up the template selector a bit
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.353
retrieving revision 1.354
diff -u -d -r1.353 -r1.354
--- serendipity_functions.inc.php 20 Jul 2004 17:05:17 -0000 1.353
+++ serendipity_functions.inc.php 20 Jul 2004 17:30:38 -0000 1.354
@@ -167,16 +167,8 @@
function serendipity_printTemplates($themelist) {
global $serendipity;
?>
-<script language="JavaScript" type="text/javascript">
- function setRadio(id) {
- if (document.getElementById(id)) {
- document.getElementById(id).checked = true;
- }
- }
-</script>
<div>
<form method="post" action="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_admin.php?serendipity[adminModule]=templates&serendipity[adminAction]=save">
- <table width="100%" class="prettyTable">
<?php
foreach ($themelist as $theme) {
$info = serendipity_fetchTemplateInfo($theme);
@@ -191,32 +183,34 @@
} else {
$is_active = '';
}
+
+ $jsLine = " onmousedown =\"document.getElementById('serendipity_theme_radio_". $theme ."').checked = true;\"";
+ $jsLine .= " onMouseOut =\"document.getElementById('serendipity_theme_". $theme ."').className='';\"";
+ $jsLine .= " onMouseOver =\"document.getElementById('serendipity_theme_". $theme ."').className='serendipity_admin_list_item_uneven'; style.cursor = 'pointer';\"";
?>
+ <table width="100%" id="serendipity_theme_<?php echo $theme; ?>">
<tr>
- <td colspan="3" onmousedown="setRadio('serendipity_theme_<?php echo $theme; ?>');"><strong><?php echo $info['name']; ?></strong></td>
+ <td colspan="3" <?php echo $jsLine ?>><strong><?php echo $info['name']; ?></strong></td>
</tr>
<tr>
- <td width="100" onmousedown="setRadio('serendipity_theme_<?php echo $theme; ?>');"><?php echo $preview; ?></td>
+ <td width="100" <?php echo $jsLine ?> style="padding-left: 10px"><?php echo $preview; ?></td>
- <td valign="top" onmousedown="setRadio('serendipity_theme_<?php echo $theme; ?>');">
+ <td valign="top" <?php echo $jsLine ?>>
<?php echo AUTHOR; ?> : <?php echo $info['author'];?><br />
<?php echo LAST_UPDATED; ?>: <?php echo $info['date']; ?>
</td>
- <td valign="middle" onmousedown="setRadio('serendipity_theme_<?php echo $theme; ?>');">
- <div><input type="radio" name="serendipity[theme]" value="<?php echo $theme; ?>" id="serendipity_theme_<?php echo $theme; ?>" <?php echo $is_active; ?> /></div>
+ <td valign="middle" <?php echo $jsLine ?>>
+ <div><input type="radio" name="serendipity[theme]" value="<?php echo $theme; ?>" id="serendipity_theme_radio_<?php echo $theme; ?>" <?php echo $is_active; ?> /></div>
</td>
</tr>
+ </table>
+ <br />
<?php
}
?>
- <tr>
- <td align="right" colspan="3">
- <div><input type="submit" name="submit" value="<?php echo SET_AS_TEMPLATE; ?>" /></div>
- </td>
- </tr>
- </table>
+ <div align="right"><input type="submit" name="submit" value="<?php echo SET_AS_TEMPLATE; ?>" /></div>
</form>
</div>
<?php
|