Remove calls to Page#last_version, replace with AJAX-lookup of version info.
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user