Remove unload on save.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user