Skip to content

Commit

Permalink
Item12952: bring back onbeforeunload handler for navigation feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
crawford committed Oct 3, 2014
1 parent a252352 commit c3cd337
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ function _id_ify(id) {
function(results) {
wizard_reports($root, results);
var erc = 0;
$.each(results.report, function(index, rep) {
$.each(results.messages, function(index, rep) {
if (rep.level == 'errors') {
erc += 1;
}
Expand Down Expand Up @@ -1042,14 +1042,19 @@ function _id_ify(id) {
checker_reports);
});
});
/*

$(window).on('beforeunload', function() {
if ($('.value_modified').length > 0) {
return "You have unsaved changes";
var changed = '';
if ($('#bootstrap_warning').length) {
changed = " complete basic configuration\n";
}
$('.value_modified').each(function() {
var handler = $(this).data('value_handler');
changed += ' ' + handler.spec.keys + '\n';
});
return 'You have unsaved changes:\n'
+ changed + 'Are you really sure?\n'
}
return 'Are you really sure?';
});
*/

})(jQuery);

0 comments on commit c3cd337

Please sign in to comment.