diff --git a/js/keyhandler.js b/js/keyhandler.js index 648ed3def1..b8f8137c37 100644 --- a/js/keyhandler.js +++ b/js/keyhandler.js @@ -4,6 +4,21 @@ * * @param object event data */ + +AJAX.registerTeardown('keyhandler.js', function() { + $('#table_columns').die('keydown'); + $('table.insertRowTable').die('keydown'); +}); + +AJAX.registerOnload('keyhandler.js', function() { + $('#table_columns').live('keydown', function(event) { + onKeyDownArrowsHandler(event.originalEvent); + }); + $('table.insertRowTable').live('keydown', function(event) { + onKeyDownArrowsHandler(event.originalEvent); + }); +}); + function onKeyDownArrowsHandler(e) { e = e||window.event; diff --git a/libraries/Header.class.php b/libraries/Header.class.php index b484718326..c295c47076 100644 --- a/libraries/Header.class.php +++ b/libraries/Header.class.php @@ -148,6 +148,7 @@ class PMA_Header { $this->_scripts->addFile('jquery/jquery-1.8.3.js'); $this->_scripts->addFile('ajax.js'); + $this->_scripts->addFile('keyhandler.js'); $this->_scripts->addFile('jquery/jquery-ui-1.9.2.custom.js'); $this->_scripts->addFile('jquery/jquery.sprintf.js'); $this->_scripts->addFile('jquery/jquery.cookie.js'); diff --git a/libraries/tbl_columns_definition_form.inc.php b/libraries/tbl_columns_definition_form.inc.php index 661eda6190..0f8adb201c 100644 --- a/libraries/tbl_columns_definition_form.inc.php +++ b/libraries/tbl_columns_definition_form.inc.php @@ -723,13 +723,6 @@ for ($i = 0; $i < $num_fields; $i++) { } } // end for -$html .= '' - . ''; - $html .= '
'; diff --git a/tbl_change.php b/tbl_change.php index 4962dd1fea..2e6f542cd0 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -196,11 +196,6 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' // some browsers send wrongly this form to the http server. $html_output = ''; -//Set on key handler for moving using by Ctrl+arrows -$html_output .= '' - . ''; // Set if we passed the first timestamp field $timestamp_seen = false; $columns_cnt = count($table_fields);