patch for feature request #1518
Signed-off-by: A V Minhaz <minhazav@gmail.com>
This commit is contained in:
parent
217459424f
commit
e5f0b0881c
14
js/ajax.js
14
js/ajax.js
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user