Skip to content

Commit 2fc0d6b

Browse files
authored
Merge pull request #138 from UCL-ARC/fix/pop-out-aws
Fixing popout on aws not finding static files
2 parents 4742d33 + f3acadd commit 2fc0d6b

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

mod_app/static/ckeditor/ckeditor/plugins/popout/plugin.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ CKEDITOR.plugins.add("popout", {
77
var newWindow = window.open("", "_blank", "width=800,height=600");
88
// make sure new editor gets config
99
var originalConfig = editor.config;
10-
var ckeditorBasePath = "/static/ckeditor/ckeditor/";
11-
10+
var ckeditorBasePath = `${editor.config.staticUrl}ckeditor/ckeditor/`;
1211
// styling and qol bits
1312
var btnStyle =
1413
"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";

mod_app/views.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import boto3
22
import re
3-
43
from django.contrib.auth.decorators import login_required
54
from django.http import JsonResponse
65
from django.shortcuts import render

museum_of_dreams_project/settings/aws.py

+2
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@
5757

5858

5959
S3_BROWSER_SETTINGS = "djangoS3Browser"
60+
61+
CKEDITOR_CONFIGS["default"]["staticUrl"] = f"{STATIC_URL}"

museum_of_dreams_project/settings/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
"filebrowserBrowseUrl": "/view_bucket_items/",
156156
"versionCheck": False,
157157
"language": "en-gb",
158+
"staticUrl": f"/{STATIC_URL}",
158159
},
159160
}
160161

0 commit comments

Comments
 (0)