diff --git a/ChangeLog b/ChangeLog index 6d252f1e59..6a1133991a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog + rfe #1564 Improve action message on Tracking page + rfe #1566 Change value of "Number of rows:" when "Show all" is checked + rfe Focus console by clicking on white space ++ rfe 1507 Part 1: Cycle through console history with keyboard up/down arrows 4.3.2.0 (not yet released) - bug #4628 PHP error while exporting schema as PDF diff --git a/js/console.js b/js/console.js index d9b4a29ebb..7601768ec6 100644 --- a/js/console.js +++ b/js/console.js @@ -476,6 +476,16 @@ var PMA_consoleInput = { * @access private */ _codemirror: false, + /** + * @var int, count for history navigation, 0 for current input + * @access private + */ + _historyCount: 0, + /** + * @var string, current input when navigating through history + * @access private + */ + _historyPreserveCurrent: null, /** * Used for console input initialize * @@ -499,6 +509,9 @@ var PMA_consoleInput = { hintOptions: {"completeSingle": false, "completeOnSingleClick": true} }); PMA_consoleInput._inputs.console.on("inputRead", codemirrorAutocompleteOnInputRead); + PMA_consoleInput._inputs.console.on("keydown", function(instance, event) { + PMA_consoleInput._historyNavigate(event); + }); if ($('#pma_bookmarks').length !== 0) { PMA_consoleInput._inputs.bookmark = CodeMirror($('#pma_console .bookmark_add_input')[0], { theme: 'pma', @@ -511,7 +524,8 @@ var PMA_consoleInput = { } } else { PMA_consoleInput._inputs.console = - $('