Skip to content
Browse files

Ctrl+Shift+Enter for Save and continue edit

  • Loading branch information...
1 parent c2965bc commit e0773c0072a00db47ab5a02ee17b419a2484391c @vrana committed
Showing with 14 additions and 9 deletions.
  1. +1 −1 adminer/edit.inc.php
  2. +12 −7 adminer/static/functions.js
  3. +1 −1 changes.txt
View
2 adminer/edit.inc.php
@@ -94,7 +94,7 @@
if ($fields) {
echo "<input type='submit' value='" . lang('Save') . "'>\n";
if (!isset($_GET["select"])) {
- echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "' accesskey='Q' title='Alt+Shift+Q'>\n";
+ echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "'>\n";
}
}
echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n"
View
19 adminer/static/functions.js
@@ -199,15 +199,16 @@ function bodyKeydown(event, button) {
var target = event.target || event.srcElement;
if (event.ctrlKey && (event.keyCode == 13 || event.keyCode == 10) && !event.altKey && !event.metaKey && /select|textarea|input/i.test(target.tagName)) { // 13|10 - Enter, shiftKey allowed
target.blur();
- if (ajaxForm(target.form, (button ? button + '=1' : ''))) {
- return false;
- }
- if (button) {
- target.form[button].click();
- } else {
- target.form.submit();
+ if (!ajaxForm(target.form, (button ? button + '=1' : ''))) {
+ if (button) {
+ target.form[button].click();
+ } else {
+ target.form.submit();
+ }
}
+ return false;
}
+ return true;
}
@@ -226,6 +227,10 @@ function editingKeydown(event) {
}
return false;
}
+ if (event.shiftKey && !bodyKeydown(event, 'insert')) {
+ eventStop(event);
+ return false;
+ }
return true;
}
View
2 changes.txt
@@ -7,7 +7,7 @@ Bit type default value
Display foreign key name in tooltip
Display default column value in table overview
Display column collation in tooltip
-Keyboard shortcuts: Alt+Shift+1 for homepage, Alt+Shift+Q for Save and continue edit
+Keyboard shortcuts: Alt+Shift+1 for homepage, Ctrl+Shift+Enter for Save and continue edit
Pagination support (Oracle)
Autocomplete for big foreign keys (Editor)
Display name of the referenced record in PostgreSQL (Editor)

0 comments on commit e0773c0

Please sign in to comment.
Something went wrong with that request. Please try again.