added relative_url_root to some more javascript calls (ace file path, file template path).
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
var CodeOceanEditor = {
|
||||
//ACE-Editor-Path
|
||||
ACE_FILES_PATH: '/assets/ace/',
|
||||
// ruby part adds the relative_url_root, if it is set.
|
||||
ACE_FILES_PATH: '<%= (defined? config.relative_url_root) && config.relative_url_root != nil && config.relative_url_root != "" ? config.relative_url_root : "" %>' + '/assets/ace/',
|
||||
THEME: 'ace/theme/textmate',
|
||||
|
||||
//Color-Encoding for Percentages in Progress Bars (For submissions)
|
||||
|
@ -152,8 +152,9 @@ $(function() {
|
||||
};
|
||||
|
||||
var updateFileTemplates = function(fileType) {
|
||||
var rel_url_root = '<%= (defined? config.relative_url_root) && config.relative_url_root != nil && config.relative_url_root != "" ? config.relative_url_root : "" %>';
|
||||
var jqxhr = $.ajax({
|
||||
url: '/file_templates/by_file_type/' + fileType + '.json',
|
||||
url: rel_url_root + '/file_templates/by_file_type/' + fileType + '.json',
|
||||
dataType: 'json'
|
||||
});
|
||||
jqxhr.done(function(response) {
|
||||
|
Reference in New Issue
Block a user