Skip to content

Commit

Permalink
Merge pull request #138 from UCL-ARC/fix/pop-out-aws
Browse files Browse the repository at this point in the history
Fixing popout on aws not finding static files
  • Loading branch information
acholyn authored Jan 14, 2025
2 parents 4742d33 + f3acadd commit 2fc0d6b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mod_app/static/ckeditor/ckeditor/plugins/popout/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ CKEDITOR.plugins.add("popout", {
var newWindow = window.open("", "_blank", "width=800,height=600");
// make sure new editor gets config
var originalConfig = editor.config;
var ckeditorBasePath = "/static/ckeditor/ckeditor/";

var ckeditorBasePath = `${editor.config.staticUrl}ckeditor/ckeditor/`;
// styling and qol bits
var btnStyle =
"background-color: #23a1cc; border: none;border-radius: 4px; color: white; padding: 1rem 1.2rem; text-align: center; text-decoration: none; display: flex; font-size: 16px; margin: 0.8rem; cursor: pointer; justify-self: center";
Expand Down
1 change: 0 additions & 1 deletion mod_app/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import boto3
import re

from django.contrib.auth.decorators import login_required
from django.http import JsonResponse
from django.shortcuts import render
Expand Down
2 changes: 2 additions & 0 deletions museum_of_dreams_project/settings/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@


S3_BROWSER_SETTINGS = "djangoS3Browser"

CKEDITOR_CONFIGS["default"]["staticUrl"] = f"{STATIC_URL}"
1 change: 1 addition & 0 deletions museum_of_dreams_project/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"filebrowserBrowseUrl": "/view_bucket_items/",
"versionCheck": False,
"language": "en-gb",
"staticUrl": f"/{STATIC_URL}",
},
}

Expand Down

0 comments on commit 2fc0d6b

Please sign in to comment.