mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge branch 'dev' into ans-central-users-data-folder
This commit is contained in:
@@ -1054,29 +1054,6 @@ $($('#callsign')).on('keypress',function(e) {
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$('form').each(function() {
|
||||
$(this).data('initialForm', $(this).serialize());
|
||||
}).submit(function(e) {
|
||||
var formEl = this;
|
||||
var changed = false;
|
||||
$('form').each(function() {
|
||||
if (this != formEl && $(this).data('initialForm') != $(this).serialize()) {
|
||||
changed = true;
|
||||
$(this).addClass('changed');
|
||||
} else {
|
||||
$(this).removeClass('changed');
|
||||
}
|
||||
});
|
||||
if (changed && !confirm('You have an unsaved QSO. Continue with QSO?')) {
|
||||
e.preventDefault();
|
||||
} else {
|
||||
$(window).unbind('beforeunload', catcher);
|
||||
}
|
||||
});
|
||||
$(window).bind('beforeunload', catcher);
|
||||
});
|
||||
|
||||
// Callsign always has focus on load
|
||||
$("#callsign").focus();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user