hardcoded new markup serendipity_printConfigTemplate() & serendipity_printConfigJS()
This commit is contained in:
@@ -283,7 +283,7 @@ function serendipity_parseTemplate($filename, $areas = null, $onlyFlags=null) {
|
||||
|
||||
$config = @include($filename);
|
||||
if (! is_array($config)) {
|
||||
printf(INCLUDE_ERROR,$filename);
|
||||
printf(INCLUDE_ERROR,$filename);
|
||||
}
|
||||
|
||||
foreach ( $config as $n => $category ) {
|
||||
@@ -464,10 +464,8 @@ function showConfig(id) {
|
||||
if (document.getElementById) {
|
||||
el = document.getElementById(id);
|
||||
if (el.style.display == 'none') {
|
||||
document.getElementById('option' + id).src = '<?php echo serendipity_getTemplateFile('img/minus.png') ?>';
|
||||
el.style.display = '';
|
||||
el.style.display = 'block';
|
||||
} else {
|
||||
document.getElementById('option' + id).src = '<?php echo serendipity_getTemplateFile('img/plus.png') ?>';
|
||||
el.style.display = 'none';
|
||||
}
|
||||
}
|
||||
@@ -478,15 +476,11 @@ function showConfigAll(count) {
|
||||
if (document.getElementById) {
|
||||
for (i = 1; i <= count; i++) {
|
||||
document.getElementById('el' + i).style.display = state;
|
||||
document.getElementById('optionel' + i).src = (state == '' ? '<?php echo serendipity_getTemplateFile('img/minus.png') ?>' : '<?php echo serendipity_getTemplateFile('img/plus.png') ?>');
|
||||
}
|
||||
|
||||
if (state == '') {
|
||||
document.getElementById('optionall').src = '<?php echo serendipity_getTemplateFile('img/minus.png') ?>';
|
||||
if (state == 'block') {
|
||||
state = 'none';
|
||||
} else {
|
||||
document.getElementById('optionall').src = '<?php echo serendipity_getTemplateFile('img/plus.png') ?>';
|
||||
state = '';
|
||||
state = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -516,45 +510,26 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
|
||||
if (!$noForm) {
|
||||
?>
|
||||
<form action="?" method="POST">
|
||||
<div>
|
||||
<input type="hidden" name="serendipity[adminModule]" value="installer" />
|
||||
<input type="hidden" name="installAction" value="check" />
|
||||
<?php echo serendipity_setFormToken(); ?>
|
||||
<br />
|
||||
<input type="hidden" name="serendipity[adminModule]" value="installer">
|
||||
<input type="hidden" name="installAction" value="check">
|
||||
<?php echo serendipity_setFormToken(); ?>
|
||||
<?php }
|
||||
if (sizeof($config) > 1 && $allowToggle) { ?>
|
||||
<div align="right">
|
||||
<a style="border:0; text-decoration: none" href="#" onClick="showConfigAll(<?php echo sizeof($config); ?>)" title="<?php echo TOGGLE_ALL; ?>"><img src="<?php echo serendipity_getTemplateFile('img/'. ($folded === true ? 'plus' : 'minus') .'.png') ?>" id="optionall" alt="+/-" border="0" /> <?php echo TOGGLE_ALL; ?></a></a><br />
|
||||
</div>
|
||||
<a href="#" onClick="showConfigAll(<?php echo sizeof($config); ?>)"><?php echo TOGGLE_ALL; ?></a>
|
||||
<?php
|
||||
}
|
||||
$el_count = 0;
|
||||
foreach ($config as $category) {
|
||||
$el_count++;
|
||||
?>
|
||||
<table width="100%" cellspacing="2">
|
||||
<div class="configuration_group">
|
||||
<?php
|
||||
if (sizeof($config) > 1) {
|
||||
?>
|
||||
<tr>
|
||||
<th align="left" colspan="2" style="padding-left: 15px;">
|
||||
<?php if ($allowToggle) { ?>
|
||||
<a style="border:0; text-decoration: none;" href="#" onClick="showConfig('el<?php echo $el_count; ?>'); return false" title="<?php echo TOGGLE_OPTION; ?>"><img src="<?php echo serendipity_getTemplateFile('img/'. ($folded === true ? 'plus' : 'minus') .'.png') ?>" id="optionel<?php echo $el_count; ?>" alt="+/-" border="0" /> <?php echo $category['title']; ?></a>
|
||||
<?php } else { ?>
|
||||
<?php echo $category['title']; ?>
|
||||
<?php } ?>
|
||||
</th>
|
||||
</tr>
|
||||
<h3><?php if ($allowToggle) { ?><a href="#" onClick="showConfig('el<?php echo $el_count; ?>'); return false"><?php echo $category['title']; ?></a><?php } else { ?><?php echo $category['title']; ?><?php } ?></h3>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="3" id="el<?php echo $el_count; ?>">
|
||||
<tr>
|
||||
<td style="padding-left: 20px;" colspan="2">
|
||||
<?php echo $category['description'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<fieldset id="el<?php echo $el_count; ?>">
|
||||
<legend><?php echo $category['description'] ?></legend>
|
||||
<?php
|
||||
foreach ($category['items'] as $item) {
|
||||
|
||||
@@ -594,23 +569,15 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
|
||||
$value = serendipity_query_default($item['var'], $item['default']);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td style="border-bottom: 1px #000000 solid" align="left" valign="top" width="75%">
|
||||
<strong><?php echo $item['title']; ?></strong>
|
||||
<br />
|
||||
<span style="color: #5E7A94; font-size: 8pt;"><?php echo $item['description']; ?></span>
|
||||
</td>
|
||||
<td style="border-bottom: 1px #000000 solid; font-size: 8pt" align="left" valign="middle" width="25%">
|
||||
<span style="white-space: nowrap"><?php echo serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="form_<?php echo $item['type']; ?>">
|
||||
<label for="<?php echo $item['var']; ?>"><?php echo $item['title']; ?> <span><?php echo $item['description']; ?></span></label>
|
||||
<?php echo serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -624,8 +591,7 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
|
||||
|
||||
if (!$noForm) {
|
||||
?>
|
||||
<input type="submit" value="<?php echo CHECK_N_SAVE; ?>" class="serendipityPrettyButton input_button" />
|
||||
</div>
|
||||
<input type="submit" value="<?php echo CHECK_N_SAVE; ?>">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user