Skip to content

Commit

Permalink
Database operations tab made more compact. Table operations altered t…
Browse files Browse the repository at this point in the history
…o use classes for styling.
  • Loading branch information
madhuracj committed Apr 24, 2011
1 parent 24e05e1 commit be14efa
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 55 deletions.
25 changes: 17 additions & 8 deletions db_operations.php
Expand Up @@ -349,14 +349,17 @@
}

if (!$is_information_schema) {

require './libraries/display_create_table.lib.php';

?>
<div class="operations_half_width">
<?php require './libraries/display_create_table.lib.php'; ?>
</div>
<?php
if ($cfgRelation['commwork']) {
/**
* database comment
*/
?>
<div class="operations_half_width">
<form method="post" action="db_operations.php">
<?php echo PMA_generate_common_hidden_inputs($db); ?>
<fieldset>
Expand All @@ -371,13 +374,15 @@
<input type="submit" value="<?php echo __('Go'); ?>" />
</fieldset>
</form>
</div>
<?php
}
/**
* rename database
*/
if ($db != 'mysql') {
?>
<div class="operations_half_width">
<form id="rename_db_form" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax" ' : ''); ?>method="post" action="db_operations.php"
onsubmit="return emptyFormElements(this, 'newname')">
<?php
Expand Down Expand Up @@ -416,6 +421,7 @@
<input id="rename_db_input" type="submit" value="<?php echo __('Go'); ?>" />
</fieldset>
</form>
</div>
<?php
} // end if

Expand All @@ -424,6 +430,7 @@
// Don't allow to easily drop mysql database, RFE #1327514.
if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_information_schema && ($db != 'mysql')) {
?>
<div class="operations_half_width">
<fieldset class="caution">
<legend><?php
if ($cfg['PropertiesIconic']) {
Expand Down Expand Up @@ -452,12 +459,14 @@
</li>
</ul>
</fieldset>
</div>
<?php } ?>
<?php
/**
* Copy database
*/
?>
<div class="operations_half_width clearfloat">
<form id="copy_db_form" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax" ' : ''); ?>method="post" action="db_operations.php"
onsubmit="return emptyFormElements(this, 'newname')">
<?php
Expand Down Expand Up @@ -522,13 +531,13 @@
<input type="submit" name="submit_copy" value="<?php echo __('Go'); ?>" />
</fieldset>
</form>

</div>
<?php

/**
* Change database charset
*/
echo '<form id="change_db_charset_form" ';
echo '<div class="operations_half_width"><form id="change_db_charset_form" ';
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' class="ajax" ';
}
Expand All @@ -549,7 +558,7 @@
. ' <input type="submit" name="submitcollation"'
. ' value="' . __('Go') . '" />' . "\n"
. '</fieldset>' . "\n"
. '</form>' . "\n";
. '</form></div>' . "\n";

if ($num_tables > 0
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
Expand Down Expand Up @@ -581,12 +590,12 @@
/*
* Export Relational Schema View
*/
echo '<fieldset><a href="schema_edit.php?' . $url_query . '">';
echo '<div class="operations_full_width"><fieldset><a href="schema_edit.php?' . $url_query . '">';
if ($cfg['PropertiesIconic']) {
echo '<img class="icon" src="' . $pmaThemeImage . 'b_edit.png"'
.' alt="" width="16" height="16" />';
}
echo __('Edit or export relational schema') . '</a></fieldset>';
echo __('Edit or export relational schema') . '</a></fieldset></div>';
} // end if

/**
Expand Down
18 changes: 9 additions & 9 deletions tbl_operations.php
Expand Up @@ -253,7 +253,7 @@
*/
?>
<!-- Order the table -->
<div id="div_table_order">
<div class="operations_half_width">
<form method="post" action="tbl_operations.php">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); ?>
<fieldset id="fieldset_table_order">
Expand All @@ -279,7 +279,7 @@
</div>

<!-- Move table -->
<div id="div_table_rename">
<div class="operations_half_width">
<form method="post" action="tbl_operations.php"
onsubmit="return emptyFormElements(this, 'new_name')">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); ?>
Expand Down Expand Up @@ -339,7 +339,7 @@
?>

<!-- Table options -->
<div id="div_table_options">
<div class="operations_half_width clearfloat">
<form method="post" action="tbl_operations.php">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); ?>
<input type="hidden" name="reload" value="1" />
Expand Down Expand Up @@ -518,7 +518,7 @@
</div>

<!-- Copy table -->
<div id="div_table_copy">
<div class="operations_half_width">
<form method="post" action="tbl_operations.php"
onsubmit="return emptyFormElements(this, 'new_name')">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); ?>
Expand Down Expand Up @@ -581,7 +581,7 @@

<br class="clearfloat"/>

<div id="div_table_maintenance">
<div class="operations_half_width">
<fieldset>
<legend><?php echo __('Table maintenance'); ?></legend>

Expand Down Expand Up @@ -668,7 +668,7 @@
</fieldset>
</div>
<?php if (! (isset($db_is_information_schema) && $db_is_information_schema)) { ?>
<div id="div_table_removal">
<div class="operations_half_width">
<fieldset class="caution">
<legend><?php echo __('Delete data or table'); ?></legend>

Expand Down Expand Up @@ -699,7 +699,7 @@
'reload' => '1',
'purge' => '1',
'message_to_show' => sprintf(($tbl_is_view ? __('View %s has been dropped') : __('Table %s has been dropped')), htmlspecialchars($table)),
// table name is needed to avoid running
// table name is needed to avoid running
// PMA_relationsCleanupDatabase() on the whole db later
'table' => $GLOBALS['table'],
));
Expand All @@ -722,7 +722,7 @@
// show the Partition maintenance section only if we detect a partition
if (! is_null($partition_names[0])) {
?>
<div id="div_partition_maintenance">
<div class="operations_half_width">
<form method="post" action="tbl_operations.php">
<?php echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); ?>
<fieldset>
Expand Down Expand Up @@ -777,7 +777,7 @@
if ($foreign) {
?>
<!-- Referential integrity check -->
<div id="div_referential_integrity">
<div class="operations_half_width">
<fieldset>
<legend><?php echo __('Check referential integrity:'); ?></legend>
<ul>
Expand Down
21 changes: 3 additions & 18 deletions themes/original/css/theme_right.css.php
Expand Up @@ -1251,29 +1251,14 @@ function PMA_ieFilter($start_color, $end_color)
float: <?php echo $left; ?>;
}

#div_table_order {
.operations_half_width {
min-width: 48%;
float: <?php echo $left; ?>;
}

#div_table_rename {
min-width: 48%;
float: <?php echo $left; ?>;
}

#div_table_copy,
#div_partition_maintenance,
#div_referential_integrity,
#div_table_removal,
#div_table_maintenance {
min-width: 48%;
float: <?php echo $left; ?>;
}

#div_table_options {
.operations_full_width {
width: 100%;
clear: both;
min-width: 48%;
float: <?php echo $left; ?>;
}

#qbe_div_table_list {
Expand Down
25 changes: 5 additions & 20 deletions themes/pmahomme/css/theme_right.css.php
Expand Up @@ -599,11 +599,11 @@ function PMA_ieFilter($start_color, $end_color)
<?php } else { ?>
padding: 0.3em;
<?php } ?>

-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;

-moz-box-shadow: 0 1px 1px #fff inset;
-webkit-box-shadow: 0 1px 1px #fff inset;
box-shadow: 0 1px 1px #fff inset;
Expand Down Expand Up @@ -1546,29 +1546,14 @@ function PMA_ieFilter($start_color, $end_color)
float: <?php echo $left; ?>;
}

#div_table_order {
.operations_half_width {
min-width: 48%;
float: <?php echo $left; ?>;
}

#div_table_rename {
min-width: 48%;
float: <?php echo $left; ?>;
}

#div_table_copy,
#div_partition_maintenance,
#div_referential_integrity,
#div_table_removal,
#div_table_maintenance {
min-width: 48%;
float: <?php echo $left; ?>;
}

#div_table_options {
.operations_full_width {
width: 100%;
clear: both;
min-width: 48%;
float: <?php echo $left; ?>;
}

#qbe_div_table_list {
Expand Down

0 comments on commit be14efa

Please sign in to comment.