]> git.joonet.de Git - adminer.git/commitdiff
Centralize nowrap
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 28 Jan 2010 15:17:20 +0000 (15:17 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 28 Jan 2010 15:17:20 +0000 (15:17 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1300 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/create.inc.php
adminer/include/editing.inc.php
adminer/procedure.inc.php
adminer/static/editing.js

index fc332e639063f3f81a4b597b45fe0497f3822d14..58b82a67702fd4df808198fc72e1c09195ca8cf8 100644 (file)
@@ -158,7 +158,7 @@ foreach ($engines as $engine) {
  <?php echo html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]); ?>
  <input type="submit" value="<?php echo lang('Save'); ?>">
 </p>
-<table cellspacing="0" id="edit-fields">
+<table cellspacing="0" id="edit-fields" class="nowrap">
 <?php $column_comments = edit_fields($row["fields"], $collations, "TABLE", $suhosin, $foreign_keys); ?>
 </table>
 <p>
index a5fda4c7fed553e29c518de4edd548a548e265a2..ced0430c594d70fdc689b33b25755d9bbca78584 100644 (file)
@@ -188,7 +188,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
                }
        }
        ?>
-<thead><tr>
+<thead><tr class="wrap">
 <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
 <th><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
 <td><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="10" style="display: none;" onblur="editingLengthBlur(this);"></textarea>
@@ -218,11 +218,11 @@ if ($type == "PROCEDURE") {
 <?php if ($type == "TABLE") { ?>
 <td><?php echo checkbox("fields[$i][null]", 1, $field["null"]); ?>
 <td><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?>>
-<td class="nowrap hidden"><?php echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onchange="this.previousSibling.checked = true;">
+<td class="hidden"><?php echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onchange="this.previousSibling.checked = true;">
 <td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo h($field["comment"]); ?>" maxlength="255">
 <?php } ?>
 <?php
-               echo "<td class='nowrap'><input type='image' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, $allowed, 1);'>";
+               echo "<td><input type='image' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, $allowed, 1);'>";
                echo "&nbsp;<input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editingRemoveRow(this);'>";
                echo "&nbsp;<input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>";
                echo "&nbsp;<input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>";
index a631b8cf59751d600ccf4e78ed788ca8590aa312..fa583c1b32fd17d43cd64bf5d0057a142944ffc1 100644 (file)
@@ -39,9 +39,14 @@ if ($_POST) {
 ?>
 
 <form action="" method="post" id="form">
-<table cellspacing="0">
-<?php edit_fields($row["fields"], $collations, $routine); ?>
-<?php if (isset($_GET["function"])) { ?><tr><td><?php echo lang('Return type'); edit_type("returns", $row["returns"], $collations); ?><?php } ?>
+<table cellspacing="0" class="nowrap">
+<?php
+edit_fields($row["fields"], $collations, $routine);
+if (isset($_GET["function"])) {
+       echo "<tr><td>" . lang('Return type');
+       edit_type("returns", $row["returns"], $collations);
+}
+?>
 </table>
 <p><textarea name="definition" rows="10" cols="80" style="width: 98%;"><?php echo h($row["definition"]); ?></textarea>
 <p>
index 11220964bba50172f870a33c43f811b835c1a511..1b85ffdad331f0c562579cdb7b61de00a63229d3 100644 (file)
@@ -243,7 +243,7 @@ function editingLengthBlur(edit) {
 function columnShow(checked, column) {
        var trs = document.getElementById('edit-fields').getElementsByTagName('tr');
        for (var i=0; i < trs.length; i++) {
-               trs[i].getElementsByTagName('td')[column].className = (checked ? 'nowrap' : 'hidden');
+               trs[i].getElementsByTagName('td')[column].className = (checked ? '' : 'hidden');
        }
 }