Merge remote-tracking branch 'origin/QA_4_5' into QA_4_5

This commit is contained in:
Weblate 2015-11-01 11:53:07 +01:00
commit 51e6ba48a8
2 changed files with 5 additions and 11 deletions

View File

@ -13,6 +13,7 @@ phpMyAdmin - ChangeLog
- issue #11612 Undefined index: new_row_format
- issue #11605 Changing hostname kills password
- issue #11614 Undefined variable: db
- issue #11627 CREATE TABLE/INSERT INTO executed twice (ctrl+enter)
4.5.1.0 (2015-10-23)
- issue Invalid argument supplied for foreach()

View File

@ -1977,23 +1977,19 @@ function bindCodeMirrorToInlineEditor() {
codemirror_inline_editor.refresh();
codemirror_inline_editor.focus();
$(codemirror_inline_editor.getWrapperElement())
.bind('keydown', catchKeypressesFromSqlTextboxes);
.bind('keydown', catchKeypressesFromSqlInlineEdit);
} else {
$inline_editor
.focus()
.bind('keydown', catchKeypressesFromSqlTextboxes);
.bind('keydown', catchKeypressesFromSqlInlineEdit);
}
}
}
function catchKeypressesFromSqlTextboxes(event) {
function catchKeypressesFromSqlInlineEdit(event) {
// ctrl-enter is 10 in chrome and ie, but 13 in ff
if (event.ctrlKey && (event.keyCode == 13 || event.keyCode == 10)) {
if ($('#sql_query_edit').length > 0) {
$("#sql_query_edit_save").trigger('click');
} else if ($('#sqlquery').length > 0) {
$("#button_submit_query").trigger('click');
}
$("#sql_query_edit_save").trigger('click');
}
}
@ -4196,13 +4192,10 @@ AJAX.registerOnload('functions.js', function () {
if (typeof CodeMirror != 'undefined') {
codemirror_editor = PMA_getSQLEditor($elm);
codemirror_editor.focus();
$(codemirror_editor.getWrapperElement())
.bind('keydown', catchKeypressesFromSqlTextboxes);
codemirror_editor.on("blur", updateQueryParameters);
} else {
// without codemirror
$elm.focus()
.bind('keydown', catchKeypressesFromSqlTextboxes)
.bind('blur', updateQueryParameters);
}
}