Fixed mixup which happened due to a complex rebase

This commit is contained in:
Rouslan Placella 2012-08-17 21:08:30 +02:00
parent ac661158de
commit bb2d1f13de
2 changed files with 12 additions and 1 deletions

View File

@ -7,6 +7,11 @@ var AJAX = {
* @var bool active Whether we are busy
*/
active: false,
/**
* @var function Callback to execute after a successful request
* Used by PMA_commonFunctions from common.js
*/
_callback: function () {},
/**
* @var bool _debug Makes noise in your Firebug console
*/
@ -246,6 +251,11 @@ var AJAX = {
.insertAfter('#selflink')
.append(data._errors);
}
if (typeof AJAX._callback === 'function') {
AJAX._callback.call();
}
AJAX._callback = function () {};
} else {
PMA_ajaxShowMessage(data.error, false);
AJAX.active = false;

View File

@ -135,13 +135,14 @@ var PMA_commonActions = {
*
* @return void
*/
refreshMain: function (url) {
refreshMain: function (url, callback) {
if (! url) {
url = $('#selflink a').attr('href');
url = url.substring(0, url.indexOf('?'));
}
url += PMA_commonParams.getUrlQuery();
$('<a />', {href: url}).click();
AJAX._callback = callback;
}
};