Merge pull request #1155 from gollum/dont_wait_on_versions

Remove calls to Page#last_version. Closes #1078.
This commit is contained in:
Dawa Ometto
2016-08-07 20:28:52 +02:00
committed by GitHub
5 changed files with 27 additions and 24 deletions
@@ -306,6 +306,19 @@ $(document).ready(function() {
$.GollumEditor();
}
if( $("#last-edit").length ) {
$("#page-info-toggle").click ( function () {
$.ajax({
url: '/last-commit-info',
data: {path: $("#page-info-toggle").data('pagepath')},
success: function ( data ) {
$("#last-edit").html('Last edited by <b>' + data.author + '</b>, ' + data.date);
}
});
$("#last-edit").html('<i class="fa fa-spinner fa-spin"></i> Getting commit info...');
})
}
if( $('#wiki-wrapper.create').length ){
$("#gollum-editor-submit").click( function() { window.onbeforeunload = null; } );
$("#gollum-editor-body").one('change', function(){