*/
function bodyKeydown(event, button) {
var target = event.target || event.srcElement;
+ if (event.keyCode == 27 && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) { // 27 - Esc
+ ajaxXmlhttp.aborted = true;
+ if (ajaxXmlhttp.abort) {
+ ajaxXmlhttp.abort();
+ }
+ setHtml('loader', '');
+ onblur = function () { };
+ if (originalFavicon) {
+ replaceFavicon(originalFavicon);
+ }
+ }
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' : ''))) {
}
var ajaxState = 0;
+var ajaxXmlhttp = {};
/** Safely load content to #content
* @param string
if (!history.pushState) {
return false;
}
+ ajaxXmlhttp.aborted = true;
+ if (ajaxXmlhttp.abort) {
+ ajaxXmlhttp.abort();
+ }
var currentState = ++ajaxState;
onblur = function () {
if (!originalFavicon) {
replaceFavicon('../adminer/static/loader.gif');
};
setHtml('loader', '<img src="../adminer/static/loader.gif" alt="">');
- return ajax(url, function (xmlhttp) {
- if (currentState == ajaxState) {
+ ajaxXmlhttp = ajax(url, function (xmlhttp) {
+ if (!xmlhttp.aborted && currentState == ajaxState) {
var title = xmlhttp.getResponseHeader('X-AJAX-Title');
if (title) {
document.title = decodeURIComponent(title);
}
}
}, data);
+ return ajaxXmlhttp;
}
/** Revive page from history
Adminer 3.3.4-dev:
Foreign keys default actions (bug #3397606)
Fix minor parser bug in SQL command with webserver file
-Ctrl+click on button opens form to blank window
+Ctrl+click on button opens form to a blank window
SET DEFAULT foreign key action
Trim table and column names (bug #3405309)
Error message with no response from server in AJAX
+Esc to cancel AJAX request
MySQL: set autocommit after connect
PostgreSQL: fix alter foreign key
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)