added method PMA_getHtmlForColumnLength

This commit is contained in:
Spun Nakandala 2013-08-05 23:15:25 +05:30
parent 507ca058a4
commit adec74d49f
2 changed files with 34 additions and 15 deletions

View File

@ -164,21 +164,9 @@ for ($i = 0; $i < $num_fields; $i++) {
}
// column length
$length_to_display = $length;
$content_cells[$i][$ci] = '<input id="field_' . $i . '_' . ($ci - $ci_offset)
. '"' . ' type="text" name="field_length[' . $i . ']" size="'
. $length_values_input_size . '"' . ' value="' . htmlspecialchars(
$length_to_display
)
. '"'
. ' class="textfield" />'
. '<p class="enum_notice" id="enum_notice_' . $i . '_' . ($ci - $ci_offset)
. '">';
$content_cells[$i][$ci] .= __('ENUM or SET data too long?')
. '<a href="#" class="open_enum_editor"> '
. __('Get more editing space') . '</a>'
. '</p>';
$content_cells[$i][$ci] = PMA_getHtmlForColumnLength(
$i, $ci, $ci_offset, $length_values_input_size, $length
);
$ci++;
// column default

View File

@ -978,4 +978,35 @@ function PMA_getHtmlForColumnCollation($i, $ci, $ci_offset, $row)
return $html;
}
/**
* Function get html for column length
*
* @param int $i field number
* @param int $ci cell index
* @param int $ci_offset cell index offset
* @param int $length_values_input_size length values input size
* @param int $length_to_display length to disply
*
* @return string
*/
function PMA_getHtmlForColumnLength($i, $ci, $ci_offset, $length_values_input_size,
$length_to_display
) {
$html = '<input id="field_' . $i . '_' . ($ci - $ci_offset)
. '"' . ' type="text" name="field_length[' . $i . ']" size="'
. $length_values_input_size . '"' . ' value="' . htmlspecialchars(
$length_to_display
)
. '"'
. ' class="textfield" />'
. '<p class="enum_notice" id="enum_notice_' . $i . '_' . ($ci - $ci_offset)
. '">';
$html .= __('ENUM or SET data too long?')
. '<a href="#" class="open_enum_editor"> '
. __('Get more editing space') . '</a>'
. '</p>';
return $html;
}
?>