switch to ajax call to disable mystery caching that's popped up for some reason

This commit is contained in:
Kyle Drake 2023-04-28 10:19:57 -05:00
parent 28ed2718ba
commit 5a77fcb519

View file

@ -163,8 +163,12 @@
var editor = {} var editor = {}
$(document).ready(function() { $(document).ready(function() {
$.get("/site_files/download/<%= Addressable::URI.parse(@filename).normalized_path.to_s %>", function(resp) { $.ajax({
url: "/site_files/download/<%= Addressable::URI.parse(@filename).normalized_path.to_s %>",
cache: false,
success: function(resp) {
editor = ace.edit("editor") editor = ace.edit("editor")
setTheme() setTheme()
<% if @ace_mode %> <% if @ace_mode %>
@ -197,8 +201,9 @@
saveTextFile(false) saveTextFile(false)
} }
}) })
}) }
}) });
});
window.onbeforeunload = function() { window.onbeforeunload = function() {
if(unsavedChanges == true) if(unsavedChanges == true)