bug #3004216 Field attributes use inline CSS

This commit is contained in:
Marc Delisle
2010-05-23 08:27:27 -04:00
parent 96bcf83996
commit abc229d0b0
4 changed files with 22 additions and 8 deletions

View File

@@ -81,6 +81,7 @@ $Id$
to Muhammad Adnan. to Muhammad Adnan.
+ [doc] Incorporate synchronisation docs into main document. + [doc] Incorporate synchronisation docs into main document.
+ [core] Include Content Security Policy HTTP headers. + [core] Include Content Security Policy HTTP headers.
- bug #3004216 [CSS] Field attributes use inline CSS
3.3.4.0 (not yet released) 3.3.4.0 (not yet released)
- bug #2996161 [import] properly escape import value - bug #2996161 [import] properly escape import value

View File

@@ -327,9 +327,8 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
// underline commented fields and display a hover-title (CSS only) // underline commented fields and display a hover-title (CSS only)
$comment_style = '';
if (isset($comments_map[$row['Field']])) { if (isset($comments_map[$row['Field']])) {
$displayed_field_name = '<span style="border-bottom: 1px dashed black;" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>'; $displayed_field_name = '<span class="commented_column" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>';
} }
if ($primary && $primary->hasColumn($field_name)) { if ($primary && $primary->hasColumn($field_name)) {
@@ -347,7 +346,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
<th nowrap="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $displayed_field_name; ?></label></th> <th nowrap="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $displayed_field_name; ?></label></th>
<td<?php echo $type_nowrap; ?>><bdo dir="ltr" xml:lang="en"><?php echo $type; echo $type_mime; ?></bdo></td> <td<?php echo $type_nowrap; ?>><bdo dir="ltr" xml:lang="en"><?php echo $type; echo $type_mime; ?></bdo></td>
<td><?php echo (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>'); ?></td> <td><?php echo (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>'); ?></td>
<td nowrap="nowrap" style="font-size: 70%"><?php echo $attribute; ?></td> <td nowrap="nowrap" class="column_attribute"><?php echo $attribute; ?></td>
<td><?php echo (($row['Null'] == 'YES') ? __('Yes') : __('No')); ?></td> <td><?php echo (($row['Null'] == 'YES') ? __('Yes') : __('No')); ?></td>
<td nowrap="nowrap"><?php <td nowrap="nowrap"><?php
if (isset($row['Default'])) { if (isset($row['Default'])) {
@@ -540,11 +539,11 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
if ($cfg['PropertiesIconic']) { if ($cfg['PropertiesIconic']) {
echo '<img class="icon" src="' . $pmaThemeImage . 'b_insrow.png" width="16" height="16" alt="' . __('Add new field') . '"/>'; echo '<img class="icon" src="' . $pmaThemeImage . 'b_insrow.png" width="16" height="16" alt="' . __('Add new field') . '"/>';
} }
echo sprintf(__('Add %s field(s)'), '<input type="text" name="num_fields" size="2" maxlength="2" value="1" style="vertical-align: middle" onfocus="this.select()" />'); echo sprintf(__('Add %s field(s)'), '<input type="text" name="num_fields" size="2" maxlength="2" value="1" onfocus="this.select()" />');
// I tried displaying the drop-down inside the label but with Firefox // I tried displaying the drop-down inside the label but with Firefox
// the drop-down was blinking // the drop-down was blinking
$fieldOptions = '<select name="after_field" style="vertical-align: middle" onclick="this.form.field_where[2].checked=true" onchange="this.form.field_where[2].checked=true">'; $fieldOptions = '<select name="after_field" onclick="this.form.field_where[2].checked=true" onchange="this.form.field_where[2].checked=true">';
foreach ($aryFields as $fieldname) { foreach ($aryFields as $fieldname) {
$fieldOptions .= '<option value="' . htmlspecialchars($fieldname) . '">' . htmlspecialchars($fieldname) . '</option>' . "\n"; $fieldOptions .= '<option value="' . htmlspecialchars($fieldname) . '">' . htmlspecialchars($fieldname) . '</option>' . "\n";
} }
@@ -560,7 +559,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
echo $fieldOptions; echo $fieldOptions;
unset($fieldOptions, $choices); unset($fieldOptions, $choices);
?> ?>
<input type="submit" value="<?php echo __('Go'); ?>" style="vertical-align: middle" /> <input type="submit" value="<?php echo __('Go'); ?>" />
</form> </form>
<hr /> <hr />
<?php <?php

View File

@@ -595,6 +595,13 @@ form.login label {
font-weight: bolder; font-weight: bolder;
} }
.commented_column {
border-bottom: 1px dashed black;
}
.column_attribute {
font-size: 70%;
}
/******************************************************************************/ /******************************************************************************/
/* specific elements */ /* specific elements */
@@ -1288,4 +1295,4 @@ table#serverconnection_trg_local {
* Validation error message styles * Validation error message styles
*/ */
.invalid_value .invalid_value
{background:#F00;} {background:#F00;}

View File

@@ -570,6 +570,13 @@ form.login label {
font-weight: bolder; font-weight: bolder;
} }
.commented_column {
border-bottom: 1px dashed black;
}
.column_attribute {
font-size: 70%;
}
/******************************************************************************/ /******************************************************************************/
/* specific elements */ /* specific elements */
@@ -1220,4 +1227,4 @@ table#serverconnection_trg_local {
* Validation error message styles * Validation error message styles
*/ */
.invalid_value .invalid_value
{background:#F00;} {background:#F00;}