patch for feature request #1518

Signed-off-by: A V Minhaz <minhazav@gmail.com>
This commit is contained in:
minhaz 2014-04-18 17:39:04 +05:30
parent 217459424f
commit e5f0b0881c

View File

@ -160,6 +160,20 @@ var AJAX = {
event.preventDefault();
event.stopImmediatePropagation();
}
//sometime we accidently click on a url,refresh button or back button
//operation to confirm if user want to leave page in such cases
var flag = false;
$("input[type='text']").each(function(index){
if($(this).val().length > 0) {
flag = true;
}
});
//trigger confirm dialog
if (event.type === 'click' && flag && confirm(PMA_messages['strConfirmNavigation']) === false) {
return false;
}
if (AJAX.active === true) {
// Cancel the old request if abortable, when the user requests
// something else. Otherwise silently bail out, as there is already