Improve message
Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
parent
8442db4dce
commit
928dc122cb
@ -163,14 +163,14 @@ var AJAX = {
|
||||
|
||||
//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;
|
||||
var foundFieldNotEmpty = false;
|
||||
$("input[type='text']").each(function(index){
|
||||
if($(this).val().length > 0) {
|
||||
flag = true;
|
||||
if ($(this).val().length > 0) {
|
||||
foundFieldNotEmpty = true;
|
||||
}
|
||||
});
|
||||
//trigger confirm dialog
|
||||
if (event.type === 'click' && flag && confirm(PMA_messages['strConfirmNavigation']) === false) {
|
||||
if (event.type === 'click' && foundFieldNotEmpty && confirm(PMA_messages['strConfirmNavigation']) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user