Remove unload on save.

This commit is contained in:
bootstraponline
2012-05-21 10:35:29 -06:00
parent aa7e01a085
commit 14f16349c0
3 changed files with 6 additions and 0 deletions
@@ -70,6 +70,8 @@ defaultCommitMessage = function() {
commentEditorSession.setValue( defaultCommitMessage() );
$.save = function( commitMessage ) {
window.onbeforeunload = null;
var POST = "POST";
var markdown = "markdown";
var txt = editorSession.getValue();
@@ -10,6 +10,8 @@
</div>
<script type="text/javascript">
window.onbeforeunload = function(){ return "Leaving will not create a new page!" };
$("#gollum-editor-submit").click( window.onbeforeunload = null; );
jQuery(document).ready(function() {
$.GollumEditor({ NewFile: true, MarkupType: '{{default_markup}}' });
});
@@ -12,6 +12,8 @@
</div>
<script type="text/javascript">
window.onbeforeunload = function(){ return "Leaving will discard all edits!" };
$("#gollum-editor-submit").click( window.onbeforeunload = null; );
jQuery(document).ready(function() {
$.GollumEditor();
});