Improved Ctrl+arrows moving in field editing.

This commit is contained in:
Michal Čihař
2003-01-16 09:16:22 +00:00
parent db4e7a4f47
commit 1bc1b51b5d
3 changed files with 16 additions and 11 deletions

View File

@@ -389,7 +389,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
<td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?>
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$foreign$" id="field_<?php echo $i; ?>_1" />
<select name="field_<?php echo md5($field); ?>[]" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_2">
<select name="field_<?php echo md5($field); ?>[]" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_3">
<option value=""></option>
<?php
echo "\n";
@@ -410,7 +410,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
?>
<td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?>
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['TextareaRows']; ?>" cols="<?php echo $cfg['TextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_2"
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['TextareaRows']; ?>" cols="<?php echo $cfg['TextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_3"
<?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>"><?php echo $special_chars; ?></textarea>
</td>
<?php
@@ -434,7 +434,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
if (strlen($row_table_def['Type']) > 20) {
echo "\n";
?>
<select name="field_<?php echo md5($field); ?>[]" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_2">
<select name="field_<?php echo md5($field); ?>[]" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_3">
<option value=""></option>
<?php
echo "\n";
@@ -462,15 +462,14 @@ for ($i = 0; $i < $fields_cnt; $i++) {
// Removes automatic MySQL escape format
$enum_atom = str_replace('\'\'', '\'', str_replace('\\\\', '\\', $enum[$j]));
echo ' ';
echo '<input type="radio" name="field_' . md5($field) . '[]" value="' . urlencode($enum_atom) . '" id="radio_field_' . $j . '" onclick="if (typeof(document.forms[\'insertForm\'].elements[\'fields_null[' . urlencode($field) . ']\']) != \'undefined\') {document.forms[\'insertForm\'].elements[\'fields_null[' . urlencode($field) .']\'].checked = false}"';
echo '<input type="radio" name="field_' . md5($field) . '[]" value="' . urlencode($enum_atom) . '" id="field_' . $i . '_3_' . $j . '" onclick="if (typeof(document.forms[\'insertForm\'].elements[\'fields_null[' . urlencode($field) . ']\']) != \'undefined\') {document.forms[\'insertForm\'].elements[\'fields_null[' . urlencode($field) .']\'].checked = false}"';
if ($data == $enum_atom
|| ($data == '' && (!isset($primary_key) || $row_table_def['Null'] != 'YES')
&& isset($row_table_def['Default']) && $enum_atom == $row_table_def['Default'])) {
echo ' checked="checked"';
}
echo ' id="field_' . $i . '_2"';
echo 'tabindex="' . ($i + 1) . '" />' . "\n";
echo ' <label for="radio_field_' . $j . '">' . htmlspecialchars($enum_atom) . '</label>' . "\n";
echo ' <label for="field_' . $i . '_3_' . $j . '">' . htmlspecialchars($enum_atom) . '</label>' . "\n";
} // end for
} // end else
@@ -496,7 +495,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
<td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?>
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="$set$" />
<select name="field_<?php echo md5($field); ?>[]" size="<?php echo $size; ?>" multiple="multiple" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_2">
<select name="field_<?php echo md5($field); ?>[]" size="<?php echo $size; ?>" multiple="multiple" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_3">
<?php
echo "\n";
$countset = count($set);
@@ -532,7 +531,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
?>
<td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?>
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['TextareaRows']; ?>" cols="<?php echo $cfg['TextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_2"
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['TextareaRows']; ?>" cols="<?php echo $cfg['TextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_3"
<?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" ><?php echo $special_chars; ?></textarea>
</td>
<?php
@@ -547,7 +546,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
?>
<td bgcolor="<?php echo $bgcolor; ?>">
<?php echo $backup_field . "\n"; ?>
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_2" />
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_3" />
</td>
<?php
} // end if...elseif...else
@@ -572,13 +571,13 @@ for ($i = 0; $i < $fields_cnt; $i++) {
if ($is_char && isset($cfg['CharEditing']) && ($cfg['CharEditing'] == 'textarea')) {
echo "\n";
?>
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['CharTextareaRows']; ?>" cols="<?php echo $cfg['CharTextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_2"
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['CharTextareaRows']; ?>" cols="<?php echo $cfg['CharTextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>" id="field_<?php echo $i; ?>_3"
<?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" ><?php echo $special_chars; ?></textarea>
<?php
} else {
echo "\n";
?>
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_2" />
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo ($i + 1); ?>" id="field_<?php echo $i; ?>_3" />
<?php
}
echo "\n";