Drop tables used for layout.

This commit is contained in:
Michal Čihař
2006-04-26 14:36:53 +00:00
parent e03489a01b
commit bdf65efd3c
5 changed files with 28 additions and 24 deletions

View File

@@ -9,6 +9,10 @@ $Source$
* libraries/plugin_interface.lib.php: * libraries/plugin_interface.lib.php:
- Display information that there are no settings. - Display information that there are no settings.
- Be more verbose on error. - Be more verbose on error.
- Drop tables used for layout.
* css/phpmyadmin.css.php, themes/darkblue_orange/css/theme_right.css.php,
themes/original/css/theme_right.css.php: New style for non table forms
used in plugins.
2006-04-26 Sebastian Mendel <cybot_tm@users.sourceforge.net> 2006-04-26 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* themes/*: * themes/*:

View File

@@ -735,6 +735,11 @@ td.condition,
th.condition { th.condition {
border: 1px solid <?php echo $GLOBALS['cfg']['BrowseMarkerColor']; ?>; border: 1px solid <?php echo $GLOBALS['cfg']['BrowseMarkerColor']; ?>;
} }
label.desc {
width: 30em;
float: left;
}
<?php <?php
} // end styles 2.9 } // end styles 2.9

View File

@@ -170,30 +170,25 @@ function PMA_pluginGetChoice($section, $name, &$list)
*/ */
function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt) function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
{ {
$ret = ''; $ret = "\n";
$ret .= '<tr>'; $ret .= '<div class="formelementrow">' . "\n";
if ($opt['type'] == 'bool') { if ($opt['type'] == 'bool') {
$ret .= '<td colspan="2">';
$ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"' $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"'
. ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"'
. ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']) .' />'; . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']) .' />';
$ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">' $ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">'
. PMA_getString($opt['text']) . '</label>'; . PMA_getString($opt['text']) . '</label>';
} elseif ($opt['type'] == 'text') { } elseif ($opt['type'] == 'text') {
$ret .= '<td>'; $ret .= '<label for="text_' . $plugin_name . '_' . $opt['name'] . '" class="desc">'
$ret .= '<label for="text_' . $plugin_name . '_' . $opt['name'] . '">'
. PMA_getString($opt['text']) . '</label>'; . PMA_getString($opt['text']) . '</label>';
$ret .= '</td><td>';
$ret .= '<input type="text" name="' . $plugin_name . '_' . $opt['name'] . '"' $ret .= '<input type="text" name="' . $plugin_name . '_' . $opt['name'] . '"'
. ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']) . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']) . '"'
. ' id="text_' . $plugin_name . '_' . $opt['name'] . '"' . ' id="text_' . $plugin_name . '_' . $opt['name'] . '"'
. (isset($opt['size']) ? ' size="' . $opt['size'] . '"' : '' ) . (isset($opt['size']) ? ' size="' . $opt['size'] . '"' : '' )
. (isset($opt['len']) ? ' maxlength="' . $opt['len'] . '"' : '' ) . ' />'; . (isset($opt['len']) ? ' maxlength="' . $opt['len'] . '"' : '' ) . ' />';
} elseif ($opt['type'] == 'select') { } elseif ($opt['type'] == 'select') {
$ret .= '<td>'; $ret .= '<label for="select_' . $plugin_name . '_' . $opt['name'] . '" class="desc">'
$ret .= '<label for="select_' . $plugin_name . '_' . $opt['name'] . '">'
. PMA_getString($opt['text']) . '</label>'; . PMA_getString($opt['text']) . '</label>';
$ret .= '</td><td>';
$ret .= '<select name="' . $plugin_name . '_' . $opt['name'] . '"' $ret .= '<select name="' . $plugin_name . '_' . $opt['name'] . '"'
. ' id="select_' . $plugin_name . '_' . $opt['name'] . '">'; . ' id="select_' . $plugin_name . '_' . $opt['name'] . '">';
$default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']); $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']);
@@ -211,14 +206,12 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
} else { } else {
/* This should be seen only by plugin writers, so I do not thing this /* This should be seen only by plugin writers, so I do not thing this
* needs translation. */ * needs translation. */
$ret .= '<td colspan="2">';
$ret .= 'UNKNOWN OPTION ' . $opt['type'] . ' IN IMPORT PLUGIN ' . $plugin_name . '!'; $ret .= 'UNKNOWN OPTION ' . $opt['type'] . ' IN IMPORT PLUGIN ' . $plugin_name . '!';
} }
if (isset($opt['doc'])) { if (isset($opt['doc'])) {
$ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1]); $ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1]);
} }
$ret .= '</td>'; $ret .= '</div>' . "\n";
$ret .= '</tr>';
return $ret; return $ret;
} }
@@ -240,18 +233,10 @@ function PMA_pluginGetOptions($section, &$list)
foreach ($list as $plugin_name => $val) { foreach ($list as $plugin_name => $val) {
$ret .= '<fieldset id="' . $plugin_name . '_options" class="options">'; $ret .= '<fieldset id="' . $plugin_name . '_options" class="options">';
$ret .= '<legend>' . PMA_getString($val['options_text']) . '</legend>'; $ret .= '<legend>' . PMA_getString($val['options_text']) . '</legend>';
if (isset($val['options'])) { if (isset($val['options']) || count($val['options']) == 0) {
$ret .= '<table class="form">'; foreach ($val['options'] as $id => $opt) {
$ret .= '<tbody>'; $ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt);
if (count($val['options']) == 0) {
$ret .= '<tr><td colspan="2">' . $GLOBALS['strNoOptions'] . '</td></tr>';
} else {
foreach ($val['options'] as $id => $opt) {
$ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt);
}
} }
$ret .= '</tbody>';
$ret .= '</table>';
} else { } else {
$ret .= $GLOBALS['strNoOptions']; $ret .= $GLOBALS['strNoOptions'];
} }

View File

@@ -1118,4 +1118,9 @@ li#li_flush_privileges {
#qbe_div_sql_query { #qbe_div_sql_query {
float: <?php echo $left; ?>; float: <?php echo $left; ?>;
} }
label.desc {
width: 30em;
float: left;
}

View File

@@ -1061,3 +1061,8 @@ li#li_flush_privileges {
#qbe_div_sql_query { #qbe_div_sql_query {
float: <?php echo $left; ?>; float: <?php echo $left; ?>;
} }
label.desc {
width: 30em;
float: left;
}