Commit acbe1e88 by Bridger Maxwell

Re-enabled unsaved changes confirmation on wiki edit.

parent 183774f6
......@@ -44,12 +44,12 @@
//Store the inital contents so we can compare for unsaved changes
var initial_contents = editor.getValue();
// window.onbeforeunload = function askConfirm() { //Warn the user before they navigate away
// if ( editor.getValue() != initial_contents ) {
// return "You have made changes to the article that have not been saved yet.";
// }
// };
window.onbeforeunload = function askConfirm() { //Warn the user before they navigate away
if ( editor.getValue() != initial_contents ) {
return "You have made changes to the article that have not been saved yet.";
}
};
$("#submit_edit").click(function() {
initial_contents = editor.getValue();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment