]> git.joonet.de Git - adminer.git/commitdiff
Avoid flicker before the image is loaded
authorJakub Vrana <jakub@vrana.cz>
Sat, 30 Jun 2012 12:02:43 +0000 (05:02 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sat, 30 Jun 2012 12:02:43 +0000 (05:02 -0700)
adminer/include/editing.inc.php
adminer/static/default.css

index 619226ceb5114b582e22033d1377d9278e84dd44..600cd354e49bdb9cce29b7f6a0b869cdcc5edfc0 100644 (file)
@@ -234,7 +234,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
 <td<?php echo ($_POST["defaults"] ? "" : " class='hidden'"); ?>><?php echo lang('Default values'); ?>
 <?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
 <?php } ?>
-<td><?php echo "<input type='image' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
+<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
 </thead>
 <tbody onkeydown="return editingKeydown(event);">
 <?php
@@ -256,11 +256,11 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
 <?php
                echo "<td>";
                echo (support("move_col") ?
-                       "<input type='image' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, $allowed, 1);'>&nbsp;"
-                       . "<input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&nbsp;"
-                       . "<input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>&nbsp;"
+                       "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, $allowed, 1);'>&nbsp;"
+                       . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&nbsp;"
+                       . "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>&nbsp;"
                : "");
-               echo ($orig == "" || support("drop_col") ? "<input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editingRemoveRow(this);'>" : "");
+               echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editingRemoveRow(this);'>" : "");
                echo "\n";
        }
 }
index de9af70aa21f936d2cf43b5dfdfbc8c54dc53820..aa645eae8ff03a9e7adee24d46e865c3d4b2b7f2 100644 (file)
@@ -43,6 +43,7 @@ input[type=image] { vertical-align: middle; }
 .options select { width: 20ex; width: auto\9; }
 .active { font-weight: bold; }
 .sqlarea { width: 98%; }
+.icon { width: 18px; height: 18px; }
 #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; overflow: auto; overflow-y: hidden; white-space: nowrap; }
 #menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
 #content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }