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:
- Display information that there are no settings.
- 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>
* themes/*:

View File

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

View File

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

View File

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

View File

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