]> git.joonet.de Git - adminer.git/commitdiff
Focus first field with insert (bug #3126501)
authorJakub Vrana <jakub@vrana.cz>
Mon, 31 Jan 2011 14:57:28 +0000 (15:57 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 31 Jan 2011 14:57:28 +0000 (15:57 +0100)
adminer/edit.inc.php
changes.txt

index 9617cb843163b8c04884f8decdb28202caaeb03e..bd79c3c363a05a57475370a95570828e6e56d7ba 100644 (file)
@@ -64,7 +64,7 @@ if ($_POST["save"]) {
 }
 ?>
 
-<form action="" method="post" enctype="multipart/form-data">
+<form action="" method="post" enctype="multipart/form-data" id="form">
 <?php
 if ($fields) {
        echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";
@@ -103,8 +103,9 @@ if ($fields) {
                echo '<input type="submit" name="insert" value="' . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "\">\n";
        }
 }
-if ($update) {
-       echo "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n";
-}
+echo ($update
+       ? "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n"
+       : "<script type='text/javascript'>document.getElementById('form').elements[0].focus();</script>\n"
+);
 ?>
 </form>
index 835f57943a15b01671be6e4147de5d6c43e5e9ef..02efeb9dda4bc4a1d423e427394a3e7b328c5b43 100644 (file)
@@ -2,6 +2,8 @@ Adminer 3.2.0-dev:
 Get long texts and slow information by AJAX
 All links and some forms by AJAX in browsers with support for history.pushState
 Ability to search by expression in select
+Export SQL command result (bug #3116854)
+Focus first field with insert (bug #3126501)
 Permanent link in schema
 Display total time in show only errors mode in SQL command
 History: edit all
@@ -9,6 +11,7 @@ MS SQL: auto primary and foreign key
 SQLite: display 0
 Create table default data type: int
 Focus upper/lower fields by Ctrl+Up/Ctrl+Down
+Hide credentials for SQLite
 Homepage customization
 Use IN for search in numeric fields (Editor)
 Use password input for _md5 and _sha1 fields (Editor)