Remove unload on save.
This commit is contained in:
@@ -70,6 +70,8 @@ defaultCommitMessage = function() {
|
|||||||
commentEditorSession.setValue( defaultCommitMessage() );
|
commentEditorSession.setValue( defaultCommitMessage() );
|
||||||
|
|
||||||
$.save = function( commitMessage ) {
|
$.save = function( commitMessage ) {
|
||||||
|
window.onbeforeunload = null;
|
||||||
|
|
||||||
var POST = "POST";
|
var POST = "POST";
|
||||||
var markdown = "markdown";
|
var markdown = "markdown";
|
||||||
var txt = editorSession.getValue();
|
var txt = editorSession.getValue();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.onbeforeunload = function(){ return "Leaving will not create a new page!" };
|
window.onbeforeunload = function(){ return "Leaving will not create a new page!" };
|
||||||
|
$("#gollum-editor-submit").click( window.onbeforeunload = null; );
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
$.GollumEditor({ NewFile: true, MarkupType: '{{default_markup}}' });
|
$.GollumEditor({ NewFile: true, MarkupType: '{{default_markup}}' });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.onbeforeunload = function(){ return "Leaving will discard all edits!" };
|
window.onbeforeunload = function(){ return "Leaving will discard all edits!" };
|
||||||
|
$("#gollum-editor-submit").click( window.onbeforeunload = null; );
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
$.GollumEditor();
|
$.GollumEditor();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user