]> git.joonet.de Git - adminer.git/commitdiff
Fix Enter key on indexes
authorJakub Vrana <jakub@vrana.cz>
Wed, 10 Jul 2013 19:44:03 +0000 (12:44 -0700)
committerJakub Vrana <jakub@vrana.cz>
Thu, 11 Jul 2013 18:20:04 +0000 (11:20 -0700)
adminer/indexes.inc.php
adminer/static/functions.js

index 2cbfba31169581c47230ab071b9e1d7c96992e6a..9fb07aff2b1a4fa83de52c106174f5755c1746e2 100644 (file)
@@ -90,7 +90,12 @@ if (!$row) {
 
 <form action="" method="post">
 <table cellspacing="0" class="nowrap">
-<thead><tr><th><?php echo lang('Index Type'); ?><th><?php echo lang('Column (length)'); ?><th><?php echo lang('Name'); ?><th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;</thead>
+<thead><tr>
+<th><?php echo lang('Index Type'); ?>
+<th><input type="submit" style="z-index: -1; position: absolute; height: 0;"><?php echo lang('Column (length)'); ?>
+<th><?php echo lang('Name'); ?>
+<th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;
+</thead>
 <?php
 $j = 1;
 foreach ($row["indexes"] as $index) {
index 77a122a64858839dd6d7508a857cc12707bcb8ea..cc761780ff60fff44f118e59db0e6c517305d11d 100644 (file)
@@ -635,7 +635,7 @@ function findDefaultSubmit(form) {
        var inputs = form.getElementsByTagName('input');
        for (var i = 0; i < inputs.length; i++) {
                var input = inputs[i];
-               if (input.type == 'submit') {
+               if (input.type == 'submit' && !input.style.zIndex) {
                        return input;
                }
        }